<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - [amdgpu] Rocket League: long hangs (several seconds) when loading assets (models/textures/shaders?)"
href="https://bugs.freedesktop.org/show_bug.cgi?id=97879#c81">Comment # 81</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - [amdgpu] Rocket League: long hangs (several seconds) when loading assets (models/textures/shaders?)"
href="https://bugs.freedesktop.org/show_bug.cgi?id=97879">bug 97879</a>
from <span class="vcard"><a class="email" href="mailto:maraeo@gmail.com" title="Marek Olšák <maraeo@gmail.com>"> <span class="fn">Marek Olšák</span></a>
</span></b>
<pre>I merged a different patch that just improves GL_MAP_READ_BIT and returns a
mapping with CPU caches enabled, with the downside that it does a copy from the
uncached buffer into a cached temporary buffer, maps that, and if
GL_MAP_WRITE_BIT is set, the temporary buffer is copied into the original
buffer on unmap.
The reason GPU drivers prefer uncached allocations is that the GPU access to
the buffer is faster while the CPU access is slower (except for sequential
writes). If we enabled caching, the GPU access would be slower, but the CPU
access would be faster. Or we could have 2 buffers and do copying back and
forth like for GL_MAP_READ_BIT, but again the copy also isn't free and it's
worse if you have to do 2 copies - one in Map and the other in Unmap.
The malloc + memcpy solution on the app side is probably the best one.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>