summaryrefslogtreecommitdiffstats
path: root/tests/spirv/debug-type-pointer-2.slang
blob: 49ee9a48b25bc42e931bdfa0ec39bd538ad5764c (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
//TEST:SIMPLE(filecheck=CHECK): -target spirv

// Check that we do not emit forward reference for debug pointer types if there isn't a need to do so.

// CHECK-NOT: OpExtension "SPV_KHR_relaxed_extended_instruction"
struct T
{
    uint inner;
}

struct Problem
{
    int getVal() { return some_bda_ptr->inner;}
    T *some_bda_ptr;
}

uniform Problem probs;

RWStructuredBuffer<float4> outputBuffer;
[shader("compute")]
void main()
{
    outputBuffer[0] = float(probs.getVal());
}