Debian Codegraph @

third_party/spirv-cross/reference/shaders-no-opt/asm/comp/bitcast-fp16-fp32.asm.vk.comp.vk

raw
1 #version 450
2 #if defined(GL_AMD_gpu_shader_half_float)
3 #extension GL_AMD_gpu_shader_half_float : require
4 #elif defined(GL_EXT_shader_explicit_arithmetic_types_float16)
5 #extension GL_EXT_shader_explicit_arithmetic_types_float16 : require
6 #else
7 #error No extension available for FP16.
8 #endif
9 #extension GL_EXT_shader_16bit_storage : require
10 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
11
12 layout(set = 0, binding = 0, std430) buffer SSBO
13 {
14 f16vec2 a;
15 float b;
16 float c;
17 f16vec2 d;
18 } _4;
19
20 void main()
21 {
22 _4.b = uintBitsToFloat(packFloat2x16(_4.a));
23 _4.d = unpackFloat2x16(floatBitsToUint(_4.c));
24 }
25