Welcome to mirror list, hosted at ThFree Co, Russian Federation.

bitcast-16bit-1.invalid.comp « comp « shaders « reference - github.com/KhronosGroup/SPIRV-Cross.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9844e71944702ded4dc49df3050078da223196f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#version 450
#if defined(GL_AMD_gpu_shader_half_float)
#extension GL_AMD_gpu_shader_half_float : require
#elif defined(GL_NV_gpu_shader5)
#extension GL_NV_gpu_shader5 : require
#elif defined(GL_EXT_shader_16bit_storage)
#extension GL_EXT_shader_16bit_storage : require
#else
#error No extension available for FP16.
#endif
#if defined(GL_AMD_gpu_shader_int16)
#extension GL_AMD_gpu_shader_int16 : require
#elif defined(GL_EXT_shader_16bit_storage)
#extension GL_EXT_shader_16bit_storage : require
#else
#error No extension available for Int16.
#endif
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

layout(binding = 0, std430) buffer SSBO0
{
    i16vec4 inputs[];
} _25;

layout(binding = 1, std430) buffer SSBO1
{
    ivec4 outputs[];
} _39;

void main()
{
    uint ident = gl_GlobalInvocationID.x;
    f16vec2 a = int16BitsToFloat16(_25.inputs[ident].xy);
    _39.outputs[ident].x = int(packFloat2x16(a + f16vec2(1.0hf)));
    _39.outputs[ident].y = packInt2x16(_25.inputs[ident].zw);
    _39.outputs[ident].z = int(packUint2x16(u16vec2(_25.inputs[ident].xy)));
}