]> git.cworth.org Git - apitrace/commit
glretrace: Use GL_TIMESTAMP (if available) for CPU profiling.
authorCarl Worth <cworth@cworth.org>
Thu, 15 Nov 2012 18:51:01 +0000 (10:51 -0800)
committerJosé Fonseca <jose.r.fonseca@gmail.com>
Sat, 8 Dec 2012 12:51:23 +0000 (12:51 +0000)
commita21f3abf7ad16cb952cbc7b64416c93707d54202
treec4899f9f6ce0f642801884ed5d55ae6b20c13254
parenta4bcf6ae9c4988600a7c4b5b8f9ee37528f342d4
glretrace: Use GL_TIMESTAMP (if available) for CPU profiling.

The prior scheme of trying to continuously re-synchronize separate CPU
and GPU counters is doomed to always be unreliable. Instead, simply prefer
to use the GL_TIMESTAMP values for both GPU and for CPU profiling.

v2: José Fonseca: use glGet(GL_TIMESTAMP)
retrace/glretrace_main.cpp