Module: Mesa Branch: main Commit: eeb67362daea989281f5a6235b7bc08d06cafca7 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=eeb67362daea989281f5a6235b7bc08d06cafca7
Author: Jesse Natalie <[email protected]> Date: Thu Mar 30 13:24:14 2023 -0700 microsoft/compiler: Fix barrier for wave ID computation Fixes: 2f8a8b59 ("microsoft/compiler: Add lowering passes for basic subgroup vars") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22225> --- src/microsoft/compiler/dxil_nir.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/microsoft/compiler/dxil_nir.c b/src/microsoft/compiler/dxil_nir.c index b671bc2533c..fa2eb350a63 100644 --- a/src/microsoft/compiler/dxil_nir.c +++ b/src/microsoft/compiler/dxil_nir.c @@ -2074,7 +2074,11 @@ lower_subgroup_id(nir_builder *b, nir_instr *instr, void *data) nir_store_deref(b, counter_deref, nir_imm_int(b, 0), 1); nir_pop_if(b, nif); - nir_scoped_memory_barrier(b, NIR_SCOPE_WORKGROUP, NIR_MEMORY_ACQ_REL, nir_var_mem_shared); + nir_scoped_barrier(b, + .execution_scope = NIR_SCOPE_WORKGROUP, + .memory_scope = NIR_SCOPE_WORKGROUP, + .memory_semantics = NIR_MEMORY_ACQ_REL, + .memory_modes = nir_var_mem_shared); nif = nir_push_if(b, nir_elect(b, 1)); nir_ssa_def *subgroup_id_first_thread = nir_deref_atomic_add(b, 32, &counter_deref->dest.ssa, nir_imm_int(b, 1));
