aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_intrinsics.h
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2017-06-22 16:43:24 -0700
committerMatt Turner <[email protected]>2017-07-20 16:56:49 -0700
commit636fe4d1c6b21e9efecd4bce1cedd67afa33343a (patch)
tree51bd27f34222120a09b51aad495d2d9cee9e6718 /src/compiler/nir/nir_intrinsics.h
parent41437f1b770101647d009529dd1f7b61c29a1ba8 (diff)
nir: Add intrinsics from ARB_shader_ballot
Reviewed-by: Connor Abbott <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir_intrinsics.h')
-rw-r--r--src/compiler/nir/nir_intrinsics.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_intrinsics.h b/src/compiler/nir/nir_intrinsics.h
index 8a838df0279..6c6ba4cf590 100644
--- a/src/compiler/nir/nir_intrinsics.h
+++ b/src/compiler/nir/nir_intrinsics.h
@@ -94,6 +94,19 @@ BARRIER(memory_barrier)
INTRINSIC(shader_clock, 0, ARR(0), true, 2, 0, 0, xx, xx, xx, NIR_INTRINSIC_CAN_ELIMINATE)
/*
+ * Shader ballot intrinsics with semantics analogous to the
+ *
+ * ballotARB()
+ * readInvocationARB()
+ * readFirstInvocationARB()
+ *
+ * GLSL functions from ARB_shader_ballot.
+ */
+INTRINSIC(ballot, 1, ARR(1), true, 1, 0, 0, xx, xx, xx, NIR_INTRINSIC_CAN_ELIMINATE)
+INTRINSIC(read_invocation, 2, ARR(0, 1), true, 0, 0, 0, xx, xx, xx, NIR_INTRINSIC_CAN_ELIMINATE)
+INTRINSIC(read_first_invocation, 1, ARR(0), true, 0, 0, 0, xx, xx, xx, NIR_INTRINSIC_CAN_ELIMINATE)
+
+/*
* Memory barrier with semantics analogous to the compute shader
* groupMemoryBarrier(), memoryBarrierAtomicCounter(), memoryBarrierBuffer(),
* memoryBarrierImage() and memoryBarrierShared() GLSL intrinsics.