| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 0 |
| ; Bound: 108 |
| ; Schema: 0 |
| OpCapability Shader |
| 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 %mat4x2_f32 "mat4x2_f32" |
| OpMemberName %mat4x2_f32 0 "col0" |
| OpMemberName %mat4x2_f32 1 "col1" |
| OpMemberName %mat4x2_f32 2 "col2" |
| OpMemberName %mat4x2_f32 3 "col3" |
| OpName %a "a" |
| OpName %counter "counter" |
| OpName %i "i" |
| OpName %conv_mat4x2_f32 "conv_mat4x2_f32" |
| OpName %val "val" |
| OpName %conv_arr4_mat4x2_f32 "conv_arr4_mat4x2_f32" |
| 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 %f "f" |
| OpDecorate %a_block_std140 Block |
| OpMemberDecorate %a_block_std140 0 Offset 0 |
| OpMemberDecorate %mat4x2_f32 0 Offset 0 |
| OpMemberDecorate %mat4x2_f32 1 Offset 8 |
| OpMemberDecorate %mat4x2_f32 2 Offset 16 |
| OpMemberDecorate %mat4x2_f32 3 Offset 24 |
| OpDecorate %_arr_mat4x2_f32_uint_4 ArrayStride 32 |
| OpDecorate %a NonWritable |
| OpDecorate %a DescriptorSet 0 |
| OpDecorate %a Binding 0 |
| OpDecorate %_arr_mat4v2float_uint_4 ArrayStride 32 |
| %float = OpTypeFloat 32 |
| %v2float = OpTypeVector %float 2 |
| %mat4x2_f32 = OpTypeStruct %v2float %v2float %v2float %v2float |
| %uint = OpTypeInt 32 0 |
| %uint_4 = OpConstant %uint 4 |
| %_arr_mat4x2_f32_uint_4 = OpTypeArray %mat4x2_f32 %uint_4 |
| %a_block_std140 = OpTypeStruct %_arr_mat4x2_f32_uint_4 |
| %_ptr_Uniform_a_block_std140 = OpTypePointer Uniform %a_block_std140 |
| %a = OpVariable %_ptr_Uniform_a_block_std140 Uniform |
| %int = OpTypeInt 32 1 |
| %11 = OpConstantNull %int |
| %_ptr_Private_int = OpTypePointer Private %int |
| %counter = OpVariable %_ptr_Private_int Private %11 |
| %14 = OpTypeFunction %int |
| %int_1 = OpConstant %int 1 |
| %mat4v2float = OpTypeMatrix %v2float 4 |
| %21 = OpTypeFunction %mat4v2float %mat4x2_f32 |
| %_arr_mat4v2float_uint_4 = OpTypeArray %mat4v2float %uint_4 |
| %31 = OpTypeFunction %_arr_mat4v2float_uint_4 %_arr_mat4x2_f32_uint_4 |
| %_ptr_Function__arr_mat4v2float_uint_4 = OpTypePointer Function %_arr_mat4v2float_uint_4 |
| %38 = OpConstantNull %_arr_mat4v2float_uint_4 |
| %_ptr_Function_uint = OpTypePointer Function %uint |
| %41 = OpConstantNull %uint |
| %bool = OpTypeBool |
| %_ptr_Function__arr_mat4x2_f32_uint_4 = OpTypePointer Function %_arr_mat4x2_f32_uint_4 |
| %54 = OpConstantNull %_arr_mat4x2_f32_uint_4 |
| %_ptr_Function_mat4v2float = OpTypePointer Function %mat4v2float |
| %_ptr_Function_mat4x2_f32 = OpTypePointer Function %mat4x2_f32 |
| %uint_1 = OpConstant %uint 1 |
| %67 = OpTypeFunction %v2float %uint %uint |
| %uint_0 = OpConstant %uint 0 |
| %_ptr_Uniform_v2float = OpTypePointer Uniform %v2float |
| %uint_2 = OpConstant %uint 2 |
| %uint_3 = OpConstant %uint 3 |
| %90 = OpConstantNull %v2float |
| %void = OpTypeVoid |
| %91 = OpTypeFunction %void |
| %_ptr_Uniform__arr_mat4x2_f32_uint_4 = OpTypePointer Uniform %_arr_mat4x2_f32_uint_4 |
| %_ptr_Uniform_mat4x2_f32 = OpTypePointer Uniform %mat4x2_f32 |
| %i = OpFunction %int None %14 |
| %16 = OpLabel |
| %17 = OpLoad %int %counter |
| %19 = OpIAdd %int %17 %int_1 |
| OpStore %counter %19 |
| %20 = OpLoad %int %counter |
| OpReturnValue %20 |
| OpFunctionEnd |
| %conv_mat4x2_f32 = OpFunction %mat4v2float None %21 |
| %val = OpFunctionParameter %mat4x2_f32 |
| %25 = OpLabel |
| %26 = OpCompositeExtract %v2float %val 0 |
| %27 = OpCompositeExtract %v2float %val 1 |
| %28 = OpCompositeExtract %v2float %val 2 |
| %29 = OpCompositeExtract %v2float %val 3 |
| %30 = OpCompositeConstruct %mat4v2float %26 %27 %28 %29 |
| OpReturnValue %30 |
| OpFunctionEnd |
| %conv_arr4_mat4x2_f32 = OpFunction %_arr_mat4v2float_uint_4 None %31 |
| %val_0 = OpFunctionParameter %_arr_mat4x2_f32_uint_4 |
| %35 = OpLabel |
| %arr = OpVariable %_ptr_Function__arr_mat4v2float_uint_4 Function %38 |
| %i_0 = OpVariable %_ptr_Function_uint Function %41 |
| %var_for_index = OpVariable %_ptr_Function__arr_mat4x2_f32_uint_4 Function %54 |
| OpBranch %42 |
| %42 = OpLabel |
| OpLoopMerge %43 %44 None |
| OpBranch %45 |
| %45 = OpLabel |
| %47 = OpLoad %uint %i_0 |
| %48 = OpULessThan %bool %47 %uint_4 |
| %46 = OpLogicalNot %bool %48 |
| OpSelectionMerge %50 None |
| OpBranchConditional %46 %51 %50 |
| %51 = OpLabel |
| OpBranch %43 |
| %50 = OpLabel |
| OpStore %var_for_index %val_0 |
| %55 = OpLoad %uint %i_0 |
| %57 = OpAccessChain %_ptr_Function_mat4v2float %arr %55 |
| %59 = OpLoad %uint %i_0 |
| %61 = OpAccessChain %_ptr_Function_mat4x2_f32 %var_for_index %59 |
| %62 = OpLoad %mat4x2_f32 %61 |
| %58 = OpFunctionCall %mat4v2float %conv_mat4x2_f32 %62 |
| OpStore %57 %58 |
| OpBranch %44 |
| %44 = OpLabel |
| %63 = OpLoad %uint %i_0 |
| %65 = OpIAdd %uint %63 %uint_1 |
| OpStore %i_0 %65 |
| OpBranch %42 |
| %43 = OpLabel |
| %66 = OpLoad %_arr_mat4v2float_uint_4 %arr |
| OpReturnValue %66 |
| OpFunctionEnd |
| %load_a_inner_p0_p1 = OpFunction %v2float None %67 |
| %p0 = OpFunctionParameter %uint |
| %p1 = OpFunctionParameter %uint |
| %71 = OpLabel |
| OpSelectionMerge %72 None |
| OpSwitch %p1 %73 0 %74 1 %75 2 %76 3 %77 |
| %74 = OpLabel |
| %80 = OpAccessChain %_ptr_Uniform_v2float %a %uint_0 %p0 %uint_0 |
| %81 = OpLoad %v2float %80 |
| OpReturnValue %81 |
| %75 = OpLabel |
| %82 = OpAccessChain %_ptr_Uniform_v2float %a %uint_0 %p0 %uint_1 |
| %83 = OpLoad %v2float %82 |
| OpReturnValue %83 |
| %76 = OpLabel |
| %85 = OpAccessChain %_ptr_Uniform_v2float %a %uint_0 %p0 %uint_2 |
| %86 = OpLoad %v2float %85 |
| OpReturnValue %86 |
| %77 = OpLabel |
| %88 = OpAccessChain %_ptr_Uniform_v2float %a %uint_0 %p0 %uint_3 |
| %89 = OpLoad %v2float %88 |
| OpReturnValue %89 |
| %73 = OpLabel |
| OpReturnValue %90 |
| %72 = OpLabel |
| OpReturnValue %90 |
| OpFunctionEnd |
| %f = OpFunction %void None %91 |
| %94 = OpLabel |
| %95 = OpFunctionCall %int %i |
| %96 = OpFunctionCall %int %i |
| %99 = OpAccessChain %_ptr_Uniform__arr_mat4x2_f32_uint_4 %a %uint_0 |
| %100 = OpLoad %_arr_mat4x2_f32_uint_4 %99 |
| %97 = OpFunctionCall %_arr_mat4v2float_uint_4 %conv_arr4_mat4x2_f32 %100 |
| %103 = OpAccessChain %_ptr_Uniform_mat4x2_f32 %a %uint_0 %95 |
| %104 = OpLoad %mat4x2_f32 %103 |
| %101 = OpFunctionCall %mat4v2float %conv_mat4x2_f32 %104 |
| %106 = OpBitcast %uint %95 |
| %107 = OpBitcast %uint %96 |
| %105 = OpFunctionCall %v2float %load_a_inner_p0_p1 %106 %107 |
| OpReturn |
| OpFunctionEnd |