summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs/gh-3795.slang24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/bugs/gh-3795.slang b/tests/bugs/gh-3795.slang
new file mode 100644
index 000000000..4030c565a
--- /dev/null
+++ b/tests/bugs/gh-3795.slang
@@ -0,0 +1,24 @@
+//TEST:SIMPLE(filecheck=CHECK): -target spirv -emit-spirv-directly
+
+// CHECK: OpEntryPoint
+
+struct Tester
+{
+ uint values[2];
+};
+
+struct TestPush
+{
+ Tester* src;
+ uint* dst;
+};
+
+[[vk::push_constant]] TestPush test_p;
+
+[shader("compute")]
+[numthreads(1,1,1)]
+void main(uint3 dtid : SV_DispatchThreadID)
+{
+ uint value = test_p.src.values[0];
+ *test_p.dst = value;
+}