From b3b6c44cb8b8ebc413d41f9ca3833d8242f3c805 Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 21 Feb 2024 12:22:31 -0800 Subject: Fix SPIRV lowering issue. (#3608) * Fix SPIRV pointer lowering issue. Fixes #3605. * Add another pointer test. Fixes #3601. * Fixes #3600. * Fix #3595. --- tests/spirv/namespace-texture-array.slang | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 tests/spirv/namespace-texture-array.slang (limited to 'tests/spirv/namespace-texture-array.slang') diff --git a/tests/spirv/namespace-texture-array.slang b/tests/spirv/namespace-texture-array.slang new file mode 100644 index 000000000..b9dff510f --- /dev/null +++ b/tests/spirv/namespace-texture-array.slang @@ -0,0 +1,20 @@ +//TEST:SIMPLE(filecheck=CHECK): -target spirv -emit-spirv-directly +struct ComputePush +{ + uint image_id; +}; +[[vk::push_constant]] ComputePush p; + +namespace test_namespace +{ + [[vk::binding(0, 0)]] RWTexture2D textureTable[]; +} + +// CHECK: OpEntryPoint + +[shader("compute")] +[numthreads(8, 8, 1)] +void main(uint3 pixel_i : SV_DispatchThreadID) +{ + test_namespace.textureTable[p.image_id][pixel_i.xy] = float4(0,1,0,0); +} \ No newline at end of file -- cgit v1.2.3