SPIRV-Cross/reference/shaders/vulkan/comp/buffer-reference-bitcast.nocompat.vk.comp.vk
Hans-Kristian Arntzen 6fcf8c83d9 GLSL: Support OpBitcast for buffer references.
Update glslang/SPIRV-Tools/SPIRV-Headers references.
2019-05-09 10:29:31 +02:00

27 lines
467 B
Plaintext

#version 450
#extension GL_EXT_buffer_reference : require
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
layout(buffer_reference) buffer PtrUint;
layout(buffer_reference) buffer PtrInt;
layout(buffer_reference, std430) buffer PtrUint
{
uint value;
};
layout(buffer_reference, std430) buffer PtrInt
{
int value;
};
layout(set = 0, binding = 0, std430) buffer Buf
{
PtrUint ptr;
} _11;
void main()
{
PtrInt(_11.ptr).value = 10;
}