| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 1 |
| ; Bound: 219 |
| ; Schema: 0 |
| OpCapability Shader |
| %36 = OpExtInstImport "GLSL.std.450" |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint GLCompute %f "f" |
| OpExecutionMode %f LocalSize 1 1 1 |
| OpMemberName %Inner_std140 0 "m_col0" |
| OpMemberName %Inner_std140 1 "m_col1" |
| OpMemberName %Inner_std140 2 "m_col2" |
| OpMemberName %Inner_std140 3 "m_col3" |
| OpName %Inner_std140 "Inner_std140" |
| OpMemberName %Outer_std140_tint_explicit_layout 0 "a" |
| OpName %Outer_std140_tint_explicit_layout "Outer_std140_tint_explicit_layout" |
| OpMemberName %a_block_std140_tint_explicit_layout 0 "inner" |
| OpName %a_block_std140_tint_explicit_layout "a_block_std140_tint_explicit_layout" |
| OpName %counter "counter" |
| OpName %i "i" |
| OpName %f "f" |
| OpMemberName %Outer_std140 0 "a" |
| OpName %Outer_std140 "Outer_std140" |
| OpMemberName %Inner 0 "m" |
| OpName %Inner "Inner" |
| OpMemberName %Outer 0 "a" |
| OpName %Outer "Outer" |
| OpName %l_a "l_a" |
| OpName %l_a_i "l_a_i" |
| OpName %l_a_i_a "l_a_i_a" |
| OpName %l_a_i_a_i "l_a_i_a_i" |
| OpName %l_a_i_a_i_m "l_a_i_a_i_m" |
| OpName %l_a_i_a_i_m_i "l_a_i_a_i_m_i" |
| OpName %l_a_i_a_i_m_i_i "l_a_i_a_i_m_i_i" |
| OpName %tint_convert_Inner "tint_convert_Inner" |
| OpName %tint_input "tint_input" |
| OpName %tint_convert_Outer "tint_convert_Outer" |
| OpName %tint_input_0 "tint_input" |
| OpName %tint_convert_explicit_layout "tint_convert_explicit_layout" |
| OpName %tint_source "tint_source" |
| OpName %tint_convert_explicit_layout_0 "tint_convert_explicit_layout" |
| OpName %tint_source_0 "tint_source" |
| OpName %tint_convert_explicit_layout_1 "tint_convert_explicit_layout" |
| OpName %tint_source_1 "tint_source" |
| OpMemberDecorate %Inner_std140 0 Offset 0 |
| OpMemberDecorate %Inner_std140 1 Offset 16 |
| OpMemberDecorate %Inner_std140 2 Offset 32 |
| OpMemberDecorate %Inner_std140 3 Offset 48 |
| OpDecorate %_arr_Inner_std140_uint_4 ArrayStride 64 |
| OpMemberDecorate %Outer_std140_tint_explicit_layout 0 Offset 0 |
| OpDecorate %_arr_Outer_std140_tint_explicit_layout_uint_4 ArrayStride 256 |
| OpMemberDecorate %a_block_std140_tint_explicit_layout 0 Offset 0 |
| OpDecorate %a_block_std140_tint_explicit_layout Block |
| OpDecorate %1 DescriptorSet 0 |
| OpDecorate %1 Binding 0 |
| OpDecorate %1 NonWritable |
| %float = OpTypeFloat 32 |
| %v3float = OpTypeVector %float 3 |
| %Inner_std140 = OpTypeStruct %v3float %v3float %v3float %v3float |
| %uint = OpTypeInt 32 0 |
| %uint_4 = OpConstant %uint 4 |
| %_arr_Inner_std140_uint_4 = OpTypeArray %Inner_std140 %uint_4 |
| %Outer_std140_tint_explicit_layout = OpTypeStruct %_arr_Inner_std140_uint_4 |
| %_arr_Outer_std140_tint_explicit_layout_uint_4 = OpTypeArray %Outer_std140_tint_explicit_layout %uint_4 |
| %a_block_std140_tint_explicit_layout = OpTypeStruct %_arr_Outer_std140_tint_explicit_layout_uint_4 |
| %_ptr_Uniform_a_block_std140_tint_explicit_layout = OpTypePointer Uniform %a_block_std140_tint_explicit_layout |
| %1 = OpVariable %_ptr_Uniform_a_block_std140_tint_explicit_layout Uniform |
| %int = OpTypeInt 32 1 |
| %_ptr_Private_int = OpTypePointer Private %int |
| %int_0 = OpConstant %int 0 |
| %counter = OpVariable %_ptr_Private_int Private %int_0 |
| %17 = OpTypeFunction %int |
| %int_1 = OpConstant %int 1 |
| %void = OpTypeVoid |
| %28 = OpTypeFunction %void |
| %_ptr_Uniform__arr_Outer_std140_tint_explicit_layout_uint_4 = OpTypePointer Uniform %_arr_Outer_std140_tint_explicit_layout_uint_4 |
| %uint_0 = OpConstant %uint 0 |
| %uint_3 = OpConstant %uint 3 |
| %_ptr_Uniform_Outer_std140_tint_explicit_layout = OpTypePointer Uniform %Outer_std140_tint_explicit_layout |
| %_ptr_Uniform__arr_Inner_std140_uint_4 = OpTypePointer Uniform %_arr_Inner_std140_uint_4 |
| %_ptr_Uniform_Inner_std140 = OpTypePointer Uniform %Inner_std140 |
| %_ptr_Uniform_v3float = OpTypePointer Uniform %v3float |
| %uint_1 = OpConstant %uint 1 |
| %uint_2 = OpConstant %uint 2 |
| %mat4v3float = OpTypeMatrix %v3float 4 |
| %_ptr_Function_mat4v3float = OpTypePointer Function %mat4v3float |
| %_ptr_Function_v3float = OpTypePointer Function %v3float |
| %_arr_Inner_std140_uint_4_0 = OpTypeArray %Inner_std140 %uint_4 |
| %Outer_std140 = OpTypeStruct %_arr_Inner_std140_uint_4_0 |
| %_arr_Outer_std140_uint_4 = OpTypeArray %Outer_std140 %uint_4 |
| %_ptr_Function__arr_Outer_std140_uint_4 = OpTypePointer Function %_arr_Outer_std140_uint_4 |
| %Inner = OpTypeStruct %mat4v3float |
| %_arr_Inner_uint_4 = OpTypeArray %Inner %uint_4 |
| %Outer = OpTypeStruct %_arr_Inner_uint_4 |
| %_arr_Outer_uint_4 = OpTypeArray %Outer %uint_4 |
| %_ptr_Function__arr_Outer_uint_4 = OpTypePointer Function %_arr_Outer_uint_4 |
| %82 = OpConstantNull %_arr_Outer_uint_4 |
| %_ptr_Function__arr_Inner_std140_uint_4_0 = OpTypePointer Function %_arr_Inner_std140_uint_4_0 |
| %_ptr_Function__arr_Inner_uint_4 = OpTypePointer Function %_arr_Inner_uint_4 |
| %103 = OpConstantNull %_arr_Inner_uint_4 |
| %bool = OpTypeBool |
| %_ptr_Function_Outer = OpTypePointer Function %Outer |
| %_ptr_Function_Outer_std140 = OpTypePointer Function %Outer_std140 |
| %_ptr_Function_Inner = OpTypePointer Function %Inner |
| %_ptr_Function_Inner_std140 = OpTypePointer Function %Inner_std140 |
| %139 = OpTypeFunction %Inner %Inner_std140 |
| %148 = OpTypeFunction %Outer %Outer_std140 |
| %170 = OpTypeFunction %_arr_Inner_std140_uint_4_0 %_arr_Inner_std140_uint_4 |
| %_ptr_Function__arr_Inner_std140_uint_4 = OpTypePointer Function %_arr_Inner_std140_uint_4 |
| %175 = OpConstantNull %_arr_Inner_std140_uint_4_0 |
| %191 = OpTypeFunction %Outer_std140 %Outer_std140_tint_explicit_layout |
| %197 = OpTypeFunction %_arr_Outer_std140_uint_4 %_arr_Outer_std140_tint_explicit_layout_uint_4 |
| %_ptr_Function__arr_Outer_std140_tint_explicit_layout_uint_4 = OpTypePointer Function %_arr_Outer_std140_tint_explicit_layout_uint_4 |
| %202 = OpConstantNull %_arr_Outer_std140_uint_4 |
| %_ptr_Function_Outer_std140_tint_explicit_layout = OpTypePointer Function %Outer_std140_tint_explicit_layout |
| %i = OpFunction %int None %17 |
| %18 = OpLabel |
| %19 = OpLoad %int %counter None |
| %20 = OpBitcast %uint %19 |
| %21 = OpBitcast %uint %int_1 |
| %23 = OpIAdd %uint %20 %21 |
| %24 = OpBitcast %int %23 |
| OpStore %counter %24 None |
| %25 = OpLoad %int %counter None |
| OpReturnValue %25 |
| OpFunctionEnd |
| %f = OpFunction %void None %28 |
| %29 = OpLabel |
| %60 = OpVariable %_ptr_Function_mat4v3float Function |
| %74 = OpVariable %_ptr_Function__arr_Outer_std140_uint_4 Function |
| %76 = OpVariable %_ptr_Function__arr_Outer_uint_4 Function %82 |
| %99 = OpVariable %_ptr_Function__arr_Inner_std140_uint_4_0 Function |
| %101 = OpVariable %_ptr_Function__arr_Inner_uint_4 Function %103 |
| %30 = OpAccessChain %_ptr_Uniform__arr_Outer_std140_tint_explicit_layout_uint_4 %1 %uint_0 |
| %33 = OpFunctionCall %int %i |
| %34 = OpBitcast %uint %33 |
| %35 = OpExtInst %uint %36 UMin %34 %uint_3 |
| %38 = OpAccessChain %_ptr_Uniform_Outer_std140_tint_explicit_layout %30 %35 |
| %40 = OpAccessChain %_ptr_Uniform__arr_Inner_std140_uint_4 %38 %uint_0 |
| %42 = OpFunctionCall %int %i |
| %43 = OpBitcast %uint %42 |
| %44 = OpExtInst %uint %36 UMin %43 %uint_3 |
| %45 = OpAccessChain %_ptr_Uniform_Inner_std140 %40 %44 |
| %47 = OpAccessChain %_ptr_Uniform_v3float %45 %uint_0 |
| %49 = OpLoad %v3float %47 None |
| %50 = OpAccessChain %_ptr_Uniform_v3float %45 %uint_1 |
| %52 = OpLoad %v3float %50 None |
| %53 = OpAccessChain %_ptr_Uniform_v3float %45 %uint_2 |
| %55 = OpLoad %v3float %53 None |
| %56 = OpAccessChain %_ptr_Uniform_v3float %45 %uint_3 |
| %57 = OpLoad %v3float %56 None |
| %l_a_i_a_i_m = OpCompositeConstruct %mat4v3float %49 %52 %55 %57 |
| OpStore %60 %l_a_i_a_i_m |
| %62 = OpFunctionCall %int %i |
| %63 = OpBitcast %uint %62 |
| %64 = OpExtInst %uint %36 UMin %63 %uint_3 |
| %65 = OpAccessChain %_ptr_Function_v3float %60 %64 |
| %l_a_i_a_i_m_i = OpLoad %v3float %65 None |
| %68 = OpLoad %_arr_Outer_std140_tint_explicit_layout_uint_4 %30 None |
| %69 = OpFunctionCall %_arr_Outer_std140_uint_4 %tint_convert_explicit_layout_1 %68 |
| OpStore %74 %69 |
| OpBranch %83 |
| %83 = OpLabel |
| OpBranch %86 |
| %86 = OpLabel |
| %88 = OpPhi %uint %uint_0 %83 %89 %85 |
| OpLoopMerge %87 %85 None |
| OpBranch %84 |
| %84 = OpLabel |
| %119 = OpUGreaterThanEqual %bool %88 %uint_4 |
| OpSelectionMerge %121 None |
| OpBranchConditional %119 %122 %121 |
| %122 = OpLabel |
| OpBranch %87 |
| %121 = OpLabel |
| %123 = OpAccessChain %_ptr_Function_Outer %76 %88 |
| %125 = OpAccessChain %_ptr_Function_Outer_std140 %74 %88 |
| %127 = OpLoad %Outer_std140 %125 None |
| %128 = OpFunctionCall %Outer %tint_convert_Outer %127 |
| OpStore %123 %128 None |
| OpBranch %85 |
| %85 = OpLabel |
| %89 = OpIAdd %uint %88 %uint_1 |
| OpBranch %86 |
| %87 = OpLabel |
| %l_a = OpLoad %_arr_Outer_uint_4 %76 None |
| %91 = OpLoad %Outer_std140_tint_explicit_layout %38 None |
| %92 = OpFunctionCall %Outer_std140 %tint_convert_explicit_layout_0 %91 |
| %l_a_i = OpFunctionCall %Outer %tint_convert_Outer %92 |
| %96 = OpLoad %_arr_Inner_std140_uint_4 %40 None |
| %97 = OpFunctionCall %_arr_Inner_std140_uint_4_0 %tint_convert_explicit_layout %96 |
| OpStore %99 %97 |
| OpBranch %104 |
| %104 = OpLabel |
| OpBranch %107 |
| %107 = OpLabel |
| %109 = OpPhi %uint %uint_0 %104 %110 %106 |
| OpLoopMerge %108 %106 None |
| OpBranch %105 |
| %105 = OpLabel |
| %129 = OpUGreaterThanEqual %bool %109 %uint_4 |
| OpSelectionMerge %130 None |
| OpBranchConditional %129 %131 %130 |
| %131 = OpLabel |
| OpBranch %108 |
| %130 = OpLabel |
| %132 = OpAccessChain %_ptr_Function_Inner %101 %109 |
| %134 = OpAccessChain %_ptr_Function_Inner_std140 %99 %109 |
| %136 = OpLoad %Inner_std140 %134 None |
| %137 = OpFunctionCall %Inner %tint_convert_Inner %136 |
| OpStore %132 %137 None |
| OpBranch %106 |
| %106 = OpLabel |
| %110 = OpIAdd %uint %109 %uint_1 |
| OpBranch %107 |
| %108 = OpLabel |
| %l_a_i_a = OpLoad %_arr_Inner_uint_4 %101 None |
| %112 = OpLoad %Inner_std140 %45 None |
| %l_a_i_a_i = OpFunctionCall %Inner %tint_convert_Inner %112 |
| %115 = OpFunctionCall %int %i |
| %116 = OpBitcast %uint %115 |
| %117 = OpExtInst %uint %36 UMin %116 %uint_2 |
| %l_a_i_a_i_m_i_i = OpVectorExtractDynamic %float %l_a_i_a_i_m_i %117 |
| OpReturn |
| OpFunctionEnd |
| %tint_convert_Inner = OpFunction %Inner None %139 |
| %tint_input = OpFunctionParameter %Inner_std140 |
| %140 = OpLabel |
| %141 = OpCompositeExtract %v3float %tint_input 0 |
| %142 = OpCompositeExtract %v3float %tint_input 1 |
| %143 = OpCompositeExtract %v3float %tint_input 2 |
| %144 = OpCompositeExtract %v3float %tint_input 3 |
| %145 = OpCompositeConstruct %mat4v3float %141 %142 %143 %144 |
| %146 = OpCompositeConstruct %Inner %145 |
| OpReturnValue %146 |
| OpFunctionEnd |
| %tint_convert_Outer = OpFunction %Outer None %148 |
| %tint_input_0 = OpFunctionParameter %Outer_std140 |
| %149 = OpLabel |
| %151 = OpVariable %_ptr_Function__arr_Inner_std140_uint_4_0 Function |
| %152 = OpVariable %_ptr_Function__arr_Inner_uint_4 Function %103 |
| %150 = OpCompositeExtract %_arr_Inner_std140_uint_4_0 %tint_input_0 0 |
| OpStore %151 %150 |
| OpBranch %153 |
| %153 = OpLabel |
| OpBranch %156 |
| %156 = OpLabel |
| %158 = OpPhi %uint %uint_0 %153 %159 %155 |
| OpLoopMerge %157 %155 None |
| OpBranch %154 |
| %154 = OpLabel |
| %162 = OpUGreaterThanEqual %bool %158 %uint_4 |
| OpSelectionMerge %163 None |
| OpBranchConditional %162 %164 %163 |
| %164 = OpLabel |
| OpBranch %157 |
| %163 = OpLabel |
| %165 = OpAccessChain %_ptr_Function_Inner %152 %158 |
| %166 = OpAccessChain %_ptr_Function_Inner_std140 %151 %158 |
| %167 = OpLoad %Inner_std140 %166 None |
| %168 = OpFunctionCall %Inner %tint_convert_Inner %167 |
| OpStore %165 %168 None |
| OpBranch %155 |
| %155 = OpLabel |
| %159 = OpIAdd %uint %158 %uint_1 |
| OpBranch %156 |
| %157 = OpLabel |
| %160 = OpLoad %_arr_Inner_uint_4 %152 None |
| %161 = OpCompositeConstruct %Outer %160 |
| OpReturnValue %161 |
| OpFunctionEnd |
| %tint_convert_explicit_layout = OpFunction %_arr_Inner_std140_uint_4_0 None %170 |
| %tint_source = OpFunctionParameter %_arr_Inner_std140_uint_4 |
| %171 = OpLabel |
| %172 = OpVariable %_ptr_Function__arr_Inner_std140_uint_4 Function |
| %174 = OpVariable %_ptr_Function__arr_Inner_std140_uint_4_0 Function %175 |
| OpStore %172 %tint_source |
| OpBranch %176 |
| %176 = OpLabel |
| OpBranch %179 |
| %179 = OpLabel |
| %181 = OpPhi %uint %uint_0 %176 %182 %178 |
| OpLoopMerge %180 %178 None |
| OpBranch %177 |
| %177 = OpLabel |
| %184 = OpUGreaterThanEqual %bool %181 %uint_4 |
| OpSelectionMerge %185 None |
| OpBranchConditional %184 %186 %185 |
| %186 = OpLabel |
| OpBranch %180 |
| %185 = OpLabel |
| %187 = OpAccessChain %_ptr_Function_Inner_std140 %172 %181 |
| %188 = OpLoad %Inner_std140 %187 None |
| %189 = OpAccessChain %_ptr_Function_Inner_std140 %174 %181 |
| OpStore %189 %188 None |
| OpBranch %178 |
| %178 = OpLabel |
| %182 = OpIAdd %uint %181 %uint_1 |
| OpBranch %179 |
| %180 = OpLabel |
| %183 = OpLoad %_arr_Inner_std140_uint_4_0 %174 None |
| OpReturnValue %183 |
| OpFunctionEnd |
| %tint_convert_explicit_layout_0 = OpFunction %Outer_std140 None %191 |
| %tint_source_0 = OpFunctionParameter %Outer_std140_tint_explicit_layout |
| %192 = OpLabel |
| %193 = OpCompositeExtract %_arr_Inner_std140_uint_4 %tint_source_0 0 |
| %194 = OpFunctionCall %_arr_Inner_std140_uint_4_0 %tint_convert_explicit_layout %193 |
| %195 = OpCompositeConstruct %Outer_std140 %194 |
| OpReturnValue %195 |
| OpFunctionEnd |
| %tint_convert_explicit_layout_1 = OpFunction %_arr_Outer_std140_uint_4 None %197 |
| %tint_source_1 = OpFunctionParameter %_arr_Outer_std140_tint_explicit_layout_uint_4 |
| %198 = OpLabel |
| %199 = OpVariable %_ptr_Function__arr_Outer_std140_tint_explicit_layout_uint_4 Function |
| %201 = OpVariable %_ptr_Function__arr_Outer_std140_uint_4 Function %202 |
| OpStore %199 %tint_source_1 |
| OpBranch %203 |
| %203 = OpLabel |
| OpBranch %206 |
| %206 = OpLabel |
| %208 = OpPhi %uint %uint_0 %203 %209 %205 |
| OpLoopMerge %207 %205 None |
| OpBranch %204 |
| %204 = OpLabel |
| %211 = OpUGreaterThanEqual %bool %208 %uint_4 |
| OpSelectionMerge %212 None |
| OpBranchConditional %211 %213 %212 |
| %213 = OpLabel |
| OpBranch %207 |
| %212 = OpLabel |
| %214 = OpAccessChain %_ptr_Function_Outer_std140_tint_explicit_layout %199 %208 |
| %216 = OpLoad %Outer_std140_tint_explicit_layout %214 None |
| %217 = OpFunctionCall %Outer_std140 %tint_convert_explicit_layout_0 %216 |
| %218 = OpAccessChain %_ptr_Function_Outer_std140 %201 %208 |
| OpStore %218 %217 None |
| OpBranch %205 |
| %205 = OpLabel |
| %209 = OpIAdd %uint %208 %uint_1 |
| OpBranch %206 |
| %207 = OpLabel |
| %210 = OpLoad %_arr_Outer_std140_uint_4 %201 None |
| OpReturnValue %210 |
| OpFunctionEnd |