summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2024-04-03 11:46:25 -0700
committerGitHub <noreply@github.com>2024-04-03 11:46:25 -0700
commit74d4c8ab92c1050865c421a64d9f5d3fc9a2da73 (patch)
treec0173f5e59ca2c7f418ecd1568a26a95aab26ff6 /tests
parente0de98e9aabbe118f0eeca7821518c8fb4e1f6c4 (diff)
Update glsl intrinsic for GroupMemoryBarrierWithGroupSync (#3890)
* Update glsl intrinsic for `GroupMemoryBarrierWithGroupSync`, * Add spirv tests for `GroupMemoryBarrierWithGroupSync`.
Diffstat (limited to 'tests')
-rw-r--r--tests/spirv/barrier.slang14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/spirv/barrier.slang b/tests/spirv/barrier.slang
new file mode 100644
index 000000000..769bf9b7e
--- /dev/null
+++ b/tests/spirv/barrier.slang
@@ -0,0 +1,14 @@
+//TEST:SIMPLE(filecheck=CHECK):-target spirv -emit-spirv-directly -O0
+//TEST:SIMPLE(filecheck=CHECK):-target spirv -emit-spirv-via-glsl -entry main -stage compute -O0
+
+RWStructuredBuffer<float> output;
+
+[numthreads(1,1,1)]
+[shader("compute")]
+void main()
+{
+ output[0] = 0;
+ // CHECK: OpControlBarrier %uint_2 %uint_2 %uint_264
+ GroupMemoryBarrierWithGroupSync();
+ output[1] = 0;
+} \ No newline at end of file