summaryrefslogtreecommitdiff
path: root/tests/metal/nested-parameter-block-reflection.slang
blob: 8282f55731af0953ab376525d5617055a7285430 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//TEST:REFLECTION(filecheck=CHECK): -target metal

// CHECK:"name": "tex",
// CHECK:"binding": {"kind": "metalArgumentBufferElement", "index": 1}

struct Data { int3 content; }
struct Params 
{
    ParameterBlock<Data> pdata;
    Texture2D tex;
}
ParameterBlock<Params> gParams;
RWStructuredBuffer<float4> output;
[numthreads(1,1,1)]
void computeMain()
{
    output[0] = gParams.tex.Load(gParams.pdata.content);
}