summaryrefslogtreecommitdiff
path: root/tests/hlsl
diff options
context:
space:
mode:
Diffstat (limited to 'tests/hlsl')
-rw-r--r--tests/hlsl/wave-size.slang13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/hlsl/wave-size.slang b/tests/hlsl/wave-size.slang
new file mode 100644
index 000000000..3fc6363c4
--- /dev/null
+++ b/tests/hlsl/wave-size.slang
@@ -0,0 +1,13 @@
+//TEST:SIMPLE(filecheck=CHECK): -target hlsl -stage compute -entry computeMain
+
+//TEST_INPUT:ubuffer(data=[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0], stride=4):out,name=outputBuffer
+RWStructuredBuffer<int> outputBuffer;
+
+// CHECK: [WaveSize(4)]
+[WaveSize(4)]
+[numthreads(4, 1, 1)]
+void computeMain(int3 dispatchThreadID : SV_DispatchThreadID)
+{
+ int tid = dispatchThreadID.x;
+ outputBuffer[tid] = tid;
+}