<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED - Invalid imageAtomicExchange() writes."
href="https://bugs.freedesktop.org/show_bug.cgi?id=106390#c10">Comment # 10</a>
on <a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED - Invalid imageAtomicExchange() writes."
href="https://bugs.freedesktop.org/show_bug.cgi?id=106390">bug 106390</a>
from <span class="vcard"><a class="email" href="mailto:denys.kostin@globallogic.com" title="Denis <denys.kostin@globallogic.com>"> <span class="fn">Denis</span></a>
</span></b>
<pre>Created <span class=""><a href="attachment.cgi?id=142211" name="attach_142211" title="denys_expected">attachment 142211</a> <a href="attachment.cgi?id=142211&action=edit" title="denys_expected">[details]</a></span>
denys_expected
hi guys. I tested last attachment from Alexander on radeon and intel. Found
out, that on radeon test looks without visible squads (on the right part of the
picture). See attachment "denys_expected" with my "expected" output.
Then I checked old mesa versions and found out, that the same picture I can see
on 13.0.6 mesa. Below there is a result of bisection (tested on SKL and KBL):
9919542f1cfff70524bc6117d19bf88e59159caa is the first bad commit
commit 9919542f1cfff70524bc6117d19bf88e59159caa
Author: Kenneth Graunke <<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>>
Date: Sat Jan 14 23:32:12 2017 -0800
i965: Make DCE set null destinations on messages with side effects.
(Co-authored by Matt Turner.)
Image atomics, for example, return a value - but the shader may not
want to use it. We assigned a useless VGRF destination. This seemed
harmless, but it can actually be quite harmful. The register allocator
has to assign that VGRF to a real register. It may assign the same
actual GRF to the destination of an instruction that follows soon after.
This results in a write-after-write (WAW) dependency, and stall.
A number of "Deus Ex: Mankind Divided" shaders use image atomics, but
don't use the return value. Several of these were hitting WAW stalls
for nearly 14,000 (poorly estimated) cycles a pop. Making dead code
elimination null out the destination avoids this issue.
This patch cuts one shader's estimated cycles by -98.39%! Removing the
message response should also help with data cluster bandwidth.
On Skylake:
(instruction counts remain identical)
total cycles in shared programs: 255413890 -> 248081010 (-2.87%)
cycles in affected programs: 12019948 -> 4687068 (-61.01%)
helped: 24
HURT: 10
v2: Make can_omit_write independent of can_eliminate (Curro).
Signed-off-by: Kenneth Graunke <<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>>
Reviewed-by: Francisco Jerez <<a href="mailto:currojerez@riseup.net">currojerez@riseup.net</a>>
Reviewed-by: Matt Turner <<a href="mailto:mattst88@gmail.com">mattst88@gmail.com</a>>
:040000 040000 d3ac50f716bb55e2919ea2a8098656be67dffdc4
9763545331f08faf330b432997836bbcdce7e8c1 M src</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>