summaryrefslogtreecommitdiffstats
path: root/tests/spirv/namespace-texture-array.slang
blob: b9dff510f7e3c335e1add29064a6544ce5e8c7fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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);
}