Summary: improved handling of gl query errors that could cause failed queries to hang around in the pool and decrease frame time tracking accuracy
In some cases the query handling for frame deltas was not properly accounting for errors in the queries. This could lead to some old queries get left in the query pool for a long time, and warnings in the console about trying to start the same query multiple times, or fetching from a query that never started.
To address this, the main changes are:
Keep track of the query started and ended state manually in the code. The state from gl is also checked, but if we know that the query never started or ended for some reason, we can avoid triggering a gl error trying to get results from that query - and instead delete the failed query.
Keep the frame number along with the queries and frame deltas. This is used to help delete old failed queries that may get left in the query pool. Also helps for debugging and has possible downstream applications
Summary: improved handling of gl query errors that could cause failed queries to hang around in the pool and decrease frame time tracking accuracy
In some cases the query handling for frame deltas was not properly accounting for errors in the queries. This could lead to some old queries get left in the query pool for a long time, and warnings in the console about trying to start the same query multiple times, or fetching from a query that never started.
To address this, the main changes are: