SPIRV-Cross/reference/shaders-no-opt/asm/comp/buffer-reference-synthesized-pointer-2.asm.nocompat.vk.comp.vk
Hans-Kristian Arntzen 2cc374a0c8 GLSL: Implement GL_EXT_buffer_reference.
Buffer objects can contain arbitrary pointers to blocks.
We can also implement ConvertPtrToU and ConvertUToPtr.
The latter can cast a uint64_t to any type as it pleases,
so we will need to generate fake buffer reference blocks to be able to
cast the type.
2019-04-26 11:43:51 +02:00

22 lines
387 B
Plaintext

#version 450
#extension GL_ARB_gpu_shader_int64 : require
#extension GL_EXT_buffer_reference : require
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
layout(buffer_reference) buffer uintPointer
{
uint value;
};
layout(push_constant, std430) uniform _4_12
{
uint64_t _m0;
} _12;
void main()
{
uintPointer _3 = uintPointer(_12._m0);
_3.value = 20u;
}