[Bug 106902] Certain uses of atomic operations causes infinite loop due to helper invocations
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Tue Jun 12 18:57:18 UTC 2018
https://bugs.freedesktop.org/show_bug.cgi?id=106902
Bug ID: 106902
Summary: Certain uses of atomic operations causes infinite loop
due to helper invocations
Product: Mesa
Version: git
Hardware: Other
OS: All
Status: NEW
Severity: normal
Priority: medium
Component: Drivers/DRI/i965
Assignee: intel-3d-bugs at lists.freedesktop.org
Reporter: caio.oliveira at intel.com
QA Contact: intel-3d-bugs at lists.freedesktop.org
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."
https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/gl_HelperInvocation.xhtml
Full shader codeis available in attachment of bug
https://bugs.freedesktop.org/show_bug.cgi?id=106774.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20180612/107a654c/attachment.html>
More information about the intel-3d-bugs
mailing list