<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 - [PERF] Updating ubo offset via vkCmdBindDescriptorSets is causing flush that is taking 50% of rendering time"
href="https://bugs.freedesktop.org/show_bug.cgi?id=105695">105695</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[PERF] Updating ubo offset via vkCmdBindDescriptorSets is causing flush that is taking 50% of rendering time
</td>
</tr>
<tr>
<th>Product</th>
<td>Mesa
</td>
</tr>
<tr>
<th>Version</th>
<td>git
</td>
</tr>
<tr>
<th>Hardware</th>
<td>x86-64 (AMD64)
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux (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/Vulkan/intel
</td>
</tr>
<tr>
<th>Assignee</th>
<td>intel-3d-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>ytriffy@gmail.com
</td>
</tr>
<tr>
<th>QA Contact</th>
<td>intel-3d-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>CC</th>
<td>jason@jlekstrand.net
</td>
</tr></table>
<p>
<div>
<pre>I do vkCmdBindDescriptorSets per draw call to change transformation matrix of
an object. Basically I change only one number - offset into dynamic ubo. Then I
call vkCmdDrawIndexed and it calls gen9_cmd_buffer_flush_state that amounts to
50% of rendering time (in terms of instr fetch metric). I dig deeper and find
two culprits: flush_descriptor_sets, cmd_buffer_flush_push_constants. And I
don't even use push constants, I prefer dynamic ubos. Emitting binding tables
is huge amount of work (23% of total rendering time). I don't understand why so
much work has to be done just to change offset in memory. And this is the most
popular usecase - everyone wants to change matrix per object. My opengl
implementation is 2 times faster than this. Are there any plans on improving
performance in that area?
I got this data from valgrind profiling:
<a href="https://www.dropbox.com/s/wsri01x69kwciyo/callgrind.cullingvk_ubo.out?dl=0">https://www.dropbox.com/s/wsri01x69kwciyo/callgrind.cullingvk_ubo.out?dl=0</a></pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>