Tracy 0.14.1 uses 65,536 query objects per OpenGL profiling context. On the Android driver below, timestamp result retrieval fails when the 4,097th distinct query object is used, even when each preceding query has completed and its result has been read.
Environment
- Android, arm64, OpenGL ES 3.2.
- GPU:
Adreno (TM) 663. GL_EXT_disjoint_timer_queryadvertised;GL_ARB_query_buffer_objectabsent.- Tracy client and profiler 0.14.1.
Reproduction
- Create a GLES context with a small EGL pbuffer and make it current.
- Generate 65,536 query names with
glGenQueries. - For each distinct name, issue
glQueryCounterEXT(id, GL_TIMESTAMP_EXT), callglFlush()andglFinish(), then retrieve the result withglGetQueryObjectui64vEXT(id, GL_QUERY_RESULT_EXT, ...). - Check
glGetError()after each operation.
Generating the names succeeds. The first 4,096 distinct queries succeed; result retrieval for the next one reports:
FAIL result INDEX=4096 ID=4097 ERROR=0x5020x502 is GL_INVALID_OPERATION. A separate sparse-name test successfully used names 4096, 4097, 65536, and 1 in a fresh context. This points to a limit on instantiated query objects rather than the numeric query name. The serial completion/readback procedure also rules out simply having too many pending results.
Reusing a pool of 4,096 objects passed 16,384 timestamp operations. With Tracy's pool reduced to 4,096, a 60-second application capture completed with 19,656 GPU zones and positive GPU durations. Separate surface recreation checks also passed. The application test ran with SELinux enforcing.
Expected behavior and proposed fix
Allow a smaller OpenGL query pool for drivers with this limitation, through a supported configuration option or an appropriate platform default. Our downstream Android patch changes QueryCount to 4 * 1024.
The smaller pool still needs to accommodate outstanding zone queries; configuration validation and clear exhaustion behavior would be preferable to assuming every Android workload fits. This is a driver compatibility report, not a claim that every Adreno or Android device has the same limit.
Activity
0No activity yet.