SPIRV-Cross/shaders-no-opt/comp/bitcast-16bit-2.invalid.comp

27 lines
583 B
Plaintext
Raw Normal View History

2018-11-05 20:55:56 +00:00
#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
{
ivec4 inputs[];
};
layout(binding = 1, std430) buffer SSBO1
{
i16vec4 outputs[];
};
layout(binding = 2) uniform UBO
{
f16vec4 const0;
};
void main()
{
uint ident = gl_GlobalInvocationID.x;
outputs[ident].xy = unpackInt2x16(inputs[ident].x) + float16BitsToInt16(const0.xy);
outputs[ident].zw = i16vec2(unpackUint2x16(uint(inputs[ident].y)) - float16BitsToUint16(const0.zw));
}