| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 0 |
| ; Bound: 113 |
| ; Schema: 0 |
| OpCapability Shader |
| %52 = OpExtInstImport "GLSL.std.450" |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint GLCompute %main "main" %gl_GlobalInvocationID_param_1 |
| OpExecutionMode %main LocalSize 1 1 1 |
| OpName %gl_GlobalInvocationID_param_1 "gl_GlobalInvocationID_param_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 %x_46_block "x_46_block" |
| OpMemberName %x_46_block 0 "inner" |
| OpName %Uniforms "Uniforms" |
| OpMemberName %Uniforms 0 "NAN" |
| OpMemberName %Uniforms 1 "sizeA" |
| OpMemberName %Uniforms 2 "sizeB" |
| OpName %x_46 "x_46" |
| OpName %binaryOperation_f1_f1_ "binaryOperation_f1_f1_" |
| OpName %a "a" |
| OpName %b "b" |
| OpName %tint_return_flag "tint_return_flag" |
| OpName %tint_return_value "tint_return_value" |
| 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_inner "main_inner" |
| OpName %gl_GlobalInvocationID_param "gl_GlobalInvocationID_param" |
| OpName %main "main" |
| OpDecorate %gl_GlobalInvocationID_param_1 BuiltIn GlobalInvocationId |
| 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 %x_46_block Block |
| OpMemberDecorate %x_46_block 0 Offset 0 |
| 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 |
| %uint = OpTypeInt 32 0 |
| %v3uint = OpTypeVector %uint 3 |
| %_ptr_Input_v3uint = OpTypePointer Input %v3uint |
| %gl_GlobalInvocationID_param_1 = OpVariable %_ptr_Input_v3uint Input |
| %_ptr_Private_v3uint = OpTypePointer Private %v3uint |
| %7 = OpConstantNull %v3uint |
| %gl_GlobalInvocationID = OpVariable %_ptr_Private_v3uint Private %7 |
| %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 |
| %x_46_block = OpTypeStruct %Uniforms |
| %_ptr_Uniform_x_46_block = OpTypePointer Uniform %x_46_block |
| %x_46 = OpVariable %_ptr_Uniform_x_46_block Uniform |
| %_ptr_Function_float = OpTypePointer Function %float |
| %24 = OpTypeFunction %float %_ptr_Function_float %_ptr_Function_float |
| %bool = OpTypeBool |
| %_ptr_Function_bool = OpTypePointer Function %bool |
| %33 = OpConstantNull %bool |
| %35 = OpConstantNull %float |
| %true = OpConstantTrue %bool |
| %float_1 = OpConstant %float 1 |
| %float_2 = OpConstant %float 2 |
| %void = OpTypeVoid |
| %80 = OpTypeFunction %void |
| %_ptr_Function_int = OpTypePointer Function %int |
| %86 = OpConstantNull %int |
| %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 |
| %104 = OpTypeFunction %void %v3uint |
| %binaryOperation_f1_f1_ = OpFunction %float None %24 |
| %a = OpFunctionParameter %_ptr_Function_float |
| %b = OpFunctionParameter %_ptr_Function_float |
| %29 = OpLabel |
| %tint_return_flag = OpVariable %_ptr_Function_bool Function %33 |
| %tint_return_value = OpVariable %_ptr_Function_float Function %35 |
| %x_26 = OpVariable %_ptr_Function_float Function %35 |
| %38 = OpLoad %float %b |
| %39 = OpFOrdEqual %bool %38 %35 |
| OpSelectionMerge %40 None |
| OpBranchConditional %39 %41 %40 |
| %41 = OpLabel |
| OpStore %tint_return_flag %true |
| OpStore %tint_return_value %float_1 |
| OpBranch %40 |
| %40 = OpLabel |
| %45 = OpLoad %bool %tint_return_flag |
| %44 = OpLogicalNot %bool %45 |
| OpSelectionMerge %46 None |
| OpBranchConditional %44 %47 %46 |
| %47 = OpLabel |
| %49 = OpLoad %float %b |
| %55 = OpFDiv %float %49 %float_2 |
| %54 = OpExtInst %float %52 Floor %55 |
| %56 = OpFMul %float %float_2 %54 |
| %57 = OpFSub %float %49 %56 |
| %51 = OpExtInst %float %52 RoundEven %57 |
| %58 = OpFOrdEqual %bool %51 %float_1 |
| %50 = OpLogicalNot %bool %58 |
| OpSelectionMerge %59 None |
| OpBranchConditional %50 %60 %61 |
| %60 = OpLabel |
| %63 = OpLoad %float %a |
| %65 = OpLoad %float %b |
| %67 = OpExtInst %float %52 FAbs %63 |
| %66 = OpExtInst %float %52 Pow %67 %65 |
| OpStore %x_26 %66 |
| OpBranch %59 |
| %61 = OpLabel |
| %69 = OpLoad %float %a |
| %71 = OpLoad %float %a |
| %73 = OpLoad %float %b |
| %74 = OpExtInst %float %52 FSign %69 |
| %76 = OpExtInst %float %52 FAbs %71 |
| %75 = OpExtInst %float %52 Pow %76 %73 |
| %77 = OpFMul %float %74 %75 |
| OpStore %x_26 %77 |
| OpBranch %59 |
| %59 = OpLabel |
| %78 = OpLoad %float %x_26 |
| OpStore %tint_return_flag %true |
| OpStore %tint_return_value %78 |
| OpBranch %46 |
| %46 = OpLabel |
| %79 = OpLoad %float %tint_return_value |
| OpReturnValue %79 |
| OpFunctionEnd |
| %main_1 = OpFunction %void None %80 |
| %83 = OpLabel |
| %index = OpVariable %_ptr_Function_int Function %86 |
| %a_1 = OpVariable %_ptr_Function_int Function %86 |
| %param = OpVariable %_ptr_Function_float Function %35 |
| %param_1 = OpVariable %_ptr_Function_float Function %35 |
| %92 = OpAccessChain %_ptr_Private_uint %gl_GlobalInvocationID %uint_0 |
| %93 = OpLoad %uint %92 |
| %94 = OpBitcast %int %93 |
| OpStore %index %94 |
| OpStore %a_1 %int_n10 |
| %96 = OpLoad %int %index |
| OpStore %param %float_n4 |
| OpStore %param_1 %float_n3 |
| %99 = OpFunctionCall %float %binaryOperation_f1_f1_ %param %param_1 |
| %103 = OpAccessChain %_ptr_StorageBuffer_float %resultMatrix %uint_0 %96 |
| OpStore %103 %99 |
| OpReturn |
| OpFunctionEnd |
| %main_inner = OpFunction %void None %104 |
| %gl_GlobalInvocationID_param = OpFunctionParameter %v3uint |
| %107 = OpLabel |
| OpStore %gl_GlobalInvocationID %gl_GlobalInvocationID_param |
| %108 = OpFunctionCall %void %main_1 |
| OpReturn |
| OpFunctionEnd |
| %main = OpFunction %void None %80 |
| %110 = OpLabel |
| %112 = OpLoad %v3uint %gl_GlobalInvocationID_param_1 |
| %111 = OpFunctionCall %void %main_inner %112 |
| OpReturn |
| OpFunctionEnd |