| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 0 |
| ; Bound: 130 |
| ; 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 %mat2x2_f32 "mat2x2_f32" |
| OpMemberName %mat2x2_f32 0 "col0" |
| OpMemberName %mat2x2_f32 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_mat2x2_f32 "conv_mat2x2_f32" |
| OpName %val "val" |
| OpName %conv_arr4_mat2x2_f32 "conv_arr4_mat2x2_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 %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 %mat2x2_f32 0 Offset 0 |
| OpMemberDecorate %mat2x2_f32 1 Offset 8 |
| OpDecorate %_arr_mat2x2_f32_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_mat2v2float_uint_4 ArrayStride 16 |
| %float = OpTypeFloat 32 |
| %v2float = OpTypeVector %float 2 |
| %mat2x2_f32 = OpTypeStruct %v2float %v2float |
| %uint = OpTypeInt 32 0 |
| %uint_4 = OpConstant %uint 4 |
| %_arr_mat2x2_f32_uint_4 = OpTypeArray %mat2x2_f32 %uint_4 |
| %a_block_std140 = OpTypeStruct %_arr_mat2x2_f32_uint_4 |
| %_ptr_Uniform_a_block_std140 = OpTypePointer Uniform %a_block_std140 |
| %a = OpVariable %_ptr_Uniform_a_block_std140 Uniform |
| %s_block = OpTypeStruct %float |
| %_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 |
| %mat2v2float = OpTypeMatrix %v2float 2 |
| %24 = OpTypeFunction %mat2v2float %mat2x2_f32 |
| %_arr_mat2v2float_uint_4 = OpTypeArray %mat2v2float %uint_4 |
| %32 = OpTypeFunction %_arr_mat2v2float_uint_4 %_arr_mat2x2_f32_uint_4 |
| %_ptr_Function__arr_mat2v2float_uint_4 = OpTypePointer Function %_arr_mat2v2float_uint_4 |
| %39 = OpConstantNull %_arr_mat2v2float_uint_4 |
| %_ptr_Function_uint = OpTypePointer Function %uint |
| %42 = OpConstantNull %uint |
| %bool = OpTypeBool |
| %_ptr_Function__arr_mat2x2_f32_uint_4 = OpTypePointer Function %_arr_mat2x2_f32_uint_4 |
| %55 = OpConstantNull %_arr_mat2x2_f32_uint_4 |
| %_ptr_Function_mat2v2float = OpTypePointer Function %mat2v2float |
| %_ptr_Function_mat2x2_f32 = OpTypePointer Function %mat2x2_f32 |
| %uint_1 = OpConstant %uint 1 |
| %68 = OpTypeFunction %v2float %uint %uint |
| %uint_0 = OpConstant %uint 0 |
| %_ptr_Uniform_v2float = OpTypePointer Uniform %v2float |
| %83 = OpConstantNull %v2float |
| %84 = OpTypeFunction %float %uint %uint |
| %_ptr_Uniform_float = OpTypePointer Uniform %float |
| %98 = OpConstantNull %float |
| %void = OpTypeVoid |
| %99 = OpTypeFunction %void |
| %_ptr_Uniform__arr_mat2x2_f32_uint_4 = OpTypePointer Uniform %_arr_mat2x2_f32_uint_4 |
| %_ptr_Uniform_mat2x2_f32 = OpTypePointer Uniform %mat2x2_f32 |
| %_ptr_StorageBuffer_float = OpTypePointer StorageBuffer %float |
| %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_mat2x2_f32 = OpFunction %mat2v2float None %24 |
| %val = OpFunctionParameter %mat2x2_f32 |
| %28 = OpLabel |
| %29 = OpCompositeExtract %v2float %val 0 |
| %30 = OpCompositeExtract %v2float %val 1 |
| %31 = OpCompositeConstruct %mat2v2float %29 %30 |
| OpReturnValue %31 |
| OpFunctionEnd |
| %conv_arr4_mat2x2_f32 = OpFunction %_arr_mat2v2float_uint_4 None %32 |
| %val_0 = OpFunctionParameter %_arr_mat2x2_f32_uint_4 |
| %36 = OpLabel |
| %arr = OpVariable %_ptr_Function__arr_mat2v2float_uint_4 Function %39 |
| %i_0 = OpVariable %_ptr_Function_uint Function %42 |
| %var_for_index = OpVariable %_ptr_Function__arr_mat2x2_f32_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_mat2v2float %arr %56 |
| %60 = OpLoad %uint %i_0 |
| %62 = OpAccessChain %_ptr_Function_mat2x2_f32 %var_for_index %60 |
| %63 = OpLoad %mat2x2_f32 %62 |
| %59 = OpFunctionCall %mat2v2float %conv_mat2x2_f32 %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_mat2v2float_uint_4 %arr |
| OpReturnValue %67 |
| OpFunctionEnd |
| %load_a_inner_p0_p1 = OpFunction %v2float 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_v2float %a %uint_0 %p0 %uint_0 |
| %80 = OpLoad %v2float %79 |
| OpReturnValue %80 |
| %76 = OpLabel |
| %81 = OpAccessChain %_ptr_Uniform_v2float %a %uint_0 %p0 %uint_1 |
| %82 = OpLoad %v2float %81 |
| OpReturnValue %82 |
| %74 = OpLabel |
| OpReturnValue %83 |
| %73 = OpLabel |
| OpReturnValue %83 |
| OpFunctionEnd |
| %load_a_inner_p0_p1_0 = OpFunction %float 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_float %a %uint_0 %p0_0 %uint_0 %42 |
| %95 = OpLoad %float %94 |
| OpReturnValue %95 |
| %92 = OpLabel |
| %96 = OpAccessChain %_ptr_Uniform_float %a %uint_0 %p0_0 %uint_1 %42 |
| %97 = OpLoad %float %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_mat2x2_f32_uint_4 %a %uint_0 |
| %108 = OpLoad %_arr_mat2x2_f32_uint_4 %107 |
| %105 = OpFunctionCall %_arr_mat2v2float_uint_4 %conv_arr4_mat2x2_f32 %108 |
| %111 = OpAccessChain %_ptr_Uniform_mat2x2_f32 %a %uint_0 %103 |
| %112 = OpLoad %mat2x2_f32 %111 |
| %109 = OpFunctionCall %mat2v2float %conv_mat2x2_f32 %112 |
| %114 = OpBitcast %uint %103 |
| %115 = OpBitcast %uint %104 |
| %113 = OpFunctionCall %v2float %load_a_inner_p0_p1 %114 %115 |
| %117 = OpAccessChain %_ptr_StorageBuffer_float %s %uint_0 |
| %119 = OpBitcast %uint %103 |
| %120 = OpBitcast %uint %104 |
| %118 = OpFunctionCall %float %load_a_inner_p0_p1_0 %119 %120 |
| %121 = OpCompositeExtract %mat2v2float %105 0 |
| %122 = OpCompositeExtract %v2float %121 0 |
| %123 = OpCompositeExtract %float %122 0 |
| %124 = OpFAdd %float %118 %123 |
| %125 = OpCompositeExtract %v2float %109 0 |
| %126 = OpCompositeExtract %float %125 0 |
| %127 = OpFAdd %float %124 %126 |
| %128 = OpCompositeExtract %float %113 0 |
| %129 = OpFAdd %float %127 %128 |
| OpStore %117 %129 |
| OpReturn |
| OpFunctionEnd |