nir: Add memory barrier intrinsic.
authorFrancisco Jerez <currojerez@riseup.net>
Tue, 5 May 2015 20:00:51 +0000 (23:00 +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/nir_intrinsics.h

index 2a0df2be02563b8f93028d66f60c46195f8187df..10192c5315ce1de3ab37f217f4e750be70fe5333 100644 (file)
@@ -68,6 +68,13 @@ INTRINSIC(interp_var_at_offset, 1, ARR(2), true, 0, 1, 0,
 #define BARRIER(name) INTRINSIC(name, 0, ARR(), false, 0, 0, 0, 0)
 
 BARRIER(discard)
+
+/*
+ * Memory barrier with semantics analogous to the memoryBarrier() GLSL
+ * intrinsic.
+ */
+BARRIER(memory_barrier)
+
 /** A conditional discard, with a single boolean source. */
 INTRINSIC(discard_if, 1, ARR(1), false, 0, 0, 0, 0)