xemu/subprojects/SPIRV-Reflect/tests/push_constants/pointer_in_struct.slang

15 lines
242 B
Plaintext

RWStructuredBuffer<int> result;
struct Data{
int a;
int* b;
int c;
};
[[vk::push_constant]] Data pc;
[shader("compute")]
[numthreads(1,1,1)]
void computeMain(uint3 threadId : SV_DispatchThreadID)
{
result[0] = pc.b[2] + pc.c;
}