| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 0 |
| ; Bound: 176 |
| ; 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_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 %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 |
| %72 = OpConstantComposite %v4int %int_2 %int_2 %int_2 %int_2 |
| %void = OpTypeVoid |
| %85 = OpTypeFunction %void |
| %_ptr_Function_v4float = OpTypePointer Function %v4float |
| %_ptr_Function_float = OpTypePointer Function %float |
| %94 = OpConstantNull %float |
| %float_1 = OpConstant %float 1 |
| %119 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 |
| %float_2 = OpConstant %float 2 |
| %132 = 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 |
| %161 = 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_41 = OpVariable %_ptr_Function_bool Function %20 |
| %x_54 = OpVariable %_ptr_Function_bool Function %20 |
| %x_55 = OpVariable %_ptr_Function_bool Function %20 |
| %x_65 = OpVariable %_ptr_Function_bool Function %20 |
| %x_66 = 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 %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 %55 |
| OpBranch %48 |
| %48 = OpLabel |
| %56 = OpLoad %bool %x_41 |
| 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 %20 |
| %64 = OpLoad %bool %x_41 |
| OpSelectionMerge %65 None |
| OpBranchConditional %64 %66 %65 |
| %66 = OpLabel |
| %68 = OpIEqual %v4bool %63 %57 |
| %67 = OpAll %bool %68 |
| OpStore %x_54 %67 |
| %69 = OpLoad %bool %x_54 |
| OpStore %x_55 %69 |
| OpBranch %65 |
| %65 = OpLabel |
| %70 = OpLoad %bool %x_55 |
| OpStore %ok %70 |
| %73 = OpIMul %v4int %63 %72 |
| OpStore %val %73 |
| %74 = OpSDiv %v4int %73 %72 |
| OpStore %val %74 |
| %75 = OpIMul %v4int %74 %72 |
| OpStore %val %75 |
| %76 = OpSDiv %v4int %75 %72 |
| OpStore %val %76 |
| OpStore %x_66 %20 |
| %77 = OpLoad %bool %x_55 |
| OpSelectionMerge %78 None |
| OpBranchConditional %77 %79 %78 |
| %79 = OpLabel |
| %81 = OpIEqual %v4bool %76 %57 |
| %80 = OpAll %bool %81 |
| OpStore %x_65 %80 |
| %82 = OpLoad %bool %x_65 |
| OpStore %x_66 %82 |
| OpBranch %78 |
| %78 = OpLabel |
| %83 = OpLoad %bool %x_66 |
| OpStore %ok %83 |
| %84 = OpLoad %bool %x_66 |
| OpReturnValue %84 |
| OpFunctionEnd |
| %main_1 = OpFunction %void None %85 |
| %88 = 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 %94 |
| %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_87 = OpVariable %_ptr_Function_bool Function %20 |
| %x_99 = OpVariable %_ptr_Function_bool Function %20 |
| %x_100 = OpVariable %_ptr_Function_bool Function %20 |
| %x_110 = OpVariable %_ptr_Function_bool Function %20 |
| %x_111 = OpVariable %_ptr_Function_bool Function %20 |
| %x_114 = OpVariable %_ptr_Function_bool Function %20 |
| %x_115 = OpVariable %_ptr_Function_bool Function %20 |
| %106 = OpLoad %v4float %vcolor_S0 |
| OpStore %outputColor_S0 %106 |
| %107 = OpAccessChain %_ptr_Uniform_float %x_4 %uint_0 |
| %108 = OpLoad %float %107 |
| OpStore %x_8_unknown %108 |
| OpStore %x_9_ok %true |
| OpStore %x_87 %20 |
| OpSelectionMerge %109 None |
| OpBranchConditional %true %110 %109 |
| %110 = OpLabel |
| %112 = OpCompositeConstruct %v4float %108 %108 %108 %108 |
| %113 = OpFDiv %v4float %10 %112 |
| %114 = OpFOrdEqual %v4bool %113 %10 |
| %111 = OpAll %bool %114 |
| OpStore %x_86 %111 |
| %115 = OpLoad %bool %x_86 |
| OpStore %x_87 %115 |
| OpBranch %109 |
| %109 = OpLabel |
| %116 = OpLoad %bool %x_87 |
| OpStore %x_9_ok %116 |
| %117 = OpCompositeConstruct %v4float %108 %108 %108 %108 |
| OpStore %x_10_val %117 |
| %120 = OpFAdd %v4float %117 %119 |
| OpStore %x_10_val %120 |
| %121 = OpFSub %v4float %120 %119 |
| OpStore %x_10_val %121 |
| %122 = OpFAdd %v4float %121 %119 |
| OpStore %x_10_val %122 |
| %123 = OpFSub %v4float %122 %119 |
| OpStore %x_10_val %123 |
| OpStore %x_100 %20 |
| %124 = OpLoad %bool %x_87 |
| OpSelectionMerge %125 None |
| OpBranchConditional %124 %126 %125 |
| %126 = OpLabel |
| %128 = OpFOrdEqual %v4bool %123 %117 |
| %127 = OpAll %bool %128 |
| OpStore %x_99 %127 |
| %129 = OpLoad %bool %x_99 |
| OpStore %x_100 %129 |
| OpBranch %125 |
| %125 = OpLabel |
| %130 = OpLoad %bool %x_100 |
| OpStore %x_9_ok %130 |
| %133 = OpFMul %v4float %123 %132 |
| OpStore %x_10_val %133 |
| %134 = OpFDiv %v4float %133 %132 |
| OpStore %x_10_val %134 |
| %135 = OpFMul %v4float %134 %132 |
| OpStore %x_10_val %135 |
| %136 = OpFDiv %v4float %135 %132 |
| OpStore %x_10_val %136 |
| OpStore %x_111 %20 |
| %137 = OpLoad %bool %x_100 |
| OpSelectionMerge %138 None |
| OpBranchConditional %137 %139 %138 |
| %139 = OpLabel |
| %141 = OpFOrdEqual %v4bool %136 %117 |
| %140 = OpAll %bool %141 |
| OpStore %x_110 %140 |
| %142 = OpLoad %bool %x_110 |
| OpStore %x_111 %142 |
| OpBranch %138 |
| %138 = OpLabel |
| %143 = OpLoad %bool %x_111 |
| OpStore %x_9_ok %143 |
| OpStore %x_115 %20 |
| %144 = OpLoad %bool %x_111 |
| OpSelectionMerge %145 None |
| OpBranchConditional %144 %146 %145 |
| %146 = OpLabel |
| %147 = OpFunctionCall %bool %test_int_S1_c0_b |
| OpStore %x_114 %147 |
| %148 = OpLoad %bool %x_114 |
| OpStore %x_115 %148 |
| OpBranch %145 |
| %145 = OpLabel |
| %149 = OpLoad %bool %x_115 |
| OpSelectionMerge %150 None |
| OpBranchConditional %149 %151 %152 |
| %151 = OpLabel |
| %155 = OpAccessChain %_ptr_Uniform_v4float %x_4 %uint_2 |
| %156 = OpLoad %v4float %155 |
| OpStore %x_116 %156 |
| OpBranch %150 |
| %152 = OpLabel |
| %158 = OpAccessChain %_ptr_Uniform_v4float %x_4 %uint_1 |
| %159 = OpLoad %v4float %158 |
| OpStore %x_116 %159 |
| OpBranch %150 |
| %150 = OpLabel |
| %160 = OpLoad %v4float %x_116 |
| OpStore %output_S1 %160 |
| OpStore %sk_FragColor %160 |
| OpReturn |
| OpFunctionEnd |
| %main_inner = OpFunction %main_out None %161 |
| %sk_Clockwise_param = OpFunctionParameter %bool |
| %vcolor_S0_param = OpFunctionParameter %v4float |
| %166 = OpLabel |
| OpStore %sk_Clockwise %sk_Clockwise_param |
| OpStore %vcolor_S0 %vcolor_S0_param |
| %167 = OpFunctionCall %void %main_1 |
| %168 = OpLoad %v4float %sk_FragColor |
| %169 = OpCompositeConstruct %main_out %168 |
| OpReturnValue %169 |
| OpFunctionEnd |
| %main = OpFunction %void None %85 |
| %171 = OpLabel |
| %173 = OpLoad %bool %sk_Clockwise_param_1 |
| %174 = OpLoad %v4float %vcolor_S0_param_1 |
| %172 = OpFunctionCall %main_out %main_inner %173 %174 |
| %175 = OpCompositeExtract %v4float %172 0 |
| OpStore %sk_FragColor_1_1 %175 |
| OpReturn |
| OpFunctionEnd |