[Mesa-dev] [PATCH 5/5] nir: Translate memory barrier intrinsics from GLSL IR.

Francisco Jerez currojerez at riseup.net
Tue May 5 13:29:56 PDT 2015


---
 src/glsl/nir/glsl_to_nir.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/glsl/nir/glsl_to_nir.cpp b/src/glsl/nir/glsl_to_nir.cpp
index a01ab3b..b4ab4ee 100644
--- a/src/glsl/nir/glsl_to_nir.cpp
+++ b/src/glsl/nir/glsl_to_nir.cpp
@@ -634,6 +634,8 @@ nir_visitor::visit(ir_call *ir)
          op = nir_intrinsic_image_atomic_exchange;
       } else if (strcmp(ir->callee_name(), "__intrinsic_image_atomic_comp_swap") == 0) {
          op = nir_intrinsic_image_atomic_comp_swap;
+      } else if (strcmp(ir->callee_name(), "__intrinsic_memory_barrier") == 0) {
+         op = nir_intrinsic_memory_barrier;
       } else {
          unreachable("not reached");
       }
@@ -720,6 +722,8 @@ nir_visitor::visit(ir_call *ir)
                               ir->return_deref->type->vector_elements, NULL);
          break;
       }
+      case nir_intrinsic_memory_barrier:
+         break;
       default:
          unreachable("not reached");
       }
-- 
2.3.5



More information about the mesa-dev mailing list