Module: Mesa Branch: staging/23.0 Commit: a5af95b4a19ea4343b057d108524d44d2da627bc URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a5af95b4a19ea4343b057d108524d44d2da627bc
Author: Caio Oliveira <[email protected]> Date: Sun Feb 26 20:59:05 2023 -0800 gallivm: Fix handling of nir_intrinsic_scoped_barrier A scoped barrier only has a control barrier behavior if there's an execution scope. Fixes: 13d900de0dcf ("llvmpipe: set nir_shader_compiler_options::use_scoped_barrier") Reviewed-by: Faith Ekstrand <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3339> (cherry picked from commit 2178a8da51fee6dc266541c468de58e66b7b0e17) --- .pick_status.json | 2 +- src/gallium/auxiliary/gallivm/lp_bld_nir.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 87ba601bb47..a653278c722 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -976,7 +976,7 @@ "description": "gallivm: Fix handling of nir_intrinsic_scoped_barrier", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "13d900de0dcf7885972100f2ad36a6bc5cc0eeb1" }, diff --git a/src/gallium/auxiliary/gallivm/lp_bld_nir.c b/src/gallium/auxiliary/gallivm/lp_bld_nir.c index 3fe4629be5e..966541ea4f8 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_nir.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_nir.c @@ -2143,9 +2143,12 @@ visit_intrinsic(struct lp_build_nir_context *bld_base, visit_shared_atomic(bld_base, instr, result); break; case nir_intrinsic_control_barrier: - case nir_intrinsic_scoped_barrier: visit_barrier(bld_base); break; + case nir_intrinsic_scoped_barrier: + if (nir_intrinsic_execution_scope(instr) != NIR_SCOPE_NONE) + visit_barrier(bld_base); + break; case nir_intrinsic_group_memory_barrier: case nir_intrinsic_memory_barrier: case nir_intrinsic_memory_barrier_shared:
