Module: Mesa
Branch: master
Commit: b7a3821a5cdf158659b6453c9ca97bb92270263f
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=b7a3821a5cdf158659b6453c9ca97bb92270263f

Author: Caio Marcelo de Oliveira Filho <[email protected]>
Date:   Fri Jun  5 15:26:47 2020 -0700

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>

---

 src/compiler/nir/nir_print.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

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;

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to