aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaio Marcelo de Oliveira Filho <[email protected]>2020-06-05 15:26:47 -0700
committerMarge Bot <[email protected]>2020-06-08 15:49:24 +0000
commitb7a3821a5cdf158659b6453c9ca97bb92270263f (patch)
treee7c4c524df959e9bca85ec0bfe80cd050fedfcfd
parent7ec25820875ff1da0c2f5dab60cf5dda9eb51d30 (diff)
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 <[email protected]> Reviewed-by: Boris Brezillon <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5365>
-rw-r--r--src/compiler/nir/nir_print.c5
1 files changed, 4 insertions, 1 deletions
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;