<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 - PIPE_QUERY_GPU_FINISHED is not acting as expected on SI"
href="https://bugs.freedesktop.org/show_bug.cgi?id=89014">89014</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>PIPE_QUERY_GPU_FINISHED is not acting as expected on SI
</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/Gallium/radeonsi
</td>
</tr>
<tr>
<th>Assignee</th>
<td>dri-devel@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>axel.davy@ens.fr
</td>
</tr>
<tr>
<th>QA Contact</th>
<td>dri-devel@lists.freedesktop.org
</td>
</tr></table>
<p>
<div>
<pre>I put it as radeonsi bug, but it is probably r600 bug given the implementation
seems shared there.
Some d3d9 games do manual throttling as advised at the end of:
<a href="http://www.nvidia.com/object/General_FAQ.html#G4">http://www.nvidia.com/object/General_FAQ.html#G4</a>
"A second solution is to use DirectX 9's Asynchronous Query functionality
(analogous to using fences in OpenGL). At the end of your frame, insert a
D3DQUERYTYPE_EVENT query into your rendering stream. You can then poll whether
the GPU has reached this event yet by using GetData."
Games like Heroes V of Might and Magic uses two d3d9 event queries (mapped to
PIPE_QUERY_GPU_FINISHED) to do manual throttling:
end query A
loop until query B is OK (d3d9: loop on GetData /pipe: loop on
pipe->get_query_result)
render
present frame
end query B
loop until query A is OK
render
present frame
etc
Only old apps seems to do this manual throttling, as likely recent drivers do
it automatically, like Mesa.
Both Gallium Nine and Wine get poor performance with this scheme and get same
performance (and is the same performance than by forcing a glfinish)
Not advertising the query under Gallium Nine gives a enormous performance boost
to the app. Similarly advertising the query, but not using
PIPE_QUERY_GPU_FINISHED but rather a custom implementation with pipe fences,
gives the correct performance.
In both cases, forcing glFinish gives the same bad performance than before.
Thus PIPE_QUERY_GPU_FINISHED implementation seems to have a bug that makes it
acts as glFinish instead of just waiting what was before the end query is
rendered.
What seems strange is that Wine uses ARB_sync to implement the query, and it
doesn't seem to be implemented in Mesa with PIPE_QUERY_GPU_FINISHED.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>