2021-05-20 21:31:37 +00:00
|
|
|
; SPIR-V
|
|
|
|
; Version: 1.3
|
|
|
|
; Generator: Google Tint Compiler; 0
|
|
|
|
; Bound: 71
|
|
|
|
; Schema: 0
|
|
|
|
OpCapability Shader
|
|
|
|
OpMemoryModel Logical GLSL450
|
|
|
|
OpEntryPoint GLCompute %main "main" %tint_symbol
|
|
|
|
OpExecutionMode %main LocalSize 2 2 1
|
|
|
|
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"
|
|
|
|
OpName %tint_symbol "tint_symbol"
|
|
|
|
OpName %main "main"
|
|
|
|
OpName %result "result"
|
|
|
|
OpName %i "i"
|
|
|
|
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
|
|
|
|
OpDecorate %tint_symbol BuiltIn GlobalInvocationId
|
|
|
|
%uint = OpTypeInt 32 0
|
|
|
|
%_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
|
|
|
|
%v3uint = OpTypeVector %uint 3
|
|
|
|
%_ptr_Input_v3uint = OpTypePointer Input %v3uint
|
|
|
|
%tint_symbol = OpVariable %_ptr_Input_v3uint Input
|
|
|
|
%void = OpTypeVoid
|
|
|
|
%15 = OpTypeFunction %void
|
|
|
|
%uint_1 = OpConstant %uint 1
|
|
|
|
%_ptr_Input_uint = OpTypePointer Input %uint
|
|
|
|
%uint_0 = OpConstant %uint 0
|
|
|
|
%_ptr_Uniform_uint = OpTypePointer Uniform %uint
|
|
|
|
%uint_2 = OpConstant %uint 2
|
|
|
|
%_ptr_Function_uint = OpTypePointer Function %uint
|
|
|
|
%35 = OpConstantNull %uint
|
|
|
|
%bool = OpTypeBool
|
|
|
|
%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
|
|
|
|
%main = OpFunction %void None %15
|
|
|
|
%18 = OpLabel
|
|
|
|
%result = OpVariable %_ptr_Function_uint Function %35
|
|
|
|
%i = OpVariable %_ptr_Function_uint Function %35
|
|
|
|
%21 = OpAccessChain %_ptr_Input_uint %tint_symbol %uint_1
|
|
|
|
%22 = OpLoad %uint %21
|
|
|
|
%24 = OpAccessChain %_ptr_Input_uint %tint_symbol %uint_0
|
|
|
|
%25 = OpLoad %uint %24
|
|
|
|
%26 = OpCompositeConstruct %v2uint %22 %25
|
|
|
|
%28 = OpAccessChain %_ptr_Uniform_uint %uniforms %uint_0 %uint_1
|
|
|
|
%29 = OpLoad %uint %28
|
|
|
|
%31 = OpAccessChain %_ptr_Uniform_uint %uniforms %uint_2 %uint_1
|
|
|
|
%32 = OpLoad %uint %31
|
|
|
|
OpStore %result %uint_0
|
|
|
|
OpStore %i %uint_0
|
|
|
|
OpBranch %37
|
|
|
|
%37 = OpLabel
|
|
|
|
OpLoopMerge %38 %39 None
|
|
|
|
OpBranch %40
|
|
|
|
%40 = OpLabel
|
|
|
|
%42 = OpLoad %uint %i
|
|
|
|
%43 = OpULessThan %bool %42 %29
|
|
|
|
%41 = OpLogicalNot %bool %43
|
|
|
|
OpSelectionMerge %45 None
|
|
|
|
OpBranchConditional %41 %46 %45
|
|
|
|
%46 = OpLabel
|
|
|
|
OpBranch %38
|
|
|
|
%45 = OpLabel
|
|
|
|
%47 = OpLoad %uint %i
|
|
|
|
%48 = OpCompositeExtract %uint %26 0
|
|
|
|
%49 = OpIMul %uint %48 %29
|
|
|
|
%50 = OpIAdd %uint %47 %49
|
|
|
|
%51 = OpCompositeExtract %uint %26 1
|
|
|
|
%52 = OpLoad %uint %i
|
|
|
|
%53 = OpIMul %uint %52 %32
|
|
|
|
%54 = OpIAdd %uint %51 %53
|
|
|
|
%55 = OpLoad %uint %result
|
|
|
|
%57 = OpAccessChain %_ptr_StorageBuffer_uint %firstMatrix %uint_0 %50
|
|
|
|
%58 = OpLoad %uint %57
|
|
|
|
%59 = OpAccessChain %_ptr_StorageBuffer_uint %secondMatrix %uint_0 %54
|
|
|
|
%60 = OpLoad %uint %59
|
|
|
|
%61 = OpIMul %uint %58 %60
|
|
|
|
%62 = OpIAdd %uint %55 %61
|
|
|
|
OpStore %result %62
|
|
|
|
OpBranch %39
|
|
|
|
%39 = OpLabel
|
|
|
|
%63 = OpLoad %uint %i
|
|
|
|
%64 = OpIAdd %uint %63 %uint_1
|
|
|
|
OpStore %i %64
|
|
|
|
OpBranch %37
|
|
|
|
%38 = OpLabel
|
|
|
|
%65 = OpCompositeExtract %uint %26 1
|
|
|
|
%66 = OpCompositeExtract %uint %26 0
|
|
|
|
%67 = OpIMul %uint %66 %32
|
|
|
|
%68 = OpIAdd %uint %65 %67
|
|
|
|
%69 = OpAccessChain %_ptr_StorageBuffer_uint %resultMatrix %uint_0 %68
|
|
|
|
%70 = OpLoad %uint %result
|
|
|
|
OpStore %69 %70
|
|
|
|
OpReturn
|
|
|
|
OpFunctionEnd
|