]> git.cworth.org Git - fips/commitdiff
Rework timer queries to run continuously.
authorCarl Worth <cworth@cworth.org>
Tue, 15 Oct 2013 20:45:06 +0000 (13:45 -0700)
committerCarl Worth <cworth@cworth.org>
Tue, 15 Oct 2013 21:04:52 +0000 (14:04 -0700)
Previously, we ran timer queries only around gl calls that we
determined were "drawing operations". This had the following
drawbacks:

1. Lots of timer queries, so more overhead than desired

2. Misses accumulating time from non "drawing operations"

3. Misses accumulating time from drawing operations we failed to
   identify.

Here, instead, we keep the timer running continuously, solving all
three of the above problems. We first start timer at make-current time
(glxMakeCurrent, glxMakeContextCurrent, or eglMakeCurrent), and only
stop it, (and immediately restart it), in one of the following
circumstances:

1. Current program changed (glUseProgram or glUseProgramObjectARB)

2. At each frame end (glxSwapBuffers or eglSwapBuffers)


No differences found