summaryrefslogtreecommitdiff
path: root/tests/spirv/ptr-empty-struct.slang
diff options
context:
space:
mode:
Diffstat (limited to 'tests/spirv/ptr-empty-struct.slang')
-rw-r--r--tests/spirv/ptr-empty-struct.slang15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/spirv/ptr-empty-struct.slang b/tests/spirv/ptr-empty-struct.slang
new file mode 100644
index 000000000..56148592b
--- /dev/null
+++ b/tests/spirv/ptr-empty-struct.slang
@@ -0,0 +1,15 @@
+//TEST:SIMPLE(filecheck=CHECK): -target spirv
+
+// CHECK: OpPtrAccessChain
+
+struct EmptyStruct {
+};
+
+[vk::push_constant] EmptyStruct* pc;
+
+RWStructuredBuffer<int> outputBuffer;
+
+[numthreads(64)]
+void ComputeMain(uint tid: SV_DispatchThreadID) {
+ outputBuffer[tid] = ((int*)(pc))[0];
+} \ No newline at end of file