nir: Translate memory barrier intrinsics from GLSL IR.
authorFrancisco Jerez <currojerez@riseup.net>
Tue, 5 May 2015 20:10:56 +0000 (23:10 +0300)
committerFrancisco Jerez <currojerez@riseup.net>
Tue, 12 May 2015 12:47:57 +0000 (15:47 +0300)
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/glsl/nir/glsl_to_nir.cpp

index ff9c9b4a9e7cfe4efd1330715333fbb41c2aa369..af758ceb020e10cb9b39ad4224837f66b2f08564 100644 (file)
@@ -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");
       }
@@ -721,6 +723,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");
       }