blob: 999af21f390a931bf6c776de986a19264b696be1 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 130
; Schema: 0
OpCapability Shader
OpCapability Float16
OpCapability UniformAndStorageBuffer16BitAccess
OpCapability StorageBuffer16BitAccess
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 %s_block "s_block"
OpMemberName %s_block 0 "inner"
OpName %s "s"
OpName %counter "counter"
OpName %i "i"
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_0 "i"
OpName %var_for_index "var_for_index"
OpName %load_a_inner_p0_p1 "load_a_inner_p0_p1"
OpName %p0 "p0"
OpName %p1 "p1"
OpName %load_a_inner_p0_p1_0 "load_a_inner_p0_p1_0"
OpName %p0_0 "p0"
OpName %p1_0 "p1"
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 %s_block Block
OpMemberDecorate %s_block 0 Offset 0
OpDecorate %s DescriptorSet 0
OpDecorate %s Binding 1
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
%s_block = OpTypeStruct %half
%_ptr_StorageBuffer_s_block = OpTypePointer StorageBuffer %s_block
%s = OpVariable %_ptr_StorageBuffer_s_block StorageBuffer
%int = OpTypeInt 32 1
%14 = OpConstantNull %int
%_ptr_Private_int = OpTypePointer Private %int
%counter = OpVariable %_ptr_Private_int Private %14
%17 = OpTypeFunction %int
%int_1 = OpConstant %int 1
%mat2v4half = OpTypeMatrix %v4half 2
%24 = OpTypeFunction %mat2v4half %mat2x4_f16
%_arr_mat2v4half_uint_4 = OpTypeArray %mat2v4half %uint_4
%32 = OpTypeFunction %_arr_mat2v4half_uint_4 %_arr_mat2x4_f16_uint_4
%_ptr_Function__arr_mat2v4half_uint_4 = OpTypePointer Function %_arr_mat2v4half_uint_4
%39 = OpConstantNull %_arr_mat2v4half_uint_4
%_ptr_Function_uint = OpTypePointer Function %uint
%42 = OpConstantNull %uint
%bool = OpTypeBool
%_ptr_Function__arr_mat2x4_f16_uint_4 = OpTypePointer Function %_arr_mat2x4_f16_uint_4
%55 = 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
%68 = OpTypeFunction %v4half %uint %uint
%uint_0 = OpConstant %uint 0
%_ptr_Uniform_v4half = OpTypePointer Uniform %v4half
%83 = OpConstantNull %v4half
%84 = OpTypeFunction %half %uint %uint
%_ptr_Uniform_half = OpTypePointer Uniform %half
%98 = OpConstantNull %half
%void = OpTypeVoid
%99 = OpTypeFunction %void
%_ptr_Uniform__arr_mat2x4_f16_uint_4 = OpTypePointer Uniform %_arr_mat2x4_f16_uint_4
%_ptr_Uniform_mat2x4_f16 = OpTypePointer Uniform %mat2x4_f16
%_ptr_StorageBuffer_half = OpTypePointer StorageBuffer %half
%i = OpFunction %int None %17
%19 = OpLabel
%20 = OpLoad %int %counter
%22 = OpIAdd %int %20 %int_1
OpStore %counter %22
%23 = OpLoad %int %counter
OpReturnValue %23
OpFunctionEnd
%conv_mat2x4_f16 = OpFunction %mat2v4half None %24
%val = OpFunctionParameter %mat2x4_f16
%28 = OpLabel
%29 = OpCompositeExtract %v4half %val 0
%30 = OpCompositeExtract %v4half %val 1
%31 = OpCompositeConstruct %mat2v4half %29 %30
OpReturnValue %31
OpFunctionEnd
%conv_arr4_mat2x4_f16 = OpFunction %_arr_mat2v4half_uint_4 None %32
%val_0 = OpFunctionParameter %_arr_mat2x4_f16_uint_4
%36 = OpLabel
%arr = OpVariable %_ptr_Function__arr_mat2v4half_uint_4 Function %39
%i_0 = OpVariable %_ptr_Function_uint Function %42
%var_for_index = OpVariable %_ptr_Function__arr_mat2x4_f16_uint_4 Function %55
OpBranch %43
%43 = OpLabel
OpLoopMerge %44 %45 None
OpBranch %46
%46 = OpLabel
%48 = OpLoad %uint %i_0
%49 = OpULessThan %bool %48 %uint_4
%47 = OpLogicalNot %bool %49
OpSelectionMerge %51 None
OpBranchConditional %47 %52 %51
%52 = OpLabel
OpBranch %44
%51 = OpLabel
OpStore %var_for_index %val_0
%56 = OpLoad %uint %i_0
%58 = OpAccessChain %_ptr_Function_mat2v4half %arr %56
%60 = OpLoad %uint %i_0
%62 = OpAccessChain %_ptr_Function_mat2x4_f16 %var_for_index %60
%63 = OpLoad %mat2x4_f16 %62
%59 = OpFunctionCall %mat2v4half %conv_mat2x4_f16 %63
OpStore %58 %59
OpBranch %45
%45 = OpLabel
%64 = OpLoad %uint %i_0
%66 = OpIAdd %uint %64 %uint_1
OpStore %i_0 %66
OpBranch %43
%44 = OpLabel
%67 = OpLoad %_arr_mat2v4half_uint_4 %arr
OpReturnValue %67
OpFunctionEnd
%load_a_inner_p0_p1 = OpFunction %v4half None %68
%p0 = OpFunctionParameter %uint
%p1 = OpFunctionParameter %uint
%72 = OpLabel
OpSelectionMerge %73 None
OpSwitch %p1 %74 0 %75 1 %76
%75 = OpLabel
%79 = OpAccessChain %_ptr_Uniform_v4half %a %uint_0 %p0 %uint_0
%80 = OpLoad %v4half %79
OpReturnValue %80
%76 = OpLabel
%81 = OpAccessChain %_ptr_Uniform_v4half %a %uint_0 %p0 %uint_1
%82 = OpLoad %v4half %81
OpReturnValue %82
%74 = OpLabel
OpReturnValue %83
%73 = OpLabel
OpReturnValue %83
OpFunctionEnd
%load_a_inner_p0_p1_0 = OpFunction %half None %84
%p0_0 = OpFunctionParameter %uint
%p1_0 = OpFunctionParameter %uint
%88 = OpLabel
OpSelectionMerge %89 None
OpSwitch %p1_0 %90 0 %91 1 %92
%91 = OpLabel
%94 = OpAccessChain %_ptr_Uniform_half %a %uint_0 %p0_0 %uint_0 %42
%95 = OpLoad %half %94
OpReturnValue %95
%92 = OpLabel
%96 = OpAccessChain %_ptr_Uniform_half %a %uint_0 %p0_0 %uint_1 %42
%97 = OpLoad %half %96
OpReturnValue %97
%90 = OpLabel
OpReturnValue %98
%89 = OpLabel
OpReturnValue %98
OpFunctionEnd
%f = OpFunction %void None %99
%102 = OpLabel
%103 = OpFunctionCall %int %i
%104 = OpFunctionCall %int %i
%107 = OpAccessChain %_ptr_Uniform__arr_mat2x4_f16_uint_4 %a %uint_0
%108 = OpLoad %_arr_mat2x4_f16_uint_4 %107
%105 = OpFunctionCall %_arr_mat2v4half_uint_4 %conv_arr4_mat2x4_f16 %108
%111 = OpAccessChain %_ptr_Uniform_mat2x4_f16 %a %uint_0 %103
%112 = OpLoad %mat2x4_f16 %111
%109 = OpFunctionCall %mat2v4half %conv_mat2x4_f16 %112
%114 = OpBitcast %uint %103
%115 = OpBitcast %uint %104
%113 = OpFunctionCall %v4half %load_a_inner_p0_p1 %114 %115
%117 = OpAccessChain %_ptr_StorageBuffer_half %s %uint_0
%119 = OpBitcast %uint %103
%120 = OpBitcast %uint %104
%118 = OpFunctionCall %half %load_a_inner_p0_p1_0 %119 %120
%121 = OpCompositeExtract %mat2v4half %105 0
%122 = OpCompositeExtract %v4half %121 0
%123 = OpCompositeExtract %half %122 0
%124 = OpFAdd %half %118 %123
%125 = OpCompositeExtract %v4half %109 0
%126 = OpCompositeExtract %half %125 0
%127 = OpFAdd %half %124 %126
%128 = OpCompositeExtract %half %113 0
%129 = OpFAdd %half %127 %128
OpStore %117 %129
OpReturn
OpFunctionEnd