summaryrefslogtreecommitdiff
path: root/tests/spirv/namespace-texture-array.slang
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2024-02-21 12:22:31 -0800
committerGitHub <noreply@github.com>2024-02-21 12:22:31 -0800
commitb3b6c44cb8b8ebc413d41f9ca3833d8242f3c805 (patch)
treee73edb286c8179f7fc3677b75bfa2468eb811e60 /tests/spirv/namespace-texture-array.slang
parent70ea0b048970b9d2e00451636c88313093de2337 (diff)
Fix SPIRV lowering issue. (#3608)
* Fix SPIRV pointer lowering issue. Fixes #3605. * Add another pointer test. Fixes #3601. * Fixes #3600. * Fix #3595.
Diffstat (limited to 'tests/spirv/namespace-texture-array.slang')
-rw-r--r--tests/spirv/namespace-texture-array.slang20
1 files changed, 20 insertions, 0 deletions
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<float4> 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