summaryrefslogtreecommitdiffstats
path: root/tests/spirv/debug-value-dynamic-index.slang
blob: 591b1f6dad292b7f723beb9e34fa10ab6acb9bf5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
//TEST:SIMPLE(filecheck=CHECK):-target spirv -entry main -stage compute -g2 -emit-spirv-directly

struct TestType
{
    float memberA;
    float3 memberB;
    float arrayVal[10];
    RWStructuredBuffer<float> memberC;
    float getValue()
    {
        return memberA;
    }
}
RWStructuredBuffer<float> result;
void main(int id : SV_DispatchThreadID)
{
    TestType t;
    t.memberA = 1.0;
    t.arrayVal[id] = 2;
    result[0] = t.arrayVal[id];
}

// CHECK: OpExtInst %void {{.*}} DebugExpression
// CHECK: DebugTypeMember
// CHECK: DebugTypeComposite
// CHECK: DebugFunctionDefinition
// CHECK: DebugScope
// CHECK: DebugLine
// CHECK: DebugValue