Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(framerate tracking): better handling of query failures #652

Merged
merged 4 commits into from
Oct 22, 2024

Conversation

seankmartin
Copy link
Contributor

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:

  1. 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.
  2. 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

@jbms jbms merged commit c110447 into google:master Oct 22, 2024
14 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants