summaryrefslogtreecommitdiff
path: root/tests/diagnostics/nested-constant-buffer-in-parameter-block.slang
blob: eb9ecdd141e443502c4240f7eb86f2948ca6b572 (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 metal

struct S
{
    // CHECK-DAG: ([[# @LINE+1]]): error 56100:
    ConstantBuffer<int> cb;
}

ParameterBlock<S> s;

// CHECK-DAG: ([[# @LINE+1]]): error 56100:
ParameterBlock<ConstantBuffer<int>> s2;

RWStructuredBuffer<int> outputBuffer;

[numthreads(1,1,1)]
void kernelMain()
{
    outputBuffer[0] = s.cb + s2;
}