<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 - Certain uses of atomic operations causes infinite loop due to helper invocations"
href="https://bugs.freedesktop.org/show_bug.cgi?id=106902">106902</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Certain uses of atomic operations causes infinite loop due to helper invocations
</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>intel-3d-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>caio.oliveira@intel.com
</td>
</tr>
<tr>
<th>QA Contact</th>
<td>intel-3d-bugs@lists.freedesktop.org
</td>
</tr></table>
<p>
<div>
<pre>Certain uses of atomic operations, e.g. open coding atomicAdd by using a loop
with loads and atomicCompSwaps, will not work when executed in helper
invocations, leading to infinite loops.
layout(binding = 0) buffer bufblock {
int value;
};
...
int f;
/* This is an open-coded atomicAdd. */
do {
f = value;
} while (f != atomicCompSwap(value, f, f + 4));
This code can lead to hangs, since a helper invocation will loop indefinetely,
because atomicCompSwap don't write anything and might return junk while the "f
= value" reads an real value.
"Atomic operations to image, buffer, or atomic counter variables performed by
helper invocations have no effect on the underlying image or buffer memory. The
values returned by such atomic operations are undefined."
<a href="https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/gl_HelperInvocation.xhtml">https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/gl_HelperInvocation.xhtml</a>
Full shader codeis available in attachment of bug
<a class="bz_bug_link
bz_status_NEW "
title="NEW - GLSL IR copy propagates loads of SSBOs"
href="show_bug.cgi?id=106774">https://bugs.freedesktop.org/show_bug.cgi?id=106774</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>