summaryrefslogtreecommitdiffstats
path: root/tests/bugs
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2024-03-19 17:02:02 -0700
committerGitHub <noreply@github.com>2024-03-19 17:02:02 -0700
commit05f403be96f0d991a3ef949e5a6a6fb3b416e1ff (patch)
tree736a0d352ddea742ab77401091ab9134e60f23e2 /tests/bugs
parent2b55de9263dc594fd2b037b7f3e3727f9a3ce9fd (diff)
Fix regression on pointer address space handling. (#3797)
Diffstat (limited to 'tests/bugs')
-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;
+}