#version 460
#extension GL_EXT_shader_explicit_arithmetic_types_int16 : require
#extension GL_EXT_shader_16bit_storage : require
#if defined(GL_AMD_gpu_shader_half_float)
#extension GL_AMD_gpu_shader_half_float : require
#elif defined(GL_EXT_shader_explicit_arithmetic_types_float16)
#extension GL_EXT_shader_explicit_arithmetic_types_float16 : require
#else
#error No extension available for FP16.
#endif
layout(local_size_x = 2, local_size_y = 1, local_size_z = 1) in;

layout(set = 0, binding = 0, std430) readonly buffer SSBO
{
    u16vec2 _m0[];
} _10;

layout(set = 0, binding = 1, std430) writeonly buffer _12_14
{
    u16vec2 _m0[];
} _14;

void main()
{
    f16vec2 _28 = uint16BitsToFloat16(_10._m0[gl_GlobalInvocationID.x]);
    _14._m0[gl_GlobalInvocationID.x] = u16vec2(float16BitsToUint16(_28.x), float16BitsToUint16(_28.y));
}


#if 0
// SPIR-V disassembly
; SPIR-V
; Version: 1.3
; Generator: Unknown(30017); 21022
; Bound: 37
; Schema: 0
OpCapability Shader
OpCapability Float16
OpCapability Int16
OpCapability StorageBuffer16BitAccess
OpCapability DenormPreserve
OpExtension "SPV_KHR_float_controls"
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %3 "main" %18
OpExecutionMode %3 LocalSize 2 1 1
OpExecutionMode %3 DenormPreserve 16
OpName %3 "main"
OpName %8 "SSBO"
OpName %12 "SSBO"
OpDecorate %7 ArrayStride 4
OpMemberDecorate %8 0 Offset 0
OpDecorate %8 Block
OpDecorate %10 DescriptorSet 0
OpDecorate %10 Binding 0
OpDecorate %10 NonWritable
OpDecorate %11 ArrayStride 4
OpMemberDecorate %12 0 Offset 0
OpDecorate %12 Block
OpDecorate %14 DescriptorSet 0
OpDecorate %14 Binding 1
OpDecorate %14 NonReadable
OpDecorate %18 BuiltIn GlobalInvocationId
%1 = OpTypeVoid
%2 = OpTypeFunction %1
%5 = OpTypeInt 16 0
%6 = OpTypeVector %5 2
%7 = OpTypeRuntimeArray %6
%8 = OpTypeStruct %7
%9 = OpTypePointer StorageBuffer %8
%10 = OpVariable %9 StorageBuffer
%11 = OpTypeRuntimeArray %6
%12 = OpTypeStruct %11
%13 = OpTypePointer StorageBuffer %12
%14 = OpVariable %13 StorageBuffer
%15 = OpTypeInt 32 0
%16 = OpTypeVector %15 3
%17 = OpTypePointer Input %16
%18 = OpVariable %17 Input
%19 = OpTypePointer Input %15
%21 = OpConstant %15 0
%23 = OpTypePointer StorageBuffer %6
%26 = OpTypeFloat 16
%27 = OpTypeVector %26 2
%3 = OpFunction %1 None %2
%4 = OpLabel
OpBranch %35
%35 = OpLabel
%20 = OpAccessChain %19 %18 %21
%22 = OpLoad %15 %20
%24 = OpAccessChain %23 %10 %21 %22
%25 = OpLoad %6 %24
%28 = OpBitcast %27 %25
%29 = OpCompositeExtract %26 %28 0
%30 = OpCompositeExtract %26 %28 1
%31 = OpBitcast %5 %29
%32 = OpBitcast %5 %30
%33 = OpCompositeConstruct %6 %31 %32
%34 = OpAccessChain %23 %14 %21 %22
OpStore %34 %33
OpReturn
OpFunctionEnd
#endif
