f72bb3c6f5
We cannot naively convert these to decimal literals. C/C++ (and thus MSL) has extremely awkward literal promotion rules.
24 lines
438 B
Plaintext
24 lines
438 B
Plaintext
#version 450
|
|
#extension GL_ARB_gpu_shader_int64 : require
|
|
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);
|
|
}
|
|
|