Debian Codegraph @

third_party/spirv-cross/reference/shaders-no-opt/comp/bitcast-16bit-1.invalid.comp

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_NV_gpu_shader5)
5 #extension GL_NV_gpu_shader5 : require
6 #else
7 #error No extension available for FP16.
8 #endif
9 #if defined(GL_AMD_gpu_shader_int16)
10 #extension GL_AMD_gpu_shader_int16 : require
11 #else
12 #error No extension available for Int16.
13 #endif
14 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
15
16 layout(binding = 0, std430) buffer SSBO0
17 {
18 i16vec4 inputs[];
19 } _25;
20
21 layout(binding = 1, std430) buffer SSBO1
22 {
23 ivec4 outputs[];
24 } _39;
25
26 void main()
27 {
28 uint ident = gl_GlobalInvocationID.x;
29 f16vec2 a = int16BitsToFloat16(_25.inputs[ident].xy);
30 _39.outputs[ident].x = int(packFloat2x16(a + f16vec2(float16_t(1.0))));
31 _39.outputs[ident].y = packInt2x16(_25.inputs[ident].zw);
32 _39.outputs[ident].z = int(packUint2x16(u16vec2(_25.inputs[ident].xy)));
33 }
34