blob: 96a940d589907ea77749a1ae5a5fdca54aa183bd [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 205
; 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_ftoi "tint_ftoi"
OpName %v "v"
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
%23 = OpTypeFunction %int %float
%float_2_14748352e_09 = OpConstant %float 2.14748352e+09
%float_n2_14748365e_09 = OpConstant %float -2.14748365e+09
%int_n2147483648 = OpConstant %int -2147483648
%int_2147483647 = OpConstant %int 2147483647
%v4int = OpTypeVector %int 4
%37 = OpTypeFunction %v4int %v4int %v4int
%44 = OpConstantNull %v4int
%v4bool = OpTypeVector %bool 4
%47 = OpConstantComposite %v4int %int_n2147483648 %int_n2147483648 %int_n2147483648 %int_n2147483648
%int_n1 = OpConstant %int -1
%50 = OpConstantComposite %v4int %int_n1 %int_n1 %int_n1 %int_n1
%int_1 = OpConstant %int 1
%55 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
%57 = OpTypeFunction %bool
%_ptr_Function_int = OpTypePointer Function %int
%62 = 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
%101 = OpConstantComposite %v4int %int_2 %int_2 %int_2 %int_2
%void = OpTypeVoid
%114 = OpTypeFunction %void
%_ptr_Function_v4float = OpTypePointer Function %v4float
%_ptr_Function_float = OpTypePointer Function %float
%123 = OpConstantNull %float
%float_1 = OpConstant %float 1
%148 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
%float_2 = OpConstant %float 2
%161 = 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
%190 = OpTypeFunction %main_out %bool %v4float
%tint_ftoi = OpFunction %int None %23
%v = OpFunctionParameter %float
%27 = OpLabel
%30 = OpFOrdLessThan %bool %v %float_2_14748352e_09
%33 = OpFOrdLessThan %bool %v %float_n2_14748365e_09
%35 = OpConvertFToS %int %v
%31 = OpSelect %int %33 %int_n2147483648 %35
%28 = OpSelect %int %30 %31 %int_2147483647
OpReturnValue %28
OpFunctionEnd
%tint_div = OpFunction %v4int None %37
%lhs = OpFunctionParameter %v4int
%rhs = OpFunctionParameter %v4int
%42 = OpLabel
%45 = OpIEqual %v4bool %rhs %44
%48 = OpIEqual %v4bool %lhs %47
%51 = OpIEqual %v4bool %rhs %50
%52 = OpLogicalAnd %v4bool %48 %51
%53 = OpLogicalOr %v4bool %45 %52
%43 = OpSelect %v4int %53 %55 %rhs
%56 = OpSDiv %v4int %lhs %43
OpReturnValue %56
OpFunctionEnd
%test_int_S1_c0_b = OpFunction %bool None %57
%59 = OpLabel
%unknown = OpVariable %_ptr_Function_int Function %62
%ok = OpVariable %_ptr_Function_bool Function %21
%val = OpVariable %_ptr_Function_v4int Function %44
%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
%76 = OpAccessChain %_ptr_Uniform_float %x_4 %uint_0 %uint_0
%77 = OpLoad %float %76
%78 = OpFunctionCall %int %tint_ftoi %77
OpStore %unknown %78
OpStore %ok %true
OpStore %x_41 %21
OpSelectionMerge %80 None
OpBranchConditional %true %81 %80
%81 = OpLabel
%84 = OpCompositeConstruct %v4int %78 %78 %78 %78
%83 = OpFunctionCall %v4int %tint_div %44 %84
%85 = OpIEqual %v4bool %83 %44
%82 = OpAll %bool %85
OpStore %x_40 %82
%86 = OpLoad %bool %x_40
OpStore %x_41 %86
OpBranch %80
%80 = OpLabel
%87 = OpLoad %bool %x_41
OpStore %ok %87
%88 = OpCompositeConstruct %v4int %78 %78 %78 %78
OpStore %val %88
%89 = OpIAdd %v4int %88 %55
OpStore %val %89
%90 = OpISub %v4int %89 %55
OpStore %val %90
%91 = OpIAdd %v4int %90 %55
OpStore %val %91
%92 = OpISub %v4int %91 %55
OpStore %val %92
OpStore %x_55 %21
%93 = OpLoad %bool %x_41
OpSelectionMerge %94 None
OpBranchConditional %93 %95 %94
%95 = OpLabel
%97 = OpIEqual %v4bool %92 %88
%96 = OpAll %bool %97
OpStore %x_54 %96
%98 = OpLoad %bool %x_54
OpStore %x_55 %98
OpBranch %94
%94 = OpLabel
%99 = OpLoad %bool %x_55
OpStore %ok %99
%102 = OpIMul %v4int %92 %101
OpStore %val %102
%103 = OpFunctionCall %v4int %tint_div %102 %101
OpStore %val %103
%104 = OpIMul %v4int %103 %101
OpStore %val %104
%105 = OpFunctionCall %v4int %tint_div %104 %101
OpStore %val %105
OpStore %x_66 %21
%106 = OpLoad %bool %x_55
OpSelectionMerge %107 None
OpBranchConditional %106 %108 %107
%108 = OpLabel
%110 = OpIEqual %v4bool %105 %88
%109 = OpAll %bool %110
OpStore %x_65 %109
%111 = OpLoad %bool %x_65
OpStore %x_66 %111
OpBranch %107
%107 = OpLabel
%112 = OpLoad %bool %x_66
OpStore %ok %112
%113 = OpLoad %bool %x_66
OpReturnValue %113
OpFunctionEnd
%main_1 = OpFunction %void None %114
%117 = 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 %123
%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
%135 = OpLoad %v4float %vcolor_S0
OpStore %outputColor_S0 %135
%136 = OpAccessChain %_ptr_Uniform_float %x_4 %uint_0 %uint_0
%137 = OpLoad %float %136
OpStore %x_8_unknown %137
OpStore %x_9_ok %true
OpStore %x_87 %21
OpSelectionMerge %138 None
OpBranchConditional %true %139 %138
%139 = OpLabel
%141 = OpCompositeConstruct %v4float %137 %137 %137 %137
%142 = OpFDiv %v4float %10 %141
%143 = OpFOrdEqual %v4bool %142 %10
%140 = OpAll %bool %143
OpStore %x_86 %140
%144 = OpLoad %bool %x_86
OpStore %x_87 %144
OpBranch %138
%138 = OpLabel
%145 = OpLoad %bool %x_87
OpStore %x_9_ok %145
%146 = OpCompositeConstruct %v4float %137 %137 %137 %137
OpStore %x_10_val %146
%149 = OpFAdd %v4float %146 %148
OpStore %x_10_val %149
%150 = OpFSub %v4float %149 %148
OpStore %x_10_val %150
%151 = OpFAdd %v4float %150 %148
OpStore %x_10_val %151
%152 = OpFSub %v4float %151 %148
OpStore %x_10_val %152
OpStore %x_100 %21
%153 = OpLoad %bool %x_87
OpSelectionMerge %154 None
OpBranchConditional %153 %155 %154
%155 = OpLabel
%157 = OpFOrdEqual %v4bool %152 %146
%156 = OpAll %bool %157
OpStore %x_99 %156
%158 = OpLoad %bool %x_99
OpStore %x_100 %158
OpBranch %154
%154 = OpLabel
%159 = OpLoad %bool %x_100
OpStore %x_9_ok %159
%162 = OpFMul %v4float %152 %161
OpStore %x_10_val %162
%163 = OpFDiv %v4float %162 %161
OpStore %x_10_val %163
%164 = OpFMul %v4float %163 %161
OpStore %x_10_val %164
%165 = OpFDiv %v4float %164 %161
OpStore %x_10_val %165
OpStore %x_111 %21
%166 = OpLoad %bool %x_100
OpSelectionMerge %167 None
OpBranchConditional %166 %168 %167
%168 = OpLabel
%170 = OpFOrdEqual %v4bool %165 %146
%169 = OpAll %bool %170
OpStore %x_110 %169
%171 = OpLoad %bool %x_110
OpStore %x_111 %171
OpBranch %167
%167 = OpLabel
%172 = OpLoad %bool %x_111
OpStore %x_9_ok %172
OpStore %x_115 %21
%173 = OpLoad %bool %x_111
OpSelectionMerge %174 None
OpBranchConditional %173 %175 %174
%175 = OpLabel
%176 = OpFunctionCall %bool %test_int_S1_c0_b
OpStore %x_114 %176
%177 = OpLoad %bool %x_114
OpStore %x_115 %177
OpBranch %174
%174 = OpLabel
%178 = OpLoad %bool %x_115
OpSelectionMerge %179 None
OpBranchConditional %178 %180 %181
%180 = OpLabel
%184 = OpAccessChain %_ptr_Uniform_v4float %x_4 %uint_0 %uint_2
%185 = OpLoad %v4float %184
OpStore %x_116 %185
OpBranch %179
%181 = OpLabel
%187 = OpAccessChain %_ptr_Uniform_v4float %x_4 %uint_0 %uint_1
%188 = OpLoad %v4float %187
OpStore %x_116 %188
OpBranch %179
%179 = OpLabel
%189 = OpLoad %v4float %x_116
OpStore %output_S1 %189
OpStore %sk_FragColor %189
OpReturn
OpFunctionEnd
%main_inner = OpFunction %main_out None %190
%sk_Clockwise_param = OpFunctionParameter %bool
%vcolor_S0_param = OpFunctionParameter %v4float
%195 = OpLabel
OpStore %sk_Clockwise %sk_Clockwise_param
OpStore %vcolor_S0 %vcolor_S0_param
%196 = OpFunctionCall %void %main_1
%197 = OpLoad %v4float %sk_FragColor
%198 = OpCompositeConstruct %main_out %197
OpReturnValue %198
OpFunctionEnd
%main = OpFunction %void None %114
%200 = OpLabel
%202 = OpLoad %bool %sk_Clockwise_param_1
%203 = OpLoad %v4float %vcolor_S0_param_1
%201 = OpFunctionCall %main_out %main_inner %202 %203
%204 = OpCompositeExtract %v4float %201 0
OpStore %sk_FragColor_1_1 %204
OpReturn
OpFunctionEnd