| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 0 |
| ; Bound: 111 |
| ; Schema: 0 |
| OpCapability Shader |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint GLCompute %f "f" %local_invocation_index_1 |
| OpExecutionMode %f LocalSize 1 1 1 |
| OpName %local_invocation_index_1 "local_invocation_index_1" |
| OpName %u_block_std140 "u_block_std140" |
| OpMemberName %u_block_std140 0 "inner" |
| OpName %mat2x2_f32 "mat2x2_f32" |
| OpMemberName %mat2x2_f32 0 "col0" |
| OpMemberName %mat2x2_f32 1 "col1" |
| OpName %u "u" |
| OpName %w "w" |
| 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_inner "f_inner" |
| OpName %local_invocation_index "local_invocation_index" |
| OpName %idx "idx" |
| OpName %f "f" |
| OpDecorate %local_invocation_index_1 BuiltIn LocalInvocationIndex |
| OpDecorate %u_block_std140 Block |
| OpMemberDecorate %u_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 %u NonWritable |
| OpDecorate %u DescriptorSet 0 |
| OpDecorate %u Binding 0 |
| OpDecorate %_arr_mat2v2float_uint_4 ArrayStride 16 |
| %uint = OpTypeInt 32 0 |
| %_ptr_Input_uint = OpTypePointer Input %uint |
| %local_invocation_index_1 = OpVariable %_ptr_Input_uint Input |
| %float = OpTypeFloat 32 |
| %v2float = OpTypeVector %float 2 |
| %mat2x2_f32 = OpTypeStruct %v2float %v2float |
| %uint_4 = OpConstant %uint 4 |
| %_arr_mat2x2_f32_uint_4 = OpTypeArray %mat2x2_f32 %uint_4 |
| %u_block_std140 = OpTypeStruct %_arr_mat2x2_f32_uint_4 |
| %_ptr_Uniform_u_block_std140 = OpTypePointer Uniform %u_block_std140 |
| %u = OpVariable %_ptr_Uniform_u_block_std140 Uniform |
| %mat2v2float = OpTypeMatrix %v2float 2 |
| %_arr_mat2v2float_uint_4 = OpTypeArray %mat2v2float %uint_4 |
| %_ptr_Workgroup__arr_mat2v2float_uint_4 = OpTypePointer Workgroup %_arr_mat2v2float_uint_4 |
| %w = OpVariable %_ptr_Workgroup__arr_mat2v2float_uint_4 Workgroup |
| %16 = OpTypeFunction %mat2v2float %mat2x2_f32 |
| %23 = OpTypeFunction %_arr_mat2v2float_uint_4 %_arr_mat2x2_f32_uint_4 |
| %_ptr_Function__arr_mat2v2float_uint_4 = OpTypePointer Function %_arr_mat2v2float_uint_4 |
| %29 = OpConstantNull %_arr_mat2v2float_uint_4 |
| %_ptr_Function_uint = OpTypePointer Function %uint |
| %32 = OpConstantNull %uint |
| %bool = OpTypeBool |
| %_ptr_Function__arr_mat2x2_f32_uint_4 = OpTypePointer Function %_arr_mat2x2_f32_uint_4 |
| %45 = 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 |
| %58 = OpTypeFunction %void %uint |
| %_ptr_Workgroup_mat2v2float = OpTypePointer Workgroup %mat2v2float |
| %76 = OpConstantNull %mat2v2float |
| %uint_2 = OpConstant %uint 2 |
| %uint_264 = OpConstant %uint 264 |
| %uint_0 = OpConstant %uint 0 |
| %_ptr_Uniform__arr_mat2x2_f32_uint_4 = OpTypePointer Uniform %_arr_mat2x2_f32_uint_4 |
| %int = OpTypeInt 32 1 |
| %int_1 = OpConstant %int 1 |
| %_ptr_Uniform_mat2x2_f32 = OpTypePointer Uniform %mat2x2_f32 |
| %94 = OpConstantNull %int |
| %_ptr_Workgroup_v2float = OpTypePointer Workgroup %v2float |
| %_ptr_Uniform_v2float = OpTypePointer Uniform %v2float |
| %_ptr_Workgroup_float = OpTypePointer Workgroup %float |
| %_ptr_Uniform_float = OpTypePointer Uniform %float |
| %106 = OpTypeFunction %void |
| %conv_mat2x2_f32 = OpFunction %mat2v2float None %16 |
| %val = OpFunctionParameter %mat2x2_f32 |
| %19 = OpLabel |
| %20 = OpCompositeExtract %v2float %val 0 |
| %21 = OpCompositeExtract %v2float %val 1 |
| %22 = OpCompositeConstruct %mat2v2float %20 %21 |
| OpReturnValue %22 |
| OpFunctionEnd |
| %conv_arr4_mat2x2_f32 = OpFunction %_arr_mat2v2float_uint_4 None %23 |
| %val_0 = OpFunctionParameter %_arr_mat2x2_f32_uint_4 |
| %26 = OpLabel |
| %arr = OpVariable %_ptr_Function__arr_mat2v2float_uint_4 Function %29 |
| %i = OpVariable %_ptr_Function_uint Function %32 |
| %var_for_index = OpVariable %_ptr_Function__arr_mat2x2_f32_uint_4 Function %45 |
| OpBranch %33 |
| %33 = OpLabel |
| OpLoopMerge %34 %35 None |
| OpBranch %36 |
| %36 = OpLabel |
| %38 = OpLoad %uint %i |
| %39 = OpULessThan %bool %38 %uint_4 |
| %37 = OpLogicalNot %bool %39 |
| OpSelectionMerge %41 None |
| OpBranchConditional %37 %42 %41 |
| %42 = OpLabel |
| OpBranch %34 |
| %41 = OpLabel |
| OpStore %var_for_index %val_0 |
| %46 = OpLoad %uint %i |
| %48 = OpAccessChain %_ptr_Function_mat2v2float %arr %46 |
| %50 = OpLoad %uint %i |
| %52 = OpAccessChain %_ptr_Function_mat2x2_f32 %var_for_index %50 |
| %53 = OpLoad %mat2x2_f32 %52 |
| %49 = OpFunctionCall %mat2v2float %conv_mat2x2_f32 %53 |
| OpStore %48 %49 |
| OpBranch %35 |
| %35 = OpLabel |
| %54 = OpLoad %uint %i |
| %56 = OpIAdd %uint %54 %uint_1 |
| OpStore %i %56 |
| OpBranch %33 |
| %34 = OpLabel |
| %57 = OpLoad %_arr_mat2v2float_uint_4 %arr |
| OpReturnValue %57 |
| OpFunctionEnd |
| %f_inner = OpFunction %void None %58 |
| %local_invocation_index = OpFunctionParameter %uint |
| %62 = OpLabel |
| %idx = OpVariable %_ptr_Function_uint Function %32 |
| OpStore %idx %local_invocation_index |
| OpBranch %64 |
| %64 = OpLabel |
| OpLoopMerge %65 %66 None |
| OpBranch %67 |
| %67 = OpLabel |
| %69 = OpLoad %uint %idx |
| %70 = OpULessThan %bool %69 %uint_4 |
| %68 = OpLogicalNot %bool %70 |
| OpSelectionMerge %71 None |
| OpBranchConditional %68 %72 %71 |
| %72 = OpLabel |
| OpBranch %65 |
| %71 = OpLabel |
| %73 = OpLoad %uint %idx |
| %75 = OpAccessChain %_ptr_Workgroup_mat2v2float %w %73 |
| OpStore %75 %76 |
| OpBranch %66 |
| %66 = OpLabel |
| %77 = OpLoad %uint %idx |
| %78 = OpIAdd %uint %77 %uint_1 |
| OpStore %idx %78 |
| OpBranch %64 |
| %65 = OpLabel |
| OpControlBarrier %uint_2 %uint_2 %uint_264 |
| %85 = OpAccessChain %_ptr_Uniform__arr_mat2x2_f32_uint_4 %u %uint_0 |
| %86 = OpLoad %_arr_mat2x2_f32_uint_4 %85 |
| %82 = OpFunctionCall %_arr_mat2v2float_uint_4 %conv_arr4_mat2x2_f32 %86 |
| OpStore %w %82 |
| %89 = OpAccessChain %_ptr_Workgroup_mat2v2float %w %int_1 |
| %92 = OpAccessChain %_ptr_Uniform_mat2x2_f32 %u %uint_0 %uint_2 |
| %93 = OpLoad %mat2x2_f32 %92 |
| %90 = OpFunctionCall %mat2v2float %conv_mat2x2_f32 %93 |
| OpStore %89 %90 |
| %96 = OpAccessChain %_ptr_Workgroup_v2float %w %int_1 %94 |
| %98 = OpAccessChain %_ptr_Uniform_v2float %u %uint_0 %32 %uint_1 |
| %99 = OpLoad %v2float %98 |
| %100 = OpVectorShuffle %v2float %99 %99 1 0 |
| OpStore %96 %100 |
| %102 = OpAccessChain %_ptr_Workgroup_float %w %int_1 %94 %uint_0 |
| %104 = OpAccessChain %_ptr_Uniform_float %u %uint_0 %32 %uint_1 %32 |
| %105 = OpLoad %float %104 |
| OpStore %102 %105 |
| OpReturn |
| OpFunctionEnd |
| %f = OpFunction %void None %106 |
| %108 = OpLabel |
| %110 = OpLoad %uint %local_invocation_index_1 |
| %109 = OpFunctionCall %void %f_inner %110 |
| OpReturn |
| OpFunctionEnd |