2021-05-20 21:31:37 +00:00
|
|
|
; SPIR-V
|
|
|
|
; Version: 1.3
|
|
|
|
; Generator: Google Tint Compiler; 0
|
2021-08-05 17:34:19 +00:00
|
|
|
; Bound: 74
|
2021-05-20 21:31:37 +00:00
|
|
|
; Schema: 0
|
|
|
|
OpCapability Shader
|
|
|
|
OpMemoryModel Logical GLSL450
|
2021-08-05 17:34:19 +00:00
|
|
|
OpEntryPoint GLCompute %main "main" %global_id_1
|
2021-05-20 21:31:37 +00:00
|
|
|
OpExecutionMode %main LocalSize 2 2 1
|
2021-08-05 17:34:19 +00:00
|
|
|
OpName %global_id_1 "global_id_1"
|
2021-05-20 21:31:37 +00:00
|
|
|
OpName %Matrix "Matrix"
|
|
|
|
OpMemberName %Matrix 0 "numbers"
|
|
|
|
OpName %firstMatrix "firstMatrix"
|
|
|
|
OpName %secondMatrix "secondMatrix"
|
|
|
|
OpName %resultMatrix "resultMatrix"
|
|
|
|
OpName %Uniforms "Uniforms"
|
|
|
|
OpMemberName %Uniforms 0 "aShape"
|
|
|
|
OpMemberName %Uniforms 1 "bShape"
|
|
|
|
OpMemberName %Uniforms 2 "outShape"
|
|
|
|
OpName %uniforms "uniforms"
|
2021-08-05 17:34:19 +00:00
|
|
|
OpName %main_inner "main_inner"
|
|
|
|
OpName %global_id "global_id"
|
2021-05-20 21:31:37 +00:00
|
|
|
OpName %result "result"
|
|
|
|
OpName %i "i"
|
2021-08-05 17:34:19 +00:00
|
|
|
OpName %main "main"
|
|
|
|
OpDecorate %global_id_1 BuiltIn GlobalInvocationId
|
2021-05-20 21:31:37 +00:00
|
|
|
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 NonReadable
|
|
|
|
OpDecorate %resultMatrix DescriptorSet 0
|
|
|
|
OpDecorate %resultMatrix Binding 2
|
|
|
|
OpDecorate %Uniforms Block
|
|
|
|
OpMemberDecorate %Uniforms 0 Offset 0
|
|
|
|
OpMemberDecorate %Uniforms 1 Offset 8
|
|
|
|
OpMemberDecorate %Uniforms 2 Offset 16
|
2021-06-04 22:17:37 +00:00
|
|
|
OpDecorate %uniforms NonWritable
|
2021-05-20 21:31:37 +00:00
|
|
|
OpDecorate %uniforms DescriptorSet 0
|
|
|
|
OpDecorate %uniforms Binding 3
|
|
|
|
%uint = OpTypeInt 32 0
|
2021-08-05 17:34:19 +00:00
|
|
|
%v3uint = OpTypeVector %uint 3
|
|
|
|
%_ptr_Input_v3uint = OpTypePointer Input %v3uint
|
|
|
|
%global_id_1 = OpVariable %_ptr_Input_v3uint Input
|
2021-05-20 21:31:37 +00:00
|
|
|
%_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
|
|
|
|
%_ptr_Uniform_Uniforms = OpTypePointer Uniform %Uniforms
|
|
|
|
%uniforms = OpVariable %_ptr_Uniform_Uniforms Uniform
|
|
|
|
%void = OpTypeVoid
|
2021-08-05 17:34:19 +00:00
|
|
|
%15 = OpTypeFunction %void %v3uint
|
2021-05-20 21:31:37 +00:00
|
|
|
%uint_0 = OpConstant %uint 0
|
2021-08-05 17:34:19 +00:00
|
|
|
%uint_1 = OpConstant %uint 1
|
2021-05-20 21:31:37 +00:00
|
|
|
%_ptr_Uniform_uint = OpTypePointer Uniform %uint
|
|
|
|
%uint_2 = OpConstant %uint 2
|
|
|
|
%_ptr_Function_uint = OpTypePointer Function %uint
|
2021-08-05 17:34:19 +00:00
|
|
|
%33 = OpConstantNull %uint
|
2021-05-20 21:31:37 +00:00
|
|
|
%bool = OpTypeBool
|
|
|
|
%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
|
2021-08-05 17:34:19 +00:00
|
|
|
%69 = OpTypeFunction %void
|
|
|
|
%main_inner = OpFunction %void None %15
|
|
|
|
%global_id = OpFunctionParameter %v3uint
|
|
|
|
%19 = OpLabel
|
|
|
|
%result = OpVariable %_ptr_Function_uint Function %33
|
|
|
|
%i = OpVariable %_ptr_Function_uint Function %33
|
|
|
|
%20 = OpCompositeExtract %uint %global_id 1
|
|
|
|
%21 = OpCompositeExtract %uint %global_id 0
|
|
|
|
%22 = OpCompositeConstruct %v2uint %20 %21
|
|
|
|
%26 = OpAccessChain %_ptr_Uniform_uint %uniforms %uint_0 %uint_1
|
|
|
|
%27 = OpLoad %uint %26
|
|
|
|
%29 = OpAccessChain %_ptr_Uniform_uint %uniforms %uint_2 %uint_1
|
|
|
|
%30 = OpLoad %uint %29
|
2021-05-20 21:31:37 +00:00
|
|
|
OpStore %result %uint_0
|
|
|
|
OpStore %i %uint_0
|
2021-08-05 17:34:19 +00:00
|
|
|
OpBranch %35
|
|
|
|
%35 = OpLabel
|
|
|
|
OpLoopMerge %36 %37 None
|
2021-05-20 21:31:37 +00:00
|
|
|
OpBranch %38
|
2021-08-05 17:34:19 +00:00
|
|
|
%38 = OpLabel
|
|
|
|
%40 = OpLoad %uint %i
|
|
|
|
%41 = OpULessThan %bool %40 %27
|
|
|
|
%39 = OpLogicalNot %bool %41
|
|
|
|
OpSelectionMerge %43 None
|
|
|
|
OpBranchConditional %39 %44 %43
|
|
|
|
%44 = OpLabel
|
|
|
|
OpBranch %36
|
|
|
|
%43 = OpLabel
|
|
|
|
%45 = OpLoad %uint %i
|
|
|
|
%46 = OpCompositeExtract %uint %22 0
|
|
|
|
%47 = OpIMul %uint %46 %27
|
|
|
|
%48 = OpIAdd %uint %45 %47
|
|
|
|
%49 = OpCompositeExtract %uint %22 1
|
|
|
|
%50 = OpLoad %uint %i
|
|
|
|
%51 = OpIMul %uint %50 %30
|
|
|
|
%52 = OpIAdd %uint %49 %51
|
|
|
|
%53 = OpLoad %uint %result
|
|
|
|
%55 = OpAccessChain %_ptr_StorageBuffer_uint %firstMatrix %uint_0 %48
|
|
|
|
%56 = OpLoad %uint %55
|
|
|
|
%57 = OpAccessChain %_ptr_StorageBuffer_uint %secondMatrix %uint_0 %52
|
2021-05-20 21:31:37 +00:00
|
|
|
%58 = OpLoad %uint %57
|
2021-08-05 17:34:19 +00:00
|
|
|
%59 = OpIMul %uint %56 %58
|
|
|
|
%60 = OpIAdd %uint %53 %59
|
|
|
|
OpStore %result %60
|
2021-05-20 21:31:37 +00:00
|
|
|
OpBranch %37
|
2021-08-05 17:34:19 +00:00
|
|
|
%37 = OpLabel
|
|
|
|
%61 = OpLoad %uint %i
|
|
|
|
%62 = OpIAdd %uint %61 %uint_1
|
|
|
|
OpStore %i %62
|
|
|
|
OpBranch %35
|
|
|
|
%36 = OpLabel
|
|
|
|
%63 = OpCompositeExtract %uint %22 1
|
|
|
|
%64 = OpCompositeExtract %uint %22 0
|
|
|
|
%65 = OpIMul %uint %64 %30
|
|
|
|
%66 = OpIAdd %uint %63 %65
|
|
|
|
%67 = OpAccessChain %_ptr_StorageBuffer_uint %resultMatrix %uint_0 %66
|
|
|
|
%68 = OpLoad %uint %result
|
|
|
|
OpStore %67 %68
|
|
|
|
OpReturn
|
|
|
|
OpFunctionEnd
|
|
|
|
%main = OpFunction %void None %69
|
|
|
|
%71 = OpLabel
|
|
|
|
%73 = OpLoad %v3uint %global_id_1
|
|
|
|
%72 = OpFunctionCall %void %main_inner %73
|
2021-05-20 21:31:37 +00:00
|
|
|
OpReturn
|
|
|
|
OpFunctionEnd
|