]> git.cworth.org Git - fips/commitdiff
Switch to unsigned values for the timestamp query results.
authorCarl Worth <cworth@cworth.org>
Sat, 9 Nov 2013 15:58:15 +0000 (07:58 -0800)
committerCarl Worth <cworth@cworth.org>
Mon, 11 Nov 2013 18:31:42 +0000 (10:31 -0800)
Since these are timestamps they can't be negative, so an unsigned
value makes sense.

metrics.c

index 72f5400fa3c1668f468e286af707cdcd89de5497..996e7795e74cfe1929623bd9bf75762a6665269a 100644 (file)
--- a/metrics.c
+++ b/metrics.c
@@ -790,7 +790,7 @@ metrics_collect_available (metrics_t *metrics)
 void
 metrics_end_frame_pre_swap (metrics_t *metrics)
 {
-       GLint64 swap_end_timestamp, frame_time_ns, latency_ns;
+       GLuint64 swap_end_timestamp, frame_time_ns, latency_ns;
 
        /* Don't leave any counters running over the end_frame work we
         * do here. The counters will be started again at the end of
@@ -813,8 +813,8 @@ metrics_end_frame_pre_swap (metrics_t *metrics)
         * have more than one entry anyway.
         */
 
-       glGetQueryObjecti64v (metrics->swap_end_timestamp_id,
-                             GL_QUERY_RESULT, &swap_end_timestamp);
+       glGetQueryObjectui64v (metrics->swap_end_timestamp_id,
+                              GL_QUERY_RESULT, &swap_end_timestamp);
 
        if (frames > 0) {
                /* Subtract previous frame's timestamp to get frame time. */