From: Caio Marcelo de Oliveira Filho Date: Sat, 6 Jun 2020 06:05:42 +0000 (-0700) Subject: nir: Fix logic that ends combine barrier sequence X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d1f6d2f3e8683f10773e7b349ab4ff6f181233a6;p=mesa.git 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: --- 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; }