Module: Mesa Branch: main Commit: dd92fd8fcc983f113b0af8c49024eb21d971a51f URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=dd92fd8fcc983f113b0af8c49024eb21d971a51f
Author: Kenneth Graunke <[email protected]> Date: Thu Aug 31 15:29:54 2023 -0700 lavapipe: Don't delete control barriers Control barriers still need to do synchronization even if there are no associated memory barrier modes. Reviewed-by: Mike Blumenkrantz <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24842> --- src/gallium/frontends/lavapipe/lvp_pipeline.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/frontends/lavapipe/lvp_pipeline.c b/src/gallium/frontends/lavapipe/lvp_pipeline.c index 0d8a55bf5be..7942496bf70 100644 --- a/src/gallium/frontends/lavapipe/lvp_pipeline.c +++ b/src/gallium/frontends/lavapipe/lvp_pipeline.c @@ -138,6 +138,9 @@ remove_barriers_impl(nir_builder *b, nir_intrinsic_instr *intr, void *data) if (intr->intrinsic != nir_intrinsic_barrier) return false; if (data) { + if (nir_intrinsic_execution_scope(intr) != SCOPE_NONE) + return false; + if (nir_intrinsic_memory_scope(intr) == SCOPE_WORKGROUP || nir_intrinsic_memory_scope(intr) == SCOPE_DEVICE || nir_intrinsic_memory_scope(intr) == SCOPE_QUEUE_FAMILY)
