SPIRV-Cross/reference/shaders-no-opt/comp/int64min-literal.comp

30 lines
611 B
Plaintext

#version 450
#if defined(GL_ARB_gpu_shader_int64)
#extension GL_ARB_gpu_shader_int64 : require
#elif defined(GL_NV_gpu_shader5)
#extension GL_NV_gpu_shader5 : require
#else
#error No extension available for 64-bit integers.
#endif
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
layout(binding = 0, std140) uniform UBO
{
float b;
} _12;
layout(binding = 1, std430) buffer SSBO
{
float a;
} _32;
void main()
{
double b2 = double(_12.b);
int64_t v = doubleBitsToInt64(b2);
v ^= int64_t(0x8000000000000000ul);
double a2 = int64BitsToDouble(v);
_32.a = float(a2);
}