[PATCH] Retrace: Add per frame timing

Anuj Phogat anuj.phogat at gmail.com
Wed Nov 2 13:03:47 PDT 2011


I have sent patch in a separate thread cpu/gpu timing. I will soon figure
out the way to reply on existing therad using git send-e-mail.

>>>My idea was to have glretrace output the timings to stdout in a TSV
format like:
>>># call no    function name    cpu start   cpu stop    gpu start    gpu
stop
>>>50 glDrawArrays 1.4  1.5     2.4 2.5
>>> ...
>>>The GUI could then use this to produce a joint visualization of both
>>>cpu and gpu timelines.
>> As gpu executes the gl commands asynchronously, I didn't find a way to
query
>> the gpu start time.
>> Is there any way to query the gpu start/stop time per gl call?

>http://www.opengl.org/registry/specs/ARB/timer_query.txt<http://www.opengl.org/registry/specs/ARB/timer_query.txt>has example
>code for that, namely example 2.

Thanks for the link. glQueryCounter() is a useful function, but
ARB_timer_query is not currently supported on Mesa.
OpenGL version string on my system: 2.1 Mesa 7.12-devel (git-3996ed5)
This version only supports EXT_timer_query which doesn't implement
glQueryCounter().
http://www.opengl.org/registry/specs/EXT/timer_query.txt
I am getting a segfault when tried using glQueryCounter() with Mesa.

>Of course, durations are quite useful. But having absolute times would
>enable pretty graphs on Qt gui.
True

Thanks
Anuj
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/apitrace/attachments/20111102/b67e66d0/attachment.htm>


More information about the apitrace mailing list