diff options
Diffstat (limited to 'src/compiler/spirv/spirv_to_nir.c')
-rw-r--r-- | src/compiler/spirv/spirv_to_nir.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c index 1a5d4c7988d..71957da235b 100644 --- a/src/compiler/spirv/spirv_to_nir.c +++ b/src/compiler/spirv/spirv_to_nir.c @@ -3391,13 +3391,13 @@ vtn_handle_barrier(struct vtn_builder *b, SpvOp opcode, } case SpvOpControlBarrier: { - SpvScope execution_scope = vtn_constant_uint(b, w[1]); - if (execution_scope == SpvScopeWorkgroup) - vtn_emit_barrier(b, nir_intrinsic_barrier); - SpvScope memory_scope = vtn_constant_uint(b, w[2]); SpvMemorySemanticsMask memory_semantics = vtn_constant_uint(b, w[3]); vtn_emit_memory_barrier(b, memory_scope, memory_semantics); + + SpvScope execution_scope = vtn_constant_uint(b, w[1]); + if (execution_scope == SpvScopeWorkgroup) + vtn_emit_barrier(b, nir_intrinsic_barrier); break; } |