From d1f6d2f3e8683f10773e7b349ab4ff6f181233a6 Mon Sep 17 00:00:00 2001 From: Caio Marcelo de Oliveira Filho Date: Fri, 5 Jun 2020 23:05:42 -0700 Subject: [PATCH] nir: Fix logic that ends combine barrier sequence The combination must stop when we see a scoped barrier that have execution scope, i.e. it has control barrier behavior. The code was mistakenly looking at the wrong scope. Fixes: 345b5847b42 ("nir: Replace the scoped_memory barrier by a scoped_barrier") Reviewed-by: Boris Brezillon Reviewed-by: Jason Ekstrand Part-of: --- src/compiler/nir/nir_opt_barriers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/nir/nir_opt_barriers.c b/src/compiler/nir/nir_opt_barriers.c index 609cbc0afdc..49ab10511f8 100644 --- a/src/compiler/nir/nir_opt_barriers.c +++ b/src/compiler/nir/nir_opt_barriers.c @@ -40,7 +40,7 @@ nir_opt_combine_memory_barriers_impl( nir_intrinsic_instr *current = nir_instr_as_intrinsic(instr); if (current->intrinsic != nir_intrinsic_scoped_barrier || - nir_intrinsic_memory_scope(current) != NIR_SCOPE_NONE) { + nir_intrinsic_execution_scope(current) != NIR_SCOPE_NONE) { prev = NULL; continue; } -- 2.30.2