summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs/gh-4533.slang20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/bugs/gh-4533.slang b/tests/bugs/gh-4533.slang
new file mode 100644
index 000000000..3ee27996b
--- /dev/null
+++ b/tests/bugs/gh-4533.slang
@@ -0,0 +1,20 @@
+//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -use-dxil
+//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk
+//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-mtl
+//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu
+//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cuda
+
+// CHECK: 0
+// CHECK-NEXT: 1
+// CHECK-NEXT: 1
+// CHECK-NEXT: 1
+
+//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer
+RWStructuredBuffer<uint> outputBuffer;
+
+[numthreads(4, 1, 1)]
+void computeMain(uint tid : SV_GroupIndex)
+{
+ vector<float,1> k = float1(tid);
+ outputBuffer[tid] = all(k) && any(k) && bool(asint(k)) && bool(asuint(k));
+}