From 05f403be96f0d991a3ef949e5a6a6fb3b416e1ff Mon Sep 17 00:00:00 2001 From: Yong He Date: Tue, 19 Mar 2024 17:02:02 -0700 Subject: Fix regression on pointer address space handling. (#3797) --- tests/bugs/gh-3795.slang | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 tests/bugs/gh-3795.slang (limited to 'tests') 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; +} -- cgit v1.2.3