summaryrefslogtreecommitdiffstats
path: root/tests/spirv/ptr-empty-struct.slang
blob: 56148592bd760c1afc6b9210bc1323cc1022f820 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//TEST:SIMPLE(filecheck=CHECK): -target spirv

// CHECK: OpPtrAccessChain

struct EmptyStruct {
};

[vk::push_constant] EmptyStruct* pc;

RWStructuredBuffer<int> outputBuffer;

[numthreads(64)]
void ComputeMain(uint tid: SV_DispatchThreadID) {
    outputBuffer[tid] = ((int*)(pc))[0];
}