SPIRV-Cross/reference/shaders-no-opt/comp/intmin-literal.comp
Hans-Kristian Arntzen f72bb3c6f5 Improve handling of INT_MIN/INT64_MIN literals.
We cannot naively convert these to decimal literals. C/C++ (and thus
MSL) has extremely awkward literal promotion rules.
2021-09-30 16:29:30 +02:00

19 lines
289 B
Plaintext

#version 450
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
layout(binding = 1, std430) buffer SSBO
{
float a;
} _9;
layout(binding = 0, std140) uniform UBO
{
float b;
} _14;
void main()
{
_9.a = intBitsToFloat(floatBitsToInt(_14.b) ^ int(0x80000000));
}