blob: 0cfa10c0370a1e1bedb616bfb254b209d52b9032 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 57
; Schema: 0
OpCapability Shader
OpCapability Float16
OpCapability UniformAndStorageBuffer16BitAccess
OpCapability StorageBuffer16BitAccess
%35 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %f "f"
OpExecutionMode %f LocalSize 1 1 1
OpName %u_block_std140 "u_block_std140"
OpMemberName %u_block_std140 0 "inner"
OpName %mat2x4_f16 "mat2x4_f16"
OpMemberName %mat2x4_f16 0 "col0"
OpMemberName %mat2x4_f16 1 "col1"
OpName %u "u"
OpName %s_block "s_block"
OpMemberName %s_block 0 "inner"
OpName %s "s"
OpName %conv_mat2x4_f16 "conv_mat2x4_f16"
OpName %val "val"
OpName %f "f"
OpDecorate %u_block_std140 Block
OpMemberDecorate %u_block_std140 0 Offset 0
OpMemberDecorate %mat2x4_f16 0 Offset 0
OpMemberDecorate %mat2x4_f16 1 Offset 8
OpDecorate %_arr_mat2x4_f16_uint_4 ArrayStride 16
OpDecorate %u NonWritable
OpDecorate %u DescriptorSet 0
OpDecorate %u Binding 0
OpDecorate %s_block Block
OpMemberDecorate %s_block 0 Offset 0
OpDecorate %s DescriptorSet 0
OpDecorate %s Binding 1
%half = OpTypeFloat 16
%v4half = OpTypeVector %half 4
%mat2x4_f16 = OpTypeStruct %v4half %v4half
%uint = OpTypeInt 32 0
%uint_4 = OpConstant %uint 4
%_arr_mat2x4_f16_uint_4 = OpTypeArray %mat2x4_f16 %uint_4
%u_block_std140 = OpTypeStruct %_arr_mat2x4_f16_uint_4
%_ptr_Uniform_u_block_std140 = OpTypePointer Uniform %u_block_std140
%u = OpVariable %_ptr_Uniform_u_block_std140 Uniform
%s_block = OpTypeStruct %half
%_ptr_StorageBuffer_s_block = OpTypePointer StorageBuffer %s_block
%s = OpVariable %_ptr_StorageBuffer_s_block StorageBuffer
%mat2v4half = OpTypeMatrix %v4half 2
%13 = OpTypeFunction %mat2v4half %mat2x4_f16
%void = OpTypeVoid
%21 = OpTypeFunction %void
%v2half = OpTypeVector %half 2
%mat4v2half = OpTypeMatrix %v2half 4
%uint_0 = OpConstant %uint 0
%uint_2 = OpConstant %uint 2
%_ptr_Uniform_mat2x4_f16 = OpTypePointer Uniform %mat2x4_f16
%36 = OpConstantNull %uint
%uint_1 = OpConstant %uint 1
%_ptr_Uniform_v4half = OpTypePointer Uniform %v4half
%_ptr_StorageBuffer_half = OpTypePointer StorageBuffer %half
%int = OpTypeInt 32 1
%50 = OpConstantNull %int
%conv_mat2x4_f16 = OpFunction %mat2v4half None %13
%val = OpFunctionParameter %mat2x4_f16
%17 = OpLabel
%18 = OpCompositeExtract %v4half %val 0
%19 = OpCompositeExtract %v4half %val 1
%20 = OpCompositeConstruct %mat2v4half %18 %19
OpReturnValue %20
OpFunctionEnd
%f = OpFunction %void None %21
%24 = OpLabel
%32 = OpAccessChain %_ptr_Uniform_mat2x4_f16 %u %uint_0 %uint_2
%33 = OpLoad %mat2x4_f16 %32
%28 = OpFunctionCall %mat2v4half %conv_mat2x4_f16 %33
%25 = OpTranspose %mat4v2half %28
%39 = OpAccessChain %_ptr_Uniform_v4half %u %uint_0 %36 %uint_1
%40 = OpLoad %v4half %39
%41 = OpVectorShuffle %v4half %40 %40 1 3 0 2
%34 = OpExtInst %half %35 Length %41
%43 = OpAccessChain %_ptr_Uniform_v4half %u %uint_0 %36 %uint_1
%44 = OpLoad %v4half %43
%45 = OpVectorShuffle %v4half %44 %44 1 3 0 2
%46 = OpCompositeExtract %half %45 0
%42 = OpExtInst %half %35 FAbs %46
%48 = OpAccessChain %_ptr_StorageBuffer_half %s %uint_0
%51 = OpCompositeExtract %v2half %25 0
%52 = OpCompositeExtract %half %51 0
%54 = OpFAdd %half %52 %34
%56 = OpFAdd %half %54 %42
OpStore %48 %56
OpReturn
OpFunctionEnd