summaryrefslogtreecommitdiffstats
path: root/tests/spirv/debug-info.slang
blob: d1107b774f51cc35e12583a1548a3e703911a49e (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
30
//TEST:SIMPLE(filecheck=CHECK):-target spirv -entry main -stage compute -g2 -emit-spirv-directly

struct TestType
{
    float memberA;
    float3 memberB;
    RWStructuredBuffer<float> memberC;
    float getValue()
    {
        return memberA;
    }
}
RWStructuredBuffer<float> result;
void main()
{
    TestType t;
    t.memberA = 1.0;
    t.memberB = float3(1, 2, 3);
    t.memberC = result;
    var val = t.getValue();
    result[0] = val + t.memberB.x;
}

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