summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/hlsl/simple/globallycoherent.hlsl20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/hlsl/simple/globallycoherent.hlsl b/tests/hlsl/simple/globallycoherent.hlsl
new file mode 100644
index 000000000..70b5cdb2b
--- /dev/null
+++ b/tests/hlsl/simple/globallycoherent.hlsl
@@ -0,0 +1,20 @@
+//TEST:COMPARE_HLSL:-profile cs_5_0
+
+// Check output for `globallycoherent`
+
+#ifndef __SLANG__
+#define gBuffer gBuffer_0
+#define SV_DispatchThreadID SV_DISPATCHTHREADID
+#endif
+
+globallycoherent
+RWStructuredBuffer<uint> gBuffer : register(u0);
+
+[numthreads(16,1,1)]
+void main(
+ uint tid : SV_DispatchThreadID)
+{
+ uint index = tid;
+
+ gBuffer[index] = gBuffer[index + 1];
+}