<div>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.<br><br>&gt;&gt;&gt;My idea was to have glretrace output the timings to stdout in a TSV format like:<br>


&gt;&gt;&gt;# call no    function name    cpu start   cpu stop    gpu start    gpu stop<br>
&gt;&gt;&gt;50 glDrawArrays 1.4  1.5     2.4 2.5<br>
&gt;&gt;&gt; ...<br>
&gt;&gt;&gt;The GUI could then use this to produce a joint visualization of both<br>&gt;&gt;&gt;cpu and gpu timelines.<br>
&gt;&gt; As gpu executes the gl commands asynchronously, I didn&#39;t find a way to query<br>
&gt;&gt; the gpu start time.<br>
&gt;&gt; Is there any way to query the gpu start/stop time per gl call?<br>
<br>
</div><a href="http://www.opengl.org/registry/specs/ARB/timer_query.txt" target="_blank">&gt;http://www.opengl.org/registry/specs/ARB/timer_query.txt</a> has example<br>
&gt;code for that, namely example 2.<br><br>
Thanks for the link. glQueryCounter() is a useful function, but ARB_timer_query is not currently supported on Mesa.<br>OpenGL version string on my system: 2.1 Mesa 7.12-devel (git-3996ed5)<br>This version only supports EXT_timer_query which doesn&#39;t implement glQueryCounter().<br>

<a href="http://www.opengl.org/registry/specs/EXT/timer_query.txt">http://www.opengl.org/registry/specs/EXT/timer_query.txt</a><br>I am getting a segfault when tried using glQueryCounter() with Mesa.<br><br>
&gt;Of course, durations are quite useful. But having absolute times would<br>
&gt;enable pretty graphs on Qt gui.<br>True<br><br>Thanks<br>Anuj<br>