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

bitcast-16bit-1.invalid.comp « comp « shaders - github.com/KhronosGroup/SPIRV-Cross.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0c21cda3066699bfe5911a34c6876fd51d4fef68 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#version 450 core
#extension GL_AMD_gpu_shader_half_float : require
#extension GL_AMD_gpu_shader_int16 : require
layout(local_size_x = 1) in;

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

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

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