]> git.cworth.org Git - fips/commitdiff
Collect any available results before switching contexts.
authorCarl Worth <cworth@cworth.org>
Wed, 30 Oct 2013 21:39:47 +0000 (14:39 -0700)
committerCarl Worth <cworth@cworth.org>
Thu, 31 Oct 2013 23:26:11 +0000 (16:26 -0700)
Rather than missing out on any measured results by just throwing them
away, we collect anything that is ready.

This way, if any queries don't actually have results ready, we will
throw those away, since we're not going to be able to get a meaningful
result from them with the current context going away.

metrics.c

index 4e67ab9399de20b195e5704f57aaa1818dfa4eb4..6e81fae4714753608b454f6968d6ef56c147cecb 100644 (file)
--- a/metrics.c
+++ b/metrics.c
@@ -331,6 +331,8 @@ metrics_info_fini (void)
        if (! info->initialized)
                return;
 
+       metrics_collect_available ();
+
        if (ctx->timer_begun_id) {
                glEndQuery (GL_TIME_ELAPSED);
                glDeleteQueries (1, &ctx->timer_begun_id);