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>
(cherry picked from commit 21f8410191)
This commit is contained in:
Rhys Perry 2024-06-14 18:02:58 +01:00 committed by Eric Engestrom
parent dc0192e713
commit 8a6c8086ea
2 changed files with 3 additions and 1 deletions

View file

@ -1794,7 +1794,7 @@
"description": "vtn: ensure TCS control barriers have a large enough memory scope",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -4476,6 +4476,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,