zink: apply all storage memory masks to control barriers if no modes are specified

fixes VUID-StandaloneSpirv-OpControlBarrier-04650 errors

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27827>
(cherry picked from commit 701ee4be91)
This commit is contained in:
Mike Blumenkrantz 2024-02-16 11:54:32 -05:00 committed by Eric Engestrom
parent 2d0f20b40c
commit 335c32a168
2 changed files with 6 additions and 1 deletions

View File

@ -4414,7 +4414,7 @@
"description": "zink: apply all storage memory masks to control barriers if no modes are specified",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View File

@ -3208,6 +3208,11 @@ emit_barrier(struct ntv_context *ctx, nir_intrinsic_instr *intr)
if (modes & (nir_var_shader_out | nir_var_mem_task_payload))
semantics |= SpvMemorySemanticsOutputMemoryMask;
if (!modes)
semantics = SpvMemorySemanticsWorkgroupMemoryMask |
SpvMemorySemanticsUniformMemoryMask |
SpvMemorySemanticsImageMemoryMask |
SpvMemorySemanticsCrossWorkgroupMemoryMask;
semantics |= SpvMemorySemanticsAcquireReleaseMask;
}