summaryrefslogtreecommitdiffstats
path: root/tests/language-feature/capability/var-capability-wgsl-2.slang
blob: 4fb259ea6b43702718e20dad32952f0e9a3f78a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//TEST:SIMPLE(filecheck=CHECK_IGNORE_CAPS): -target wgsl -entry Main -stage compute

//CHECK_IGNORE_CAPS-NOT: error 36107
[require(cpp_cuda_glsl_hlsl_metal_spirv)]
struct inputWrapper {
    RWBuffer<float> InputTyped;
};

inputWrapper input;

[numthreads(64, 1, 1)]
void Main(uint3 DTid : SV_DispatchThreadID)
{
    // We should not see an error here, because the inputWrapper is not referenced.
}