2021-07-15 22:36:44 +00:00
|
|
|
; SPIR-V
|
|
|
|
; Version: 1.3
|
|
|
|
; Generator: Google Tint Compiler; 0
|
2021-07-21 14:11:01 +00:00
|
|
|
; Bound: 98
|
2021-07-15 22:36:44 +00:00
|
|
|
; Schema: 0
|
|
|
|
OpCapability Shader
|
|
|
|
%43 = OpExtInstImport "GLSL.std.450"
|
|
|
|
OpMemoryModel Logical GLSL450
|
|
|
|
OpEntryPoint GLCompute %main "main" %tint_symbol
|
|
|
|
OpExecutionMode %main LocalSize 1 1 1
|
|
|
|
OpName %gl_GlobalInvocationID "gl_GlobalInvocationID"
|
|
|
|
OpName %ResultMatrix "ResultMatrix"
|
|
|
|
OpMemberName %ResultMatrix 0 "numbers"
|
|
|
|
OpName %resultMatrix "resultMatrix"
|
|
|
|
OpName %FirstMatrix "FirstMatrix"
|
|
|
|
OpMemberName %FirstMatrix 0 "numbers"
|
|
|
|
OpName %firstMatrix "firstMatrix"
|
|
|
|
OpName %SecondMatrix "SecondMatrix"
|
|
|
|
OpMemberName %SecondMatrix 0 "numbers"
|
|
|
|
OpName %secondMatrix "secondMatrix"
|
|
|
|
OpName %Uniforms "Uniforms"
|
|
|
|
OpMemberName %Uniforms 0 "NAN"
|
|
|
|
OpMemberName %Uniforms 1 "sizeA"
|
|
|
|
OpMemberName %Uniforms 2 "sizeB"
|
|
|
|
OpName %x_46 "x_46"
|
|
|
|
OpName %tint_symbol "tint_symbol"
|
|
|
|
OpName %binaryOperation_f1_f1_ "binaryOperation_f1_f1_"
|
|
|
|
OpName %a "a"
|
|
|
|
OpName %b "b"
|
|
|
|
OpName %x_26 "x_26"
|
|
|
|
OpName %main_1 "main_1"
|
|
|
|
OpName %index "index"
|
|
|
|
OpName %a_1 "a_1"
|
|
|
|
OpName %param "param"
|
|
|
|
OpName %param_1 "param_1"
|
|
|
|
OpName %main "main"
|
|
|
|
OpDecorate %ResultMatrix Block
|
|
|
|
OpMemberDecorate %ResultMatrix 0 Offset 0
|
|
|
|
OpDecorate %_runtimearr_float ArrayStride 4
|
|
|
|
OpDecorate %resultMatrix DescriptorSet 0
|
|
|
|
OpDecorate %resultMatrix Binding 2
|
|
|
|
OpDecorate %FirstMatrix Block
|
|
|
|
OpMemberDecorate %FirstMatrix 0 Offset 0
|
|
|
|
OpDecorate %firstMatrix NonWritable
|
|
|
|
OpDecorate %firstMatrix DescriptorSet 0
|
|
|
|
OpDecorate %firstMatrix Binding 0
|
|
|
|
OpDecorate %SecondMatrix Block
|
|
|
|
OpMemberDecorate %SecondMatrix 0 Offset 0
|
|
|
|
OpDecorate %secondMatrix NonWritable
|
|
|
|
OpDecorate %secondMatrix DescriptorSet 0
|
|
|
|
OpDecorate %secondMatrix Binding 1
|
|
|
|
OpDecorate %Uniforms Block
|
|
|
|
OpMemberDecorate %Uniforms 0 Offset 0
|
|
|
|
OpMemberDecorate %Uniforms 1 Offset 4
|
|
|
|
OpMemberDecorate %Uniforms 2 Offset 8
|
|
|
|
OpDecorate %x_46 NonWritable
|
|
|
|
OpDecorate %x_46 DescriptorSet 0
|
|
|
|
OpDecorate %x_46 Binding 3
|
|
|
|
OpDecorate %tint_symbol BuiltIn GlobalInvocationId
|
|
|
|
%uint = OpTypeInt 32 0
|
|
|
|
%v3uint = OpTypeVector %uint 3
|
|
|
|
%_ptr_Private_v3uint = OpTypePointer Private %v3uint
|
|
|
|
%5 = OpConstantNull %v3uint
|
|
|
|
%gl_GlobalInvocationID = OpVariable %_ptr_Private_v3uint Private %5
|
|
|
|
%float = OpTypeFloat 32
|
|
|
|
%_runtimearr_float = OpTypeRuntimeArray %float
|
|
|
|
%ResultMatrix = OpTypeStruct %_runtimearr_float
|
|
|
|
%_ptr_StorageBuffer_ResultMatrix = OpTypePointer StorageBuffer %ResultMatrix
|
|
|
|
%resultMatrix = OpVariable %_ptr_StorageBuffer_ResultMatrix StorageBuffer
|
|
|
|
%FirstMatrix = OpTypeStruct %_runtimearr_float
|
|
|
|
%_ptr_StorageBuffer_FirstMatrix = OpTypePointer StorageBuffer %FirstMatrix
|
|
|
|
%firstMatrix = OpVariable %_ptr_StorageBuffer_FirstMatrix StorageBuffer
|
|
|
|
%SecondMatrix = OpTypeStruct %_runtimearr_float
|
|
|
|
%_ptr_StorageBuffer_SecondMatrix = OpTypePointer StorageBuffer %SecondMatrix
|
|
|
|
%secondMatrix = OpVariable %_ptr_StorageBuffer_SecondMatrix StorageBuffer
|
|
|
|
%int = OpTypeInt 32 1
|
|
|
|
%Uniforms = OpTypeStruct %float %int %int
|
|
|
|
%_ptr_Uniform_Uniforms = OpTypePointer Uniform %Uniforms
|
|
|
|
%x_46 = OpVariable %_ptr_Uniform_Uniforms Uniform
|
|
|
|
%_ptr_Input_v3uint = OpTypePointer Input %v3uint
|
|
|
|
%tint_symbol = OpVariable %_ptr_Input_v3uint Input
|
|
|
|
%_ptr_Function_float = OpTypePointer Function %float
|
|
|
|
%23 = OpTypeFunction %float %_ptr_Function_float %_ptr_Function_float
|
|
|
|
%30 = OpConstantNull %float
|
|
|
|
%float_0 = OpConstant %float 0
|
|
|
|
%bool = OpTypeBool
|
|
|
|
%float_1 = OpConstant %float 1
|
|
|
|
%float_2 = OpConstant %float 2
|
|
|
|
%void = OpTypeVoid
|
2021-07-21 14:11:01 +00:00
|
|
|
%70 = OpTypeFunction %void
|
2021-07-15 22:36:44 +00:00
|
|
|
%_ptr_Function_int = OpTypePointer Function %int
|
2021-07-21 14:11:01 +00:00
|
|
|
%76 = OpConstantNull %int
|
2021-07-15 22:36:44 +00:00
|
|
|
%uint_0 = OpConstant %uint 0
|
|
|
|
%_ptr_Private_uint = OpTypePointer Private %uint
|
|
|
|
%int_n10 = OpConstant %int -10
|
|
|
|
%float_n4 = OpConstant %float -4
|
|
|
|
%float_n3 = OpConstant %float -3
|
|
|
|
%_ptr_StorageBuffer_float = OpTypePointer StorageBuffer %float
|
|
|
|
%binaryOperation_f1_f1_ = OpFunction %float None %23
|
|
|
|
%a = OpFunctionParameter %_ptr_Function_float
|
|
|
|
%b = OpFunctionParameter %_ptr_Function_float
|
|
|
|
%28 = OpLabel
|
|
|
|
%x_26 = OpVariable %_ptr_Function_float Function %30
|
|
|
|
%32 = OpLoad %float %b
|
|
|
|
%34 = OpFOrdEqual %bool %32 %float_0
|
|
|
|
OpSelectionMerge %36 None
|
|
|
|
OpBranchConditional %34 %37 %36
|
|
|
|
%37 = OpLabel
|
|
|
|
OpReturnValue %float_1
|
|
|
|
%36 = OpLabel
|
|
|
|
%40 = OpLoad %float %b
|
2021-07-21 14:11:01 +00:00
|
|
|
%46 = OpFDiv %float %40 %float_2
|
|
|
|
%45 = OpExtInst %float %43 Floor %46
|
|
|
|
%47 = OpFMul %float %float_2 %45
|
|
|
|
%48 = OpFSub %float %40 %47
|
|
|
|
%42 = OpExtInst %float %43 RoundEven %48
|
|
|
|
%49 = OpFOrdEqual %bool %42 %float_1
|
|
|
|
%41 = OpLogicalNot %bool %49
|
|
|
|
OpSelectionMerge %50 None
|
|
|
|
OpBranchConditional %41 %51 %52
|
|
|
|
%51 = OpLabel
|
|
|
|
%54 = OpLoad %float %a
|
|
|
|
%56 = OpLoad %float %b
|
|
|
|
%58 = OpExtInst %float %43 FAbs %54
|
|
|
|
%57 = OpExtInst %float %43 Pow %58 %56
|
|
|
|
OpStore %x_26 %57
|
|
|
|
OpBranch %50
|
|
|
|
%52 = OpLabel
|
|
|
|
%60 = OpLoad %float %a
|
|
|
|
%62 = OpLoad %float %a
|
|
|
|
%64 = OpLoad %float %b
|
|
|
|
%65 = OpExtInst %float %43 FSign %60
|
|
|
|
%67 = OpExtInst %float %43 FAbs %62
|
|
|
|
%66 = OpExtInst %float %43 Pow %67 %64
|
|
|
|
%68 = OpFMul %float %65 %66
|
|
|
|
OpStore %x_26 %68
|
|
|
|
OpBranch %50
|
|
|
|
%50 = OpLabel
|
|
|
|
%69 = OpLoad %float %x_26
|
|
|
|
OpReturnValue %69
|
2021-07-15 22:36:44 +00:00
|
|
|
OpFunctionEnd
|
2021-07-21 14:11:01 +00:00
|
|
|
%main_1 = OpFunction %void None %70
|
|
|
|
%73 = OpLabel
|
|
|
|
%index = OpVariable %_ptr_Function_int Function %76
|
|
|
|
%a_1 = OpVariable %_ptr_Function_int Function %76
|
2021-07-15 22:36:44 +00:00
|
|
|
%param = OpVariable %_ptr_Function_float Function %30
|
|
|
|
%param_1 = OpVariable %_ptr_Function_float Function %30
|
2021-07-21 14:11:01 +00:00
|
|
|
%82 = OpAccessChain %_ptr_Private_uint %gl_GlobalInvocationID %uint_0
|
|
|
|
%83 = OpLoad %uint %82
|
|
|
|
%84 = OpBitcast %int %83
|
|
|
|
OpStore %index %84
|
2021-07-15 22:36:44 +00:00
|
|
|
OpStore %a_1 %int_n10
|
2021-07-21 14:11:01 +00:00
|
|
|
%86 = OpLoad %int %index
|
2021-07-15 22:36:44 +00:00
|
|
|
OpStore %param %float_n4
|
|
|
|
OpStore %param_1 %float_n3
|
2021-07-21 14:11:01 +00:00
|
|
|
%89 = OpFunctionCall %float %binaryOperation_f1_f1_ %param %param_1
|
|
|
|
%93 = OpAccessChain %_ptr_StorageBuffer_float %resultMatrix %uint_0 %86
|
|
|
|
OpStore %93 %89
|
2021-07-15 22:36:44 +00:00
|
|
|
OpReturn
|
|
|
|
OpFunctionEnd
|
2021-07-21 14:11:01 +00:00
|
|
|
%main = OpFunction %void None %70
|
|
|
|
%95 = OpLabel
|
|
|
|
%96 = OpLoad %v3uint %tint_symbol
|
|
|
|
OpStore %gl_GlobalInvocationID %96
|
|
|
|
%97 = OpFunctionCall %void %main_1
|
2021-07-15 22:36:44 +00:00
|
|
|
OpReturn
|
|
|
|
OpFunctionEnd
|