]> git.cworth.org Git - fips/commit
Don't print a frame-time report for the first frame after glXMakeCurrent
authorCarl Worth <cworth@cworth.org>
Tue, 12 Nov 2013 22:03:40 +0000 (14:03 -0800)
committerCarl Worth <cworth@cworth.org>
Tue, 12 Nov 2013 22:03:40 +0000 (14:03 -0800)
commitf450c677e794d6bc46409332c8515e64977f1eb7
tree4abfa499afc20e36b6c20ba8738c79314c3e89c1
parent39b71bb28a1ea89b694fe12f1d2d0e914ae528d7
Don't print a frame-time report for the first frame after glXMakeCurrent

Fips was already dropping the first frame's report (waiting for
another frame to go by to ensure that all the queries are available in
order to compute deltas).

But we were getting wildly out-of-range frame timings for later frames
when the application switched contexts, (since fips was subtracting
query values obtained in one context frome value obtained in another
context). We fix this by dropping one frame-time report at every
context change.

We may very well want to use a different time source to obtain frame
times, since (for DOTA 2 at least) the reports from the dropped frames
would be particularly interesting to see (such as large frames
compiling many shaders or uploading a lot of texture data).

At least we're no longer getting the wild numbers that throw off the
graph scale so badly.
metrics.c