diff options
Diffstat (limited to 'tests/spirv/namespace-texture-array.slang')
| -rw-r--r-- | tests/spirv/namespace-texture-array.slang | 20 |
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 |
