summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs/gh-8659.slang16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/bugs/gh-8659.slang b/tests/bugs/gh-8659.slang
new file mode 100644
index 000000000..599c09b3b
--- /dev/null
+++ b/tests/bugs/gh-8659.slang
@@ -0,0 +1,16 @@
+//TEST:COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly
+
+//TEST_INPUT: set ptr = ubuffer(data=[0 0 0 0], stride=4)
+uniform uint* ptr;
+
+//TEST_INPUT: set outputBuffer = out ubuffer(data=[0 0 0 0], stride=4)
+RWStructuredBuffer<uint> outputBuffer;
+
+[numthreads(1,1,1)]
+void computeMain()
+{
+ let indices = (uint*)&ptr[0];
+ *indices = 100;
+ // CHECK: 100
+ outputBuffer[0] = ptr[0];
+} \ No newline at end of file