summaryrefslogtreecommitdiffstats
path: root/tests/diagnostics/get-vertex-attribute.slang
blob: 613a5a7c8f79b14f89a52d7bd268d1fbd6104f7b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
//TEST:SIMPLE(filecheck=CHECK): -target spirv

struct VertexOutput
{
    float color;
}

[shader("fragment")]
float4 fsmain(VertexOutput vout) : SV_Target
{
    // CHECK: ([[# @LINE+1]]): error 39027
    return GetAttributeAtVertex(vout.color, 0); // error: color must be decorated with `nointerpolation`.
}