| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 0 |
| ; Bound: 70 |
| ; 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 "u_block" |
| OpMemberName %u_block 0 "inner" |
| OpName %u "u" |
| OpName %w "w" |
| 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 Block |
| OpMemberDecorate %u_block 0 Offset 0 |
| OpMemberDecorate %u_block 0 ColMajor |
| OpMemberDecorate %u_block 0 MatrixStride 16 |
| OpDecorate %_arr_mat2v3float_uint_4 ArrayStride 32 |
| OpDecorate %u NonWritable |
| OpDecorate %u DescriptorSet 0 |
| OpDecorate %u Binding 0 |
| %uint = OpTypeInt 32 0 |
| %_ptr_Input_uint = OpTypePointer Input %uint |
| %local_invocation_index_1 = OpVariable %_ptr_Input_uint Input |
| %float = OpTypeFloat 32 |
| %v3float = OpTypeVector %float 3 |
| %mat2v3float = OpTypeMatrix %v3float 2 |
| %uint_4 = OpConstant %uint 4 |
| %_arr_mat2v3float_uint_4 = OpTypeArray %mat2v3float %uint_4 |
| %u_block = OpTypeStruct %_arr_mat2v3float_uint_4 |
| %_ptr_Uniform_u_block = OpTypePointer Uniform %u_block |
| %u = OpVariable %_ptr_Uniform_u_block Uniform |
| %_ptr_Workgroup__arr_mat2v3float_uint_4 = OpTypePointer Workgroup %_arr_mat2v3float_uint_4 |
| %w = OpVariable %_ptr_Workgroup__arr_mat2v3float_uint_4 Workgroup |
| %void = OpTypeVoid |
| %14 = OpTypeFunction %void %uint |
| %_ptr_Function_uint = OpTypePointer Function %uint |
| %21 = OpConstantNull %uint |
| %bool = OpTypeBool |
| %_ptr_Workgroup_mat2v3float = OpTypePointer Workgroup %mat2v3float |
| %35 = OpConstantNull %mat2v3float |
| %uint_1 = OpConstant %uint 1 |
| %uint_2 = OpConstant %uint 2 |
| %uint_264 = OpConstant %uint 264 |
| %uint_0 = OpConstant %uint 0 |
| %_ptr_Uniform__arr_mat2v3float_uint_4 = OpTypePointer Uniform %_arr_mat2v3float_uint_4 |
| %int = OpTypeInt 32 1 |
| %int_1 = OpConstant %int 1 |
| %int_2 = OpConstant %int 2 |
| %_ptr_Uniform_mat2v3float = OpTypePointer Uniform %mat2v3float |
| %53 = OpConstantNull %int |
| %_ptr_Workgroup_v3float = OpTypePointer Workgroup %v3float |
| %_ptr_Uniform_v3float = OpTypePointer Uniform %v3float |
| %_ptr_Workgroup_float = OpTypePointer Workgroup %float |
| %_ptr_Uniform_float = OpTypePointer Uniform %float |
| %65 = OpTypeFunction %void |
| %f_inner = OpFunction %void None %14 |
| %local_invocation_index = OpFunctionParameter %uint |
| %18 = OpLabel |
| %idx = OpVariable %_ptr_Function_uint Function %21 |
| OpStore %idx %local_invocation_index |
| OpBranch %22 |
| %22 = OpLabel |
| OpLoopMerge %23 %24 None |
| OpBranch %25 |
| %25 = OpLabel |
| %27 = OpLoad %uint %idx |
| %28 = OpULessThan %bool %27 %uint_4 |
| %26 = OpLogicalNot %bool %28 |
| OpSelectionMerge %30 None |
| OpBranchConditional %26 %31 %30 |
| %31 = OpLabel |
| OpBranch %23 |
| %30 = OpLabel |
| %32 = OpLoad %uint %idx |
| %34 = OpAccessChain %_ptr_Workgroup_mat2v3float %w %32 |
| OpStore %34 %35 |
| OpBranch %24 |
| %24 = OpLabel |
| %36 = OpLoad %uint %idx |
| %38 = OpIAdd %uint %36 %uint_1 |
| OpStore %idx %38 |
| OpBranch %22 |
| %23 = OpLabel |
| OpControlBarrier %uint_2 %uint_2 %uint_264 |
| %44 = OpAccessChain %_ptr_Uniform__arr_mat2v3float_uint_4 %u %uint_0 |
| %45 = OpLoad %_arr_mat2v3float_uint_4 %44 |
| OpStore %w %45 |
| %48 = OpAccessChain %_ptr_Workgroup_mat2v3float %w %int_1 |
| %51 = OpAccessChain %_ptr_Uniform_mat2v3float %u %uint_0 %int_2 |
| %52 = OpLoad %mat2v3float %51 |
| OpStore %48 %52 |
| %55 = OpAccessChain %_ptr_Workgroup_v3float %w %int_1 %53 |
| %57 = OpAccessChain %_ptr_Uniform_v3float %u %uint_0 %53 %int_1 |
| %58 = OpLoad %v3float %57 |
| %59 = OpVectorShuffle %v3float %58 %58 2 0 1 |
| OpStore %55 %59 |
| %61 = OpAccessChain %_ptr_Workgroup_float %w %int_1 %53 %uint_0 |
| %63 = OpAccessChain %_ptr_Uniform_float %u %uint_0 %53 %int_1 %uint_0 |
| %64 = OpLoad %float %63 |
| OpStore %61 %64 |
| OpReturn |
| OpFunctionEnd |
| %f = OpFunction %void None %65 |
| %67 = OpLabel |
| %69 = OpLoad %uint %local_invocation_index_1 |
| %68 = OpFunctionCall %void %f_inner %69 |
| OpReturn |
| OpFunctionEnd |