vtn: ensure TCS control barriers have a large enough memory scope

A workgroup or larger scope is necessary for writes to be visible to other
invocations.

Fixes incorrect snow rendering in Indika.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11299
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29735>
This commit is contained in:
Rhys Perry 2024-06-14 18:02:58 +01:00 committed by Marge Bot
parent da752ed7c1
commit 21f8410191

View file

@ -4709,6 +4709,8 @@ vtn_handle_barrier(struct vtn_builder *b, SpvOp opcode,
SpvMemorySemanticsSequentiallyConsistentMask);
memory_semantics |= SpvMemorySemanticsAcquireReleaseMask |
SpvMemorySemanticsOutputMemoryMask;
if (memory_scope == SpvScopeSubgroup || memory_scope == SpvScopeInvocation)
memory_scope = SpvScopeWorkgroup;
}
vtn_emit_scoped_control_barrier(b, execution_scope, memory_scope,