summaryrefslogtreecommitdiffstats
path: root/src/glsl/nir/nir_intrinsics.h
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2015-10-07 11:59:26 +0100
committerEmil Velikov <[email protected]>2015-10-30 17:22:32 +0000
commit7682844f34401f1d27c9c8f80eadbcb57286e7c4 (patch)
tree00b4170ba368ba0e3c0311bf9900256ca7dfe2db /src/glsl/nir/nir_intrinsics.h
parentf1d98fc90ab6f1f424b26a5d3b3ead3b8614069a (diff)
nir: add shader_clock intrinsic
v2: Add flags and inline comment/description. v3: None of the input/outputs are variables v4: Drop clockARB reference, relate code motion barrier comment wrt intrinsic flag. v5: Drop the "thus we can eliminate..." comment (Connor) Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Connor Abbott <[email protected]> Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/glsl/nir/nir_intrinsics.h')
-rw-r--r--src/glsl/nir/nir_intrinsics.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/glsl/nir/nir_intrinsics.h b/src/glsl/nir/nir_intrinsics.h
index c1fb1bad4bc..c2b6fe7166d 100644
--- a/src/glsl/nir/nir_intrinsics.h
+++ b/src/glsl/nir/nir_intrinsics.h
@@ -83,6 +83,14 @@ BARRIER(discard)
*/
BARRIER(memory_barrier)
+/*
+ * Shader clock intrinsic with semantics analogous to the clock2x32ARB()
+ * GLSL intrinsic.
+ * The latter can be used as code motion barrier, which is currently not
+ * feasible with NIR.
+ */
+INTRINSIC(shader_clock, 0, ARR(), true, 1, 0, 0, NIR_INTRINSIC_CAN_ELIMINATE)
+
/** A conditional discard, with a single boolean source. */
INTRINSIC(discard_if, 1, ARR(1), false, 0, 0, 0, 0)