You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just have a minor concern/question regarding the memory barriers in the HLSL and GLSL versions. In HLSL, you call GroupMemoryBarrierWithGroupSync(), but in GLSL you only call barrier(). I believe the GLSL corresponding pattern to GroupMemoryBarrierWithGroupSync() is actually a groupMemoryBarrier() + barrier(), as the first guards against memory writes and the second thread.
It's not entirely clear from the spec if a groupMemoryBarrier() blocks execution as well, or if a barrier() also blocks memory writes, but I used this https://anteru.net/blog/2016/mapping-between-HLSL-and-GLSL/ as my reference point and it solved many similar issues on different vendors before.
However be wary, there seems to be an issue with nvidia GPUs in the 20xx-30xx range with this shader when running with both barriers as suggested by the reference - resulting in a GPU hang.
The text was updated successfully, but these errors were encountered:
Hi!
I just have a minor concern/question regarding the memory barriers in the HLSL and GLSL versions. In HLSL, you call GroupMemoryBarrierWithGroupSync(), but in GLSL you only call barrier(). I believe the GLSL corresponding pattern to GroupMemoryBarrierWithGroupSync() is actually a groupMemoryBarrier() + barrier(), as the first guards against memory writes and the second thread.
It's not entirely clear from the spec if a groupMemoryBarrier() blocks execution as well, or if a barrier() also blocks memory writes, but I used this https://anteru.net/blog/2016/mapping-between-HLSL-and-GLSL/ as my reference point and it solved many similar issues on different vendors before.
However be wary, there seems to be an issue with nvidia GPUs in the 20xx-30xx range with this shader when running with both barriers as suggested by the reference - resulting in a GPU hang.
The text was updated successfully, but these errors were encountered: