| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 0 |
| ; Bound: 170 |
| ; 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 %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 %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_54 "x_54" |
| OpName %x_65 "x_65" |
| OpName %x_41_phi "x_41_phi" |
| OpName %x_55_phi "x_55_phi" |
| OpName %x_66_phi "x_66_phi" |
| 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_99 "x_99" |
| OpName %x_110 "x_110" |
| OpName %x_114 "x_114" |
| OpName %x_87_phi "x_87_phi" |
| OpName %x_100_phi "x_100_phi" |
| OpName %x_111_phi "x_111_phi" |
| OpName %x_115_phi "x_115_phi" |
| 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 %UniformBuffer Block |
| 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 |
| %_ptr_Uniform_UniformBuffer = OpTypePointer Uniform %UniformBuffer |
| %x_4 = OpVariable %_ptr_Uniform_UniformBuffer Uniform |
| %_ptr_Private_v4float = OpTypePointer Private %v4float |
| %sk_FragColor = OpVariable %_ptr_Private_v4float Private %10 |
| %_ptr_Private_bool = OpTypePointer Private %bool |
| %20 = OpConstantNull %bool |
| %sk_Clockwise = OpVariable %_ptr_Private_bool Private %20 |
| %vcolor_S0 = OpVariable %_ptr_Private_v4float Private %10 |
| %22 = OpTypeFunction %bool |
| %int = OpTypeInt 32 1 |
| %_ptr_Function_int = OpTypePointer Function %int |
| %28 = OpConstantNull %int |
| %_ptr_Function_bool = OpTypePointer Function %bool |
| %v4int = OpTypeVector %int 4 |
| %_ptr_Function_v4int = OpTypePointer Function %v4int |
| %34 = OpConstantNull %v4int |
| %uint = OpTypeInt 32 0 |
| %uint_0 = OpConstant %uint 0 |
| %_ptr_Uniform_float = OpTypePointer Uniform %float |
| %true = OpConstantTrue %bool |
| %v4bool = OpTypeVector %bool 4 |
| %int_1 = OpConstant %int 1 |
| %59 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 |
| %int_2 = OpConstant %int 2 |
| %71 = OpConstantComposite %v4int %int_2 %int_2 %int_2 %int_2 |
| %void = OpTypeVoid |
| %82 = OpTypeFunction %void |
| %_ptr_Function_v4float = OpTypePointer Function %v4float |
| %_ptr_Function_float = OpTypePointer Function %float |
| %91 = OpConstantNull %float |
| %float_1 = OpConstant %float 1 |
| %116 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 |
| %float_2 = OpConstant %float 2 |
| %128 = 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 |
| %155 = OpTypeFunction %main_out %bool %v4float |
| %test_int_S1_c0_b = OpFunction %bool None %22 |
| %24 = OpLabel |
| %unknown = OpVariable %_ptr_Function_int Function %28 |
| %ok = OpVariable %_ptr_Function_bool Function %20 |
| %val = OpVariable %_ptr_Function_v4int Function %34 |
| %x_40 = OpVariable %_ptr_Function_bool Function %20 |
| %x_54 = OpVariable %_ptr_Function_bool Function %20 |
| %x_65 = OpVariable %_ptr_Function_bool Function %20 |
| %x_41_phi = OpVariable %_ptr_Function_bool Function %20 |
| %x_55_phi = OpVariable %_ptr_Function_bool Function %20 |
| %x_66_phi = OpVariable %_ptr_Function_bool Function %20 |
| %44 = OpAccessChain %_ptr_Uniform_float %x_4 %uint_0 |
| %45 = OpLoad %float %44 |
| %46 = OpConvertFToS %int %45 |
| OpStore %unknown %46 |
| OpStore %ok %true |
| OpStore %x_41_phi %20 |
| OpSelectionMerge %48 None |
| OpBranchConditional %true %49 %48 |
| %49 = OpLabel |
| %51 = OpCompositeConstruct %v4int %46 %46 %46 %46 |
| %52 = OpSDiv %v4int %34 %51 |
| %53 = OpIEqual %v4bool %52 %34 |
| %50 = OpAll %bool %53 |
| OpStore %x_40 %50 |
| %55 = OpLoad %bool %x_40 |
| OpStore %x_41_phi %55 |
| OpBranch %48 |
| %48 = OpLabel |
| %56 = OpLoad %bool %x_41_phi |
| OpStore %ok %56 |
| %57 = OpCompositeConstruct %v4int %46 %46 %46 %46 |
| OpStore %val %57 |
| %60 = OpIAdd %v4int %57 %59 |
| OpStore %val %60 |
| %61 = OpISub %v4int %60 %59 |
| OpStore %val %61 |
| %62 = OpIAdd %v4int %61 %59 |
| OpStore %val %62 |
| %63 = OpISub %v4int %62 %59 |
| OpStore %val %63 |
| OpStore %x_55_phi %20 |
| OpSelectionMerge %64 None |
| OpBranchConditional %56 %65 %64 |
| %65 = OpLabel |
| %67 = OpIEqual %v4bool %63 %57 |
| %66 = OpAll %bool %67 |
| OpStore %x_54 %66 |
| %68 = OpLoad %bool %x_54 |
| OpStore %x_55_phi %68 |
| OpBranch %64 |
| %64 = OpLabel |
| %69 = OpLoad %bool %x_55_phi |
| OpStore %ok %69 |
| %72 = OpIMul %v4int %63 %71 |
| OpStore %val %72 |
| %73 = OpSDiv %v4int %72 %71 |
| OpStore %val %73 |
| %74 = OpIMul %v4int %73 %71 |
| OpStore %val %74 |
| %75 = OpSDiv %v4int %74 %71 |
| OpStore %val %75 |
| OpStore %x_66_phi %20 |
| OpSelectionMerge %76 None |
| OpBranchConditional %69 %77 %76 |
| %77 = OpLabel |
| %79 = OpIEqual %v4bool %75 %57 |
| %78 = OpAll %bool %79 |
| OpStore %x_65 %78 |
| %80 = OpLoad %bool %x_65 |
| OpStore %x_66_phi %80 |
| OpBranch %76 |
| %76 = OpLabel |
| %81 = OpLoad %bool %x_66_phi |
| OpStore %ok %81 |
| OpReturnValue %81 |
| OpFunctionEnd |
| %main_1 = OpFunction %void None %82 |
| %85 = 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 %91 |
| %x_9_ok = OpVariable %_ptr_Function_bool Function %20 |
| %x_10_val = OpVariable %_ptr_Function_v4float Function %10 |
| %x_116 = OpVariable %_ptr_Function_v4float Function %10 |
| %x_86 = OpVariable %_ptr_Function_bool Function %20 |
| %x_99 = OpVariable %_ptr_Function_bool Function %20 |
| %x_110 = OpVariable %_ptr_Function_bool Function %20 |
| %x_114 = OpVariable %_ptr_Function_bool Function %20 |
| %x_87_phi = OpVariable %_ptr_Function_bool Function %20 |
| %x_100_phi = OpVariable %_ptr_Function_bool Function %20 |
| %x_111_phi = OpVariable %_ptr_Function_bool Function %20 |
| %x_115_phi = OpVariable %_ptr_Function_bool Function %20 |
| %103 = OpLoad %v4float %vcolor_S0 |
| OpStore %outputColor_S0 %103 |
| %104 = OpAccessChain %_ptr_Uniform_float %x_4 %uint_0 |
| %105 = OpLoad %float %104 |
| OpStore %x_8_unknown %105 |
| OpStore %x_9_ok %true |
| OpStore %x_87_phi %20 |
| OpSelectionMerge %106 None |
| OpBranchConditional %true %107 %106 |
| %107 = OpLabel |
| %109 = OpCompositeConstruct %v4float %105 %105 %105 %105 |
| %110 = OpFDiv %v4float %10 %109 |
| %111 = OpFOrdEqual %v4bool %110 %10 |
| %108 = OpAll %bool %111 |
| OpStore %x_86 %108 |
| %112 = OpLoad %bool %x_86 |
| OpStore %x_87_phi %112 |
| OpBranch %106 |
| %106 = OpLabel |
| %113 = OpLoad %bool %x_87_phi |
| OpStore %x_9_ok %113 |
| %114 = OpCompositeConstruct %v4float %105 %105 %105 %105 |
| OpStore %x_10_val %114 |
| %117 = OpFAdd %v4float %114 %116 |
| OpStore %x_10_val %117 |
| %118 = OpFSub %v4float %117 %116 |
| OpStore %x_10_val %118 |
| %119 = OpFAdd %v4float %118 %116 |
| OpStore %x_10_val %119 |
| %120 = OpFSub %v4float %119 %116 |
| OpStore %x_10_val %120 |
| OpStore %x_100_phi %20 |
| OpSelectionMerge %121 None |
| OpBranchConditional %113 %122 %121 |
| %122 = OpLabel |
| %124 = OpFOrdEqual %v4bool %120 %114 |
| %123 = OpAll %bool %124 |
| OpStore %x_99 %123 |
| %125 = OpLoad %bool %x_99 |
| OpStore %x_100_phi %125 |
| OpBranch %121 |
| %121 = OpLabel |
| %126 = OpLoad %bool %x_100_phi |
| OpStore %x_9_ok %126 |
| %129 = OpFMul %v4float %120 %128 |
| OpStore %x_10_val %129 |
| %130 = OpFDiv %v4float %129 %128 |
| OpStore %x_10_val %130 |
| %131 = OpFMul %v4float %130 %128 |
| OpStore %x_10_val %131 |
| %132 = OpFDiv %v4float %131 %128 |
| OpStore %x_10_val %132 |
| OpStore %x_111_phi %20 |
| OpSelectionMerge %133 None |
| OpBranchConditional %126 %134 %133 |
| %134 = OpLabel |
| %136 = OpFOrdEqual %v4bool %132 %114 |
| %135 = OpAll %bool %136 |
| OpStore %x_110 %135 |
| %137 = OpLoad %bool %x_110 |
| OpStore %x_111_phi %137 |
| OpBranch %133 |
| %133 = OpLabel |
| %138 = OpLoad %bool %x_111_phi |
| OpStore %x_9_ok %138 |
| OpStore %x_115_phi %20 |
| OpSelectionMerge %139 None |
| OpBranchConditional %138 %140 %139 |
| %140 = OpLabel |
| %141 = OpFunctionCall %bool %test_int_S1_c0_b |
| OpStore %x_114 %141 |
| %142 = OpLoad %bool %x_114 |
| OpStore %x_115_phi %142 |
| OpBranch %139 |
| %139 = OpLabel |
| %143 = OpLoad %bool %x_115_phi |
| OpSelectionMerge %144 None |
| OpBranchConditional %143 %145 %146 |
| %145 = OpLabel |
| %149 = OpAccessChain %_ptr_Uniform_v4float %x_4 %uint_2 |
| %150 = OpLoad %v4float %149 |
| OpStore %x_116 %150 |
| OpBranch %144 |
| %146 = OpLabel |
| %152 = OpAccessChain %_ptr_Uniform_v4float %x_4 %uint_1 |
| %153 = OpLoad %v4float %152 |
| OpStore %x_116 %153 |
| OpBranch %144 |
| %144 = OpLabel |
| %154 = OpLoad %v4float %x_116 |
| OpStore %output_S1 %154 |
| OpStore %sk_FragColor %154 |
| OpReturn |
| OpFunctionEnd |
| %main_inner = OpFunction %main_out None %155 |
| %sk_Clockwise_param = OpFunctionParameter %bool |
| %vcolor_S0_param = OpFunctionParameter %v4float |
| %160 = OpLabel |
| OpStore %sk_Clockwise %sk_Clockwise_param |
| OpStore %vcolor_S0 %vcolor_S0_param |
| %161 = OpFunctionCall %void %main_1 |
| %162 = OpLoad %v4float %sk_FragColor |
| %163 = OpCompositeConstruct %main_out %162 |
| OpReturnValue %163 |
| OpFunctionEnd |
| %main = OpFunction %void None %82 |
| %165 = OpLabel |
| %167 = OpLoad %bool %sk_Clockwise_param_1 |
| %168 = OpLoad %v4float %vcolor_S0_param_1 |
| %166 = OpFunctionCall %main_out %main_inner %167 %168 |
| %169 = OpCompositeExtract %v4float %166 0 |
| OpStore %sk_FragColor_1_1 %169 |
| OpReturn |
| OpFunctionEnd |