| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 0 |
| ; Bound: 75 |
| ; Schema: 0 |
| OpCapability Shader |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint GLCompute %main "main" %global_id_1 |
| OpExecutionMode %main LocalSize 2 2 1 |
| OpName %global_id_1 "global_id_1" |
| OpName %Matrix "Matrix" |
| OpMemberName %Matrix 0 "numbers" |
| OpName %firstMatrix "firstMatrix" |
| OpName %secondMatrix "secondMatrix" |
| OpName %resultMatrix "resultMatrix" |
| OpName %uniforms_block "uniforms_block" |
| OpMemberName %uniforms_block 0 "inner" |
| OpName %Uniforms "Uniforms" |
| OpMemberName %Uniforms 0 "aShape" |
| OpMemberName %Uniforms 1 "bShape" |
| OpMemberName %Uniforms 2 "outShape" |
| OpName %uniforms "uniforms" |
| OpName %main_inner "main_inner" |
| OpName %global_id "global_id" |
| OpName %result "result" |
| OpName %i "i" |
| OpName %main "main" |
| OpDecorate %global_id_1 BuiltIn GlobalInvocationId |
| OpDecorate %Matrix Block |
| OpMemberDecorate %Matrix 0 Offset 0 |
| OpDecorate %_runtimearr_uint ArrayStride 4 |
| OpDecorate %firstMatrix NonWritable |
| OpDecorate %firstMatrix DescriptorSet 0 |
| OpDecorate %firstMatrix Binding 0 |
| OpDecorate %secondMatrix NonWritable |
| OpDecorate %secondMatrix DescriptorSet 0 |
| OpDecorate %secondMatrix Binding 1 |
| OpDecorate %resultMatrix DescriptorSet 0 |
| OpDecorate %resultMatrix Binding 2 |
| OpDecorate %uniforms_block Block |
| OpMemberDecorate %uniforms_block 0 Offset 0 |
| OpMemberDecorate %Uniforms 0 Offset 0 |
| OpMemberDecorate %Uniforms 1 Offset 8 |
| OpMemberDecorate %Uniforms 2 Offset 16 |
| OpDecorate %uniforms NonWritable |
| OpDecorate %uniforms DescriptorSet 0 |
| OpDecorate %uniforms Binding 3 |
| %uint = OpTypeInt 32 0 |
| %v3uint = OpTypeVector %uint 3 |
| %_ptr_Input_v3uint = OpTypePointer Input %v3uint |
| %global_id_1 = OpVariable %_ptr_Input_v3uint Input |
| %_runtimearr_uint = OpTypeRuntimeArray %uint |
| %Matrix = OpTypeStruct %_runtimearr_uint |
| %_ptr_StorageBuffer_Matrix = OpTypePointer StorageBuffer %Matrix |
| %firstMatrix = OpVariable %_ptr_StorageBuffer_Matrix StorageBuffer |
| %secondMatrix = OpVariable %_ptr_StorageBuffer_Matrix StorageBuffer |
| %resultMatrix = OpVariable %_ptr_StorageBuffer_Matrix StorageBuffer |
| %v2uint = OpTypeVector %uint 2 |
| %Uniforms = OpTypeStruct %v2uint %v2uint %v2uint |
| %uniforms_block = OpTypeStruct %Uniforms |
| %_ptr_Uniform_uniforms_block = OpTypePointer Uniform %uniforms_block |
| %uniforms = OpVariable %_ptr_Uniform_uniforms_block Uniform |
| %void = OpTypeVoid |
| %16 = OpTypeFunction %void %v3uint |
| %uint_0 = OpConstant %uint 0 |
| %uint_1 = OpConstant %uint 1 |
| %_ptr_Uniform_uint = OpTypePointer Uniform %uint |
| %uint_2 = OpConstant %uint 2 |
| %32 = OpConstantNull %uint |
| %_ptr_Function_uint = OpTypePointer Function %uint |
| %bool = OpTypeBool |
| %_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint |
| %70 = OpTypeFunction %void |
| %main_inner = OpFunction %void None %16 |
| %global_id = OpFunctionParameter %v3uint |
| %20 = OpLabel |
| %result = OpVariable %_ptr_Function_uint Function %32 |
| %i = OpVariable %_ptr_Function_uint Function %32 |
| %21 = OpCompositeExtract %uint %global_id 1 |
| %22 = OpCompositeExtract %uint %global_id 0 |
| %23 = OpCompositeConstruct %v2uint %21 %22 |
| %27 = OpAccessChain %_ptr_Uniform_uint %uniforms %uint_0 %uint_0 %uint_1 |
| %28 = OpLoad %uint %27 |
| %30 = OpAccessChain %_ptr_Uniform_uint %uniforms %uint_0 %uint_2 %uint_1 |
| %31 = OpLoad %uint %30 |
| OpStore %result %32 |
| OpStore %i %32 |
| OpBranch %36 |
| %36 = OpLabel |
| OpLoopMerge %37 %38 None |
| OpBranch %39 |
| %39 = OpLabel |
| %41 = OpLoad %uint %i |
| %42 = OpULessThan %bool %41 %28 |
| %40 = OpLogicalNot %bool %42 |
| OpSelectionMerge %44 None |
| OpBranchConditional %40 %45 %44 |
| %45 = OpLabel |
| OpBranch %37 |
| %44 = OpLabel |
| %46 = OpLoad %uint %i |
| %47 = OpCompositeExtract %uint %23 0 |
| %48 = OpIMul %uint %47 %28 |
| %49 = OpIAdd %uint %46 %48 |
| %50 = OpCompositeExtract %uint %23 1 |
| %51 = OpLoad %uint %i |
| %52 = OpIMul %uint %51 %31 |
| %53 = OpIAdd %uint %50 %52 |
| %54 = OpLoad %uint %result |
| %56 = OpAccessChain %_ptr_StorageBuffer_uint %firstMatrix %uint_0 %49 |
| %57 = OpLoad %uint %56 |
| %58 = OpAccessChain %_ptr_StorageBuffer_uint %secondMatrix %uint_0 %53 |
| %59 = OpLoad %uint %58 |
| %60 = OpIMul %uint %57 %59 |
| %61 = OpIAdd %uint %54 %60 |
| OpStore %result %61 |
| OpBranch %38 |
| %38 = OpLabel |
| %62 = OpLoad %uint %i |
| %63 = OpIAdd %uint %62 %uint_1 |
| OpStore %i %63 |
| OpBranch %36 |
| %37 = OpLabel |
| %64 = OpCompositeExtract %uint %23 1 |
| %65 = OpCompositeExtract %uint %23 0 |
| %66 = OpIMul %uint %65 %31 |
| %67 = OpIAdd %uint %64 %66 |
| %68 = OpAccessChain %_ptr_StorageBuffer_uint %resultMatrix %uint_0 %67 |
| %69 = OpLoad %uint %result |
| OpStore %68 %69 |
| OpReturn |
| OpFunctionEnd |
| %main = OpFunction %void None %70 |
| %72 = OpLabel |
| %74 = OpLoad %v3uint %global_id_1 |
| %73 = OpFunctionCall %void %main_inner %74 |
| OpReturn |
| OpFunctionEnd |