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

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: DebugBuildIdentifier
// CHECK-NOT: OpExtInst %void {{.*}} DebugExpression
// CHECK-NOT: DebugTypeMember
// CHECK-NOT: DebugTypeComposite
// CHECK-NOT: DebugFunctionDefinition
// CHECK-NOT: DebugScope
// CHECK-NOT: DebugLine
// CHECK-NOT: DebugValue