<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - GL_TIME_ELAPSED queries should perhaps only count the current context?"
href="https://bugs.freedesktop.org/show_bug.cgi?id=98118">98118</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>GL_TIME_ELAPSED queries should perhaps only count the current context?
</td>
</tr>
<tr>
<th>Product</th>
<td>Mesa
</td>
</tr>
<tr>
<th>Version</th>
<td>git
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>Drivers/DRI/i965
</td>
</tr>
<tr>
<th>Assignee</th>
<td>idr@freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>kenneth@whitecape.org
</td>
</tr>
<tr>
<th>QA Contact</th>
<td>intel-3d-bugs@lists.freedesktop.org
</td>
</tr></table>
<p>
<div>
<pre>There's some debate about whether TIME_ELAPSED should only contain the time
spent in the current GL context's drawing, or if it should be a total wall
time, including time when the GPU was off processing some other application's
work.
<anholt> Kayden: so, i965's behavior really confused a developer trying to use
GL_TIME_ELAPSED last night -- it doesn't bracket the batchbuffer, so his
rendering randomly gets spikes of overhead from other clients' batchbuffers
being counted.
<Kayden> anholt: isn't that how the query is supposed to work, though?
<anholt> Kayden: I don't think so
<anholt> I think the resolution text was intending to say "this is mesauring
time elapsed on gpu, not the time between when you start the query and when
commands are done."
<anholt> they're pretty unclear
<anholt> but I can't see how the current behavior could be useful
<anholt> if you wanted to know whole-system timelines, you'd be using
timestamps on the cpu and gpu side. you're using elapsed because you want to
know how much gpu time was spent.
<a href="https://cvs.khronos.org/bugzilla/show_bug.cgi?id=5790#c2">https://cvs.khronos.org/bugzilla/show_bug.cgi?id=5790#c2</a> is interesting. It
looks like there was originally intended to be language indicating the timer
should be "paused" if the GL was "interrupted", but nobody was quite sure what
"interrupted" meant. The timer was meant to report the true run time of GL.
I think both implementations are legal. We currently do the wall-time one,
which is cheaper, but it might be more useful if we bookended batch buffers.
With MI_MATH this would be pretty straightforward. On earlier platforms it
would be somewhat irritating.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>