| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 0 |
| ; Bound: 90 |
| ; 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 %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 "i" |
| OpName %var_for_index "var_for_index" |
| 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 |
| %mat2v2float = OpTypeMatrix %v2float 2 |
| %13 = OpTypeFunction %mat2v2float %mat2x2_f32 |
| %_arr_mat2v2float_uint_4 = OpTypeArray %mat2v2float %uint_4 |
| %21 = OpTypeFunction %_arr_mat2v2float_uint_4 %_arr_mat2x2_f32_uint_4 |
| %_ptr_Function__arr_mat2v2float_uint_4 = OpTypePointer Function %_arr_mat2v2float_uint_4 |
| %28 = OpConstantNull %_arr_mat2v2float_uint_4 |
| %_ptr_Function_uint = OpTypePointer Function %uint |
| %31 = OpConstantNull %uint |
| %bool = OpTypeBool |
| %_ptr_Function__arr_mat2x2_f32_uint_4 = OpTypePointer Function %_arr_mat2x2_f32_uint_4 |
| %44 = 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 |
| %void = OpTypeVoid |
| %57 = OpTypeFunction %void |
| %uint_0 = OpConstant %uint 0 |
| %_ptr_Uniform__arr_mat2x2_f32_uint_4 = OpTypePointer Uniform %_arr_mat2x2_f32_uint_4 |
| %uint_2 = OpConstant %uint 2 |
| %_ptr_Uniform_mat2x2_f32 = OpTypePointer Uniform %mat2x2_f32 |
| %_ptr_Uniform_v2float = OpTypePointer Uniform %v2float |
| %_ptr_StorageBuffer_float = OpTypePointer StorageBuffer %float |
| %_ptr_Uniform_float = OpTypePointer Uniform %float |
| %int = OpTypeInt 32 1 |
| %80 = OpConstantNull %int |
| %conv_mat2x2_f32 = OpFunction %mat2v2float None %13 |
| %val = OpFunctionParameter %mat2x2_f32 |
| %17 = OpLabel |
| %18 = OpCompositeExtract %v2float %val 0 |
| %19 = OpCompositeExtract %v2float %val 1 |
| %20 = OpCompositeConstruct %mat2v2float %18 %19 |
| OpReturnValue %20 |
| OpFunctionEnd |
| %conv_arr4_mat2x2_f32 = OpFunction %_arr_mat2v2float_uint_4 None %21 |
| %val_0 = OpFunctionParameter %_arr_mat2x2_f32_uint_4 |
| %25 = OpLabel |
| %arr = OpVariable %_ptr_Function__arr_mat2v2float_uint_4 Function %28 |
| %i = OpVariable %_ptr_Function_uint Function %31 |
| %var_for_index = OpVariable %_ptr_Function__arr_mat2x2_f32_uint_4 Function %44 |
| OpBranch %32 |
| %32 = OpLabel |
| OpLoopMerge %33 %34 None |
| OpBranch %35 |
| %35 = OpLabel |
| %37 = OpLoad %uint %i |
| %38 = OpULessThan %bool %37 %uint_4 |
| %36 = OpLogicalNot %bool %38 |
| OpSelectionMerge %40 None |
| OpBranchConditional %36 %41 %40 |
| %41 = OpLabel |
| OpBranch %33 |
| %40 = OpLabel |
| OpStore %var_for_index %val_0 |
| %45 = OpLoad %uint %i |
| %47 = OpAccessChain %_ptr_Function_mat2v2float %arr %45 |
| %49 = OpLoad %uint %i |
| %51 = OpAccessChain %_ptr_Function_mat2x2_f32 %var_for_index %49 |
| %52 = OpLoad %mat2x2_f32 %51 |
| %48 = OpFunctionCall %mat2v2float %conv_mat2x2_f32 %52 |
| OpStore %47 %48 |
| OpBranch %34 |
| %34 = OpLabel |
| %53 = OpLoad %uint %i |
| %55 = OpIAdd %uint %53 %uint_1 |
| OpStore %i %55 |
| OpBranch %32 |
| %33 = OpLabel |
| %56 = OpLoad %_arr_mat2v2float_uint_4 %arr |
| OpReturnValue %56 |
| OpFunctionEnd |
| %f = OpFunction %void None %57 |
| %60 = OpLabel |
| %64 = OpAccessChain %_ptr_Uniform__arr_mat2x2_f32_uint_4 %a %uint_0 |
| %65 = OpLoad %_arr_mat2x2_f32_uint_4 %64 |
| %61 = OpFunctionCall %_arr_mat2v2float_uint_4 %conv_arr4_mat2x2_f32 %65 |
| %69 = OpAccessChain %_ptr_Uniform_mat2x2_f32 %a %uint_0 %uint_2 |
| %70 = OpLoad %mat2x2_f32 %69 |
| %66 = OpFunctionCall %mat2v2float %conv_mat2x2_f32 %70 |
| %72 = OpAccessChain %_ptr_Uniform_v2float %a %uint_0 %uint_2 %uint_1 |
| %73 = OpLoad %v2float %72 |
| %75 = OpAccessChain %_ptr_StorageBuffer_float %s %uint_0 |
| %77 = OpAccessChain %_ptr_Uniform_float %a %uint_0 %uint_2 %uint_1 %31 |
| %78 = OpLoad %float %77 |
| %81 = OpCompositeExtract %mat2v2float %61 0 |
| %82 = OpCompositeExtract %v2float %81 0 |
| %83 = OpCompositeExtract %float %82 0 |
| %84 = OpFAdd %float %78 %83 |
| %85 = OpCompositeExtract %v2float %66 0 |
| %86 = OpCompositeExtract %float %85 0 |
| %87 = OpFAdd %float %84 %86 |
| %88 = OpCompositeExtract %float %73 0 |
| %89 = OpFAdd %float %87 %88 |
| OpStore %75 %89 |
| OpReturn |
| OpFunctionEnd |