| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 0 |
| ; Bound: 193 |
| ; Schema: 0 |
| OpCapability Shader |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint Fragment %main "main" %sk_Clockwise_param_1 %vcolor_S0_param_1 %sk_FragColor_1_1 |
| OpExecutionMode %main OriginUpperLeft |
| OpName %sk_Clockwise_param_1 "sk_Clockwise_param_1" |
| OpName %vcolor_S0_param_1 "vcolor_S0_param_1" |
| OpName %sk_FragColor_1_1 "sk_FragColor_1_1" |
| OpName %x_4_block "x_4_block" |
| OpMemberName %x_4_block 0 "inner" |
| OpName %UniformBuffer "UniformBuffer" |
| OpMemberName %UniformBuffer 0 "unknownInput_S1_c0" |
| OpMemberName %UniformBuffer 1 "ucolorRed_S1_c0" |
| OpMemberName %UniformBuffer 2 "ucolorGreen_S1_c0" |
| OpMemberName %UniformBuffer 3 "umatrix_S1" |
| OpName %x_4 "x_4" |
| OpName %sk_FragColor "sk_FragColor" |
| OpName %sk_Clockwise "sk_Clockwise" |
| OpName %vcolor_S0 "vcolor_S0" |
| OpName %tint_div "tint_div" |
| OpName %lhs "lhs" |
| OpName %rhs "rhs" |
| OpName %test_int_S1_c0_b "test_int_S1_c0_b" |
| OpName %unknown "unknown" |
| OpName %ok "ok" |
| OpName %val "val" |
| OpName %x_40 "x_40" |
| OpName %x_41 "x_41" |
| OpName %x_54 "x_54" |
| OpName %x_55 "x_55" |
| OpName %x_65 "x_65" |
| OpName %x_66 "x_66" |
| OpName %main_1 "main_1" |
| OpName %outputColor_S0 "outputColor_S0" |
| OpName %output_S1 "output_S1" |
| OpName %x_8_unknown "x_8_unknown" |
| OpName %x_9_ok "x_9_ok" |
| OpName %x_10_val "x_10_val" |
| OpName %x_116 "x_116" |
| OpName %x_86 "x_86" |
| OpName %x_87 "x_87" |
| OpName %x_99 "x_99" |
| OpName %x_100 "x_100" |
| OpName %x_110 "x_110" |
| OpName %x_111 "x_111" |
| OpName %x_114 "x_114" |
| OpName %x_115 "x_115" |
| OpName %main_out "main_out" |
| OpMemberName %main_out 0 "sk_FragColor_1" |
| OpName %main_inner "main_inner" |
| OpName %sk_Clockwise_param "sk_Clockwise_param" |
| OpName %vcolor_S0_param "vcolor_S0_param" |
| OpName %main "main" |
| OpDecorate %sk_Clockwise_param_1 BuiltIn FrontFacing |
| OpDecorate %vcolor_S0_param_1 Location 0 |
| OpDecorate %sk_FragColor_1_1 Location 0 |
| OpDecorate %x_4_block Block |
| OpMemberDecorate %x_4_block 0 Offset 0 |
| OpMemberDecorate %UniformBuffer 0 Offset 16 |
| OpMemberDecorate %UniformBuffer 1 Offset 32 |
| OpMemberDecorate %UniformBuffer 2 Offset 48 |
| OpMemberDecorate %UniformBuffer 3 Offset 64 |
| OpMemberDecorate %UniformBuffer 3 ColMajor |
| OpMemberDecorate %UniformBuffer 3 MatrixStride 16 |
| OpDecorate %x_4 NonWritable |
| OpDecorate %x_4 Binding 0 |
| OpDecorate %x_4 DescriptorSet 0 |
| OpMemberDecorate %main_out 0 Offset 0 |
| %bool = OpTypeBool |
| %_ptr_Input_bool = OpTypePointer Input %bool |
| %sk_Clockwise_param_1 = OpVariable %_ptr_Input_bool Input |
| %float = OpTypeFloat 32 |
| %v4float = OpTypeVector %float 4 |
| %_ptr_Input_v4float = OpTypePointer Input %v4float |
| %vcolor_S0_param_1 = OpVariable %_ptr_Input_v4float Input |
| %_ptr_Output_v4float = OpTypePointer Output %v4float |
| %10 = OpConstantNull %v4float |
| %sk_FragColor_1_1 = OpVariable %_ptr_Output_v4float Output %10 |
| %v3float = OpTypeVector %float 3 |
| %mat3v3float = OpTypeMatrix %v3float 3 |
| %UniformBuffer = OpTypeStruct %float %v4float %v4float %mat3v3float |
| %x_4_block = OpTypeStruct %UniformBuffer |
| %_ptr_Uniform_x_4_block = OpTypePointer Uniform %x_4_block |
| %x_4 = OpVariable %_ptr_Uniform_x_4_block Uniform |
| %_ptr_Private_v4float = OpTypePointer Private %v4float |
| %sk_FragColor = OpVariable %_ptr_Private_v4float Private %10 |
| %_ptr_Private_bool = OpTypePointer Private %bool |
| %21 = OpConstantNull %bool |
| %sk_Clockwise = OpVariable %_ptr_Private_bool Private %21 |
| %vcolor_S0 = OpVariable %_ptr_Private_v4float Private %10 |
| %int = OpTypeInt 32 1 |
| %v4int = OpTypeVector %int 4 |
| %23 = OpTypeFunction %v4int %v4int %v4int |
| %31 = OpConstantNull %v4int |
| %v4bool = OpTypeVector %bool 4 |
| %int_n2147483648 = OpConstant %int -2147483648 |
| %35 = OpConstantComposite %v4int %int_n2147483648 %int_n2147483648 %int_n2147483648 %int_n2147483648 |
| %int_n1 = OpConstant %int -1 |
| %38 = OpConstantComposite %v4int %int_n1 %int_n1 %int_n1 %int_n1 |
| %int_1 = OpConstant %int 1 |
| %43 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 |
| %45 = OpTypeFunction %bool |
| %_ptr_Function_int = OpTypePointer Function %int |
| %50 = OpConstantNull %int |
| %_ptr_Function_bool = OpTypePointer Function %bool |
| %_ptr_Function_v4int = OpTypePointer Function %v4int |
| %uint = OpTypeInt 32 0 |
| %uint_0 = OpConstant %uint 0 |
| %_ptr_Uniform_float = OpTypePointer Uniform %float |
| %true = OpConstantTrue %bool |
| %int_2 = OpConstant %int 2 |
| %89 = OpConstantComposite %v4int %int_2 %int_2 %int_2 %int_2 |
| %void = OpTypeVoid |
| %102 = OpTypeFunction %void |
| %_ptr_Function_v4float = OpTypePointer Function %v4float |
| %_ptr_Function_float = OpTypePointer Function %float |
| %111 = OpConstantNull %float |
| %float_1 = OpConstant %float 1 |
| %136 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 |
| %float_2 = OpConstant %float 2 |
| %149 = OpConstantComposite %v4float %float_2 %float_2 %float_2 %float_2 |
| %uint_2 = OpConstant %uint 2 |
| %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float |
| %uint_1 = OpConstant %uint 1 |
| %main_out = OpTypeStruct %v4float |
| %178 = OpTypeFunction %main_out %bool %v4float |
| %tint_div = OpFunction %v4int None %23 |
| %lhs = OpFunctionParameter %v4int |
| %rhs = OpFunctionParameter %v4int |
| %29 = OpLabel |
| %32 = OpIEqual %v4bool %rhs %31 |
| %36 = OpIEqual %v4bool %lhs %35 |
| %39 = OpIEqual %v4bool %rhs %38 |
| %40 = OpLogicalAnd %v4bool %36 %39 |
| %41 = OpLogicalOr %v4bool %32 %40 |
| %30 = OpSelect %v4int %41 %43 %rhs |
| %44 = OpSDiv %v4int %lhs %30 |
| OpReturnValue %44 |
| OpFunctionEnd |
| %test_int_S1_c0_b = OpFunction %bool None %45 |
| %47 = OpLabel |
| %unknown = OpVariable %_ptr_Function_int Function %50 |
| %ok = OpVariable %_ptr_Function_bool Function %21 |
| %val = OpVariable %_ptr_Function_v4int Function %31 |
| %x_40 = OpVariable %_ptr_Function_bool Function %21 |
| %x_41 = OpVariable %_ptr_Function_bool Function %21 |
| %x_54 = OpVariable %_ptr_Function_bool Function %21 |
| %x_55 = OpVariable %_ptr_Function_bool Function %21 |
| %x_65 = OpVariable %_ptr_Function_bool Function %21 |
| %x_66 = OpVariable %_ptr_Function_bool Function %21 |
| %64 = OpAccessChain %_ptr_Uniform_float %x_4 %uint_0 %uint_0 |
| %65 = OpLoad %float %64 |
| %66 = OpConvertFToS %int %65 |
| OpStore %unknown %66 |
| OpStore %ok %true |
| OpStore %x_41 %21 |
| OpSelectionMerge %68 None |
| OpBranchConditional %true %69 %68 |
| %69 = OpLabel |
| %71 = OpCompositeConstruct %v4int %66 %66 %66 %66 |
| %70 = OpFunctionCall %v4int %tint_div %31 %71 |
| %73 = OpIEqual %v4bool %70 %31 |
| %72 = OpAll %bool %73 |
| OpStore %x_40 %72 |
| %74 = OpLoad %bool %x_40 |
| OpStore %x_41 %74 |
| OpBranch %68 |
| %68 = OpLabel |
| %75 = OpLoad %bool %x_41 |
| OpStore %ok %75 |
| %76 = OpCompositeConstruct %v4int %66 %66 %66 %66 |
| OpStore %val %76 |
| %77 = OpIAdd %v4int %76 %43 |
| OpStore %val %77 |
| %78 = OpISub %v4int %77 %43 |
| OpStore %val %78 |
| %79 = OpIAdd %v4int %78 %43 |
| OpStore %val %79 |
| %80 = OpISub %v4int %79 %43 |
| OpStore %val %80 |
| OpStore %x_55 %21 |
| %81 = OpLoad %bool %x_41 |
| OpSelectionMerge %82 None |
| OpBranchConditional %81 %83 %82 |
| %83 = OpLabel |
| %85 = OpIEqual %v4bool %80 %76 |
| %84 = OpAll %bool %85 |
| OpStore %x_54 %84 |
| %86 = OpLoad %bool %x_54 |
| OpStore %x_55 %86 |
| OpBranch %82 |
| %82 = OpLabel |
| %87 = OpLoad %bool %x_55 |
| OpStore %ok %87 |
| %90 = OpIMul %v4int %80 %89 |
| OpStore %val %90 |
| %91 = OpFunctionCall %v4int %tint_div %90 %89 |
| OpStore %val %91 |
| %92 = OpIMul %v4int %91 %89 |
| OpStore %val %92 |
| %93 = OpFunctionCall %v4int %tint_div %92 %89 |
| OpStore %val %93 |
| OpStore %x_66 %21 |
| %94 = OpLoad %bool %x_55 |
| OpSelectionMerge %95 None |
| OpBranchConditional %94 %96 %95 |
| %96 = OpLabel |
| %98 = OpIEqual %v4bool %93 %76 |
| %97 = OpAll %bool %98 |
| OpStore %x_65 %97 |
| %99 = OpLoad %bool %x_65 |
| OpStore %x_66 %99 |
| OpBranch %95 |
| %95 = OpLabel |
| %100 = OpLoad %bool %x_66 |
| OpStore %ok %100 |
| %101 = OpLoad %bool %x_66 |
| OpReturnValue %101 |
| OpFunctionEnd |
| %main_1 = OpFunction %void None %102 |
| %105 = OpLabel |
| %outputColor_S0 = OpVariable %_ptr_Function_v4float Function %10 |
| %output_S1 = OpVariable %_ptr_Function_v4float Function %10 |
| %x_8_unknown = OpVariable %_ptr_Function_float Function %111 |
| %x_9_ok = OpVariable %_ptr_Function_bool Function %21 |
| %x_10_val = OpVariable %_ptr_Function_v4float Function %10 |
| %x_116 = OpVariable %_ptr_Function_v4float Function %10 |
| %x_86 = OpVariable %_ptr_Function_bool Function %21 |
| %x_87 = OpVariable %_ptr_Function_bool Function %21 |
| %x_99 = OpVariable %_ptr_Function_bool Function %21 |
| %x_100 = OpVariable %_ptr_Function_bool Function %21 |
| %x_110 = OpVariable %_ptr_Function_bool Function %21 |
| %x_111 = OpVariable %_ptr_Function_bool Function %21 |
| %x_114 = OpVariable %_ptr_Function_bool Function %21 |
| %x_115 = OpVariable %_ptr_Function_bool Function %21 |
| %123 = OpLoad %v4float %vcolor_S0 |
| OpStore %outputColor_S0 %123 |
| %124 = OpAccessChain %_ptr_Uniform_float %x_4 %uint_0 %uint_0 |
| %125 = OpLoad %float %124 |
| OpStore %x_8_unknown %125 |
| OpStore %x_9_ok %true |
| OpStore %x_87 %21 |
| OpSelectionMerge %126 None |
| OpBranchConditional %true %127 %126 |
| %127 = OpLabel |
| %129 = OpCompositeConstruct %v4float %125 %125 %125 %125 |
| %130 = OpFDiv %v4float %10 %129 |
| %131 = OpFOrdEqual %v4bool %130 %10 |
| %128 = OpAll %bool %131 |
| OpStore %x_86 %128 |
| %132 = OpLoad %bool %x_86 |
| OpStore %x_87 %132 |
| OpBranch %126 |
| %126 = OpLabel |
| %133 = OpLoad %bool %x_87 |
| OpStore %x_9_ok %133 |
| %134 = OpCompositeConstruct %v4float %125 %125 %125 %125 |
| OpStore %x_10_val %134 |
| %137 = OpFAdd %v4float %134 %136 |
| OpStore %x_10_val %137 |
| %138 = OpFSub %v4float %137 %136 |
| OpStore %x_10_val %138 |
| %139 = OpFAdd %v4float %138 %136 |
| OpStore %x_10_val %139 |
| %140 = OpFSub %v4float %139 %136 |
| OpStore %x_10_val %140 |
| OpStore %x_100 %21 |
| %141 = OpLoad %bool %x_87 |
| OpSelectionMerge %142 None |
| OpBranchConditional %141 %143 %142 |
| %143 = OpLabel |
| %145 = OpFOrdEqual %v4bool %140 %134 |
| %144 = OpAll %bool %145 |
| OpStore %x_99 %144 |
| %146 = OpLoad %bool %x_99 |
| OpStore %x_100 %146 |
| OpBranch %142 |
| %142 = OpLabel |
| %147 = OpLoad %bool %x_100 |
| OpStore %x_9_ok %147 |
| %150 = OpFMul %v4float %140 %149 |
| OpStore %x_10_val %150 |
| %151 = OpFDiv %v4float %150 %149 |
| OpStore %x_10_val %151 |
| %152 = OpFMul %v4float %151 %149 |
| OpStore %x_10_val %152 |
| %153 = OpFDiv %v4float %152 %149 |
| OpStore %x_10_val %153 |
| OpStore %x_111 %21 |
| %154 = OpLoad %bool %x_100 |
| OpSelectionMerge %155 None |
| OpBranchConditional %154 %156 %155 |
| %156 = OpLabel |
| %158 = OpFOrdEqual %v4bool %153 %134 |
| %157 = OpAll %bool %158 |
| OpStore %x_110 %157 |
| %159 = OpLoad %bool %x_110 |
| OpStore %x_111 %159 |
| OpBranch %155 |
| %155 = OpLabel |
| %160 = OpLoad %bool %x_111 |
| OpStore %x_9_ok %160 |
| OpStore %x_115 %21 |
| %161 = OpLoad %bool %x_111 |
| OpSelectionMerge %162 None |
| OpBranchConditional %161 %163 %162 |
| %163 = OpLabel |
| %164 = OpFunctionCall %bool %test_int_S1_c0_b |
| OpStore %x_114 %164 |
| %165 = OpLoad %bool %x_114 |
| OpStore %x_115 %165 |
| OpBranch %162 |
| %162 = OpLabel |
| %166 = OpLoad %bool %x_115 |
| OpSelectionMerge %167 None |
| OpBranchConditional %166 %168 %169 |
| %168 = OpLabel |
| %172 = OpAccessChain %_ptr_Uniform_v4float %x_4 %uint_0 %uint_2 |
| %173 = OpLoad %v4float %172 |
| OpStore %x_116 %173 |
| OpBranch %167 |
| %169 = OpLabel |
| %175 = OpAccessChain %_ptr_Uniform_v4float %x_4 %uint_0 %uint_1 |
| %176 = OpLoad %v4float %175 |
| OpStore %x_116 %176 |
| OpBranch %167 |
| %167 = OpLabel |
| %177 = OpLoad %v4float %x_116 |
| OpStore %output_S1 %177 |
| OpStore %sk_FragColor %177 |
| OpReturn |
| OpFunctionEnd |
| %main_inner = OpFunction %main_out None %178 |
| %sk_Clockwise_param = OpFunctionParameter %bool |
| %vcolor_S0_param = OpFunctionParameter %v4float |
| %183 = OpLabel |
| OpStore %sk_Clockwise %sk_Clockwise_param |
| OpStore %vcolor_S0 %vcolor_S0_param |
| %184 = OpFunctionCall %void %main_1 |
| %185 = OpLoad %v4float %sk_FragColor |
| %186 = OpCompositeConstruct %main_out %185 |
| OpReturnValue %186 |
| OpFunctionEnd |
| %main = OpFunction %void None %102 |
| %188 = OpLabel |
| %190 = OpLoad %bool %sk_Clockwise_param_1 |
| %191 = OpLoad %v4float %vcolor_S0_param_1 |
| %189 = OpFunctionCall %main_out %main_inner %190 %191 |
| %192 = OpCompositeExtract %v4float %189 0 |
| OpStore %sk_FragColor_1_1 %192 |
| OpReturn |
| OpFunctionEnd |