Fix query management in GpuProfiler
GL query objects were being used incorrectly in GpuProfiler across GL context resets, which could cause endless creation of additional GL query objects. Have the compositor notify the GpuProfiler when the GL context is created and destroyed, so it can reset its state appropriately. Also impose a limit of 32 outstanding queries to help prevent endless query object creation in the future. If we hit the limit we print a log, reset everything, and start over. Bug: 34256609 Test: Manually tested that: (a) we no longer get GL errors after glGetQueryObjectiv() calls after a context destroy/create cycle, and (b) the queue overflow handling works as expected. Change-Id: I64905b766a3ea7cb62d543b776ac975d0762868e
Loading
Please register or sign in to comment