From: Caio Marcelo de Oliveira Filho Date: Fri, 5 Jun 2020 22:26:47 +0000 (-0700) Subject: nir: Fix printing execution scope of a scoped barrier X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b7a3821a5cdf158659b6453c9ca97bb92270263f;p=mesa.git nir: Fix printing execution scope of a scoped barrier Fixes: 345b5847b42 ("nir: Replace the scoped_memory barrier by a scoped_barrier") Reviewed-by: Jordan Justen Reviewed-by: Boris Brezillon Reviewed-by: Jason Ekstrand Part-of: --- diff --git a/src/compiler/nir/nir_print.c b/src/compiler/nir/nir_print.c index a7d1a9d7fef..c3efec8a692 100644 --- a/src/compiler/nir/nir_print.c +++ b/src/compiler/nir/nir_print.c @@ -900,7 +900,10 @@ print_intrinsic_instr(nir_intrinsic_instr *instr, print_state *state) case NIR_INTRINSIC_EXECUTION_SCOPE: case NIR_INTRINSIC_MEMORY_SCOPE: { fprintf(fp, " %s=", index_name[idx]); - switch (nir_intrinsic_memory_scope(instr)) { + nir_scope scope = + idx == NIR_INTRINSIC_MEMORY_SCOPE ? nir_intrinsic_memory_scope(instr) + : nir_intrinsic_execution_scope(instr); + switch (scope) { case NIR_SCOPE_NONE: fprintf(fp, "NONE"); break; case NIR_SCOPE_DEVICE: fprintf(fp, "DEVICE"); break; case NIR_SCOPE_QUEUE_FAMILY: fprintf(fp, "QUEUE_FAMILY"); break;