blob: 4f7edfd15eceabc6e4b6ed7e19fa8d4a4db01545 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 71
; Schema: 0
OpCapability Shader
OpCapability Float16
OpCapability UniformAndStorageBuffer16BitAccess
OpCapability StorageBuffer16BitAccess
OpCapability StorageInputOutput16
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %f "f"
OpExecutionMode %f LocalSize 1 1 1
OpName %a_block_std140 "a_block_std140"
OpMemberName %a_block_std140 0 "inner"
OpName %mat2x4_f16 "mat2x4_f16"
OpMemberName %mat2x4_f16 0 "col0"
OpMemberName %mat2x4_f16 1 "col1"
OpName %a "a"
OpName %conv_mat2x4_f16 "conv_mat2x4_f16"
OpName %val "val"
OpName %conv_arr4_mat2x4_f16 "conv_arr4_mat2x4_f16"
OpName %val_0 "val"
OpName %arr "arr"
OpName %i "i"
OpName %var_for_index "var_for_index"
OpName %f "f"
OpDecorate %a_block_std140 Block
OpMemberDecorate %a_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 %a NonWritable
OpDecorate %a DescriptorSet 0
OpDecorate %a Binding 0
OpDecorate %_arr_mat2v4half_uint_4 ArrayStride 16
%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
%a_block_std140 = OpTypeStruct %_arr_mat2x4_f16_uint_4
%_ptr_Uniform_a_block_std140 = OpTypePointer Uniform %a_block_std140
%a = OpVariable %_ptr_Uniform_a_block_std140 Uniform
%mat2v4half = OpTypeMatrix %v4half 2
%10 = OpTypeFunction %mat2v4half %mat2x4_f16
%_arr_mat2v4half_uint_4 = OpTypeArray %mat2v4half %uint_4
%18 = OpTypeFunction %_arr_mat2v4half_uint_4 %_arr_mat2x4_f16_uint_4
%_ptr_Function__arr_mat2v4half_uint_4 = OpTypePointer Function %_arr_mat2v4half_uint_4
%25 = OpConstantNull %_arr_mat2v4half_uint_4
%_ptr_Function_uint = OpTypePointer Function %uint
%28 = OpConstantNull %uint
%bool = OpTypeBool
%_ptr_Function__arr_mat2x4_f16_uint_4 = OpTypePointer Function %_arr_mat2x4_f16_uint_4
%41 = OpConstantNull %_arr_mat2x4_f16_uint_4
%_ptr_Function_mat2v4half = OpTypePointer Function %mat2v4half
%_ptr_Function_mat2x4_f16 = OpTypePointer Function %mat2x4_f16
%uint_1 = OpConstant %uint 1
%void = OpTypeVoid
%54 = OpTypeFunction %void
%uint_0 = OpConstant %uint 0
%_ptr_Uniform__arr_mat2x4_f16_uint_4 = OpTypePointer Uniform %_arr_mat2x4_f16_uint_4
%uint_2 = OpConstant %uint 2
%_ptr_Uniform_mat2x4_f16 = OpTypePointer Uniform %mat2x4_f16
%_ptr_Uniform_v4half = OpTypePointer Uniform %v4half
%conv_mat2x4_f16 = OpFunction %mat2v4half None %10
%val = OpFunctionParameter %mat2x4_f16
%14 = OpLabel
%15 = OpCompositeExtract %v4half %val 0
%16 = OpCompositeExtract %v4half %val 1
%17 = OpCompositeConstruct %mat2v4half %15 %16
OpReturnValue %17
OpFunctionEnd
%conv_arr4_mat2x4_f16 = OpFunction %_arr_mat2v4half_uint_4 None %18
%val_0 = OpFunctionParameter %_arr_mat2x4_f16_uint_4
%22 = OpLabel
%arr = OpVariable %_ptr_Function__arr_mat2v4half_uint_4 Function %25
%i = OpVariable %_ptr_Function_uint Function %28
%var_for_index = OpVariable %_ptr_Function__arr_mat2x4_f16_uint_4 Function %41
OpBranch %29
%29 = OpLabel
OpLoopMerge %30 %31 None
OpBranch %32
%32 = OpLabel
%34 = OpLoad %uint %i
%35 = OpULessThan %bool %34 %uint_4
%33 = OpLogicalNot %bool %35
OpSelectionMerge %37 None
OpBranchConditional %33 %38 %37
%38 = OpLabel
OpBranch %30
%37 = OpLabel
OpStore %var_for_index %val_0
%42 = OpLoad %uint %i
%44 = OpAccessChain %_ptr_Function_mat2v4half %arr %42
%46 = OpLoad %uint %i
%48 = OpAccessChain %_ptr_Function_mat2x4_f16 %var_for_index %46
%49 = OpLoad %mat2x4_f16 %48
%45 = OpFunctionCall %mat2v4half %conv_mat2x4_f16 %49
OpStore %44 %45
OpBranch %31
%31 = OpLabel
%50 = OpLoad %uint %i
%52 = OpIAdd %uint %50 %uint_1
OpStore %i %52
OpBranch %29
%30 = OpLabel
%53 = OpLoad %_arr_mat2v4half_uint_4 %arr
OpReturnValue %53
OpFunctionEnd
%f = OpFunction %void None %54
%57 = OpLabel
%61 = OpAccessChain %_ptr_Uniform__arr_mat2x4_f16_uint_4 %a %uint_0
%62 = OpLoad %_arr_mat2x4_f16_uint_4 %61
%58 = OpFunctionCall %_arr_mat2v4half_uint_4 %conv_arr4_mat2x4_f16 %62
%66 = OpAccessChain %_ptr_Uniform_mat2x4_f16 %a %uint_0 %uint_2
%67 = OpLoad %mat2x4_f16 %66
%63 = OpFunctionCall %mat2v4half %conv_mat2x4_f16 %67
%69 = OpAccessChain %_ptr_Uniform_v4half %a %uint_0 %uint_2 %uint_1
%70 = OpLoad %v4half %69
OpReturn
OpFunctionEnd