blob: ce351965d075e09e74f55a470b4dbc38ae29b79f [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 249
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %tint_symbol %tint_symbol_2
OpExecutionMode %main OriginUpperLeft
OpName %gl_FragCoord "gl_FragCoord"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "resolution"
OpName %x_17 "x_17"
OpName %x_GLF_color "x_GLF_color"
OpName %tint_symbol "tint_symbol"
OpName %tint_symbol_2 "tint_symbol_2"
OpName %pointInTriangle_vf2_vf2_vf2_vf2_ "pointInTriangle_vf2_vf2_vf2_vf2_"
OpName %p "p"
OpName %a "a"
OpName %b "b"
OpName %c "c"
OpName %x_66 "x_66"
OpName %x_67 "x_67"
OpName %x_68 "x_68"
OpName %param "param"
OpName %param_1 "param_1"
OpName %param_2 "param_2"
OpName %param_3 "param_3"
OpName %param_4 "param_4"
OpName %param_5 "param_5"
OpName %x_135 "x_135"
OpName %x_172 "x_172"
OpName %x_136_phi "x_136_phi"
OpName %x_173_phi "x_173_phi"
OpName %main_1 "main_1"
OpName %param_6 "param_6"
OpName %param_7 "param_7"
OpName %param_8 "param_8"
OpName %param_9 "param_9"
OpName %main_out "main_out"
OpMemberName %main_out 0 "x_GLF_color_1"
OpName %tint_symbol_3 "tint_symbol_3"
OpName %tint_symbol_1 "tint_symbol_1"
OpName %main "main"
OpDecorate %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %x_17 NonWritable
OpDecorate %x_17 DescriptorSet 0
OpDecorate %x_17 Binding 0
OpDecorate %tint_symbol BuiltIn FragCoord
OpDecorate %tint_symbol_2 Location 0
OpMemberDecorate %main_out 0 Offset 0
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Private_v4float = OpTypePointer Private %v4float
%5 = OpConstantNull %v4float
%gl_FragCoord = OpVariable %_ptr_Private_v4float Private %5
%v2float = OpTypeVector %float 2
%buf0 = OpTypeStruct %v2float
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_17 = OpVariable %_ptr_Uniform_buf0 Uniform
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %5
%_ptr_Input_v4float = OpTypePointer Input %v4float
%tint_symbol = OpVariable %_ptr_Input_v4float Input
%_ptr_Output_v4float = OpTypePointer Output %v4float
%tint_symbol_2 = OpVariable %_ptr_Output_v4float Output %5
%int = OpTypeInt 32 1
%_ptr_Function_v2float = OpTypePointer Function %v2float
%15 = OpTypeFunction %int %_ptr_Function_v2float %_ptr_Function_v2float %_ptr_Function_v2float %_ptr_Function_v2float
%_ptr_Function_float = OpTypePointer Function %float
%26 = OpConstantNull %float
%30 = OpConstantNull %v2float
%bool = OpTypeBool
%_ptr_Function_bool = OpTypePointer Function %bool
%39 = OpConstantNull %bool
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%uint_1 = OpConstant %uint 1
%float_0 = OpConstant %float 0
%int_0 = OpConstant %int 0
%int_1 = OpConstant %int 1
%void = OpTypeVoid
%199 = OpTypeFunction %void
%_ptr_Uniform_v2float = OpTypePointer Uniform %v2float
%float_0_699999988 = OpConstant %float 0.699999988
%float_0_300000012 = OpConstant %float 0.300000012
%217 = OpConstantComposite %v2float %float_0_699999988 %float_0_300000012
%float_0_5 = OpConstant %float 0.5
%float_0_899999976 = OpConstant %float 0.899999976
%220 = OpConstantComposite %v2float %float_0_5 %float_0_899999976
%float_0_100000001 = OpConstant %float 0.100000001
%float_0_400000006 = OpConstant %float 0.400000006
%223 = OpConstantComposite %v2float %float_0_100000001 %float_0_400000006
%float_1 = OpConstant %float 1
%234 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%235 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_1
%main_out = OpTypeStruct %v4float
%236 = OpTypeFunction %void %main_out
%pointInTriangle_vf2_vf2_vf2_vf2_ = OpFunction %int None %15
%p = OpFunctionParameter %_ptr_Function_v2float
%a = OpFunctionParameter %_ptr_Function_v2float
%b = OpFunctionParameter %_ptr_Function_v2float
%c = OpFunctionParameter %_ptr_Function_v2float
%23 = OpLabel
%x_66 = OpVariable %_ptr_Function_float Function %26
%x_67 = OpVariable %_ptr_Function_float Function %26
%x_68 = OpVariable %_ptr_Function_float Function %26
%param = OpVariable %_ptr_Function_v2float Function %30
%param_1 = OpVariable %_ptr_Function_v2float Function %30
%param_2 = OpVariable %_ptr_Function_v2float Function %30
%param_3 = OpVariable %_ptr_Function_v2float Function %30
%param_4 = OpVariable %_ptr_Function_v2float Function %30
%param_5 = OpVariable %_ptr_Function_v2float Function %30
%x_135 = OpVariable %_ptr_Function_bool Function %39
%x_172 = OpVariable %_ptr_Function_bool Function %39
%x_136_phi = OpVariable %_ptr_Function_bool Function %39
%x_173_phi = OpVariable %_ptr_Function_bool Function %39
%46 = OpAccessChain %_ptr_Function_float %p %uint_0
%47 = OpLoad %float %46
%49 = OpAccessChain %_ptr_Function_float %a %uint_0
%50 = OpLoad %float %49
%53 = OpAccessChain %_ptr_Function_float %p %uint_1
%54 = OpLoad %float %53
%56 = OpAccessChain %_ptr_Function_float %a %uint_1
%57 = OpLoad %float %56
%59 = OpAccessChain %_ptr_Function_float %b %uint_0
%60 = OpLoad %float %59
%62 = OpAccessChain %_ptr_Function_float %a %uint_0
%63 = OpLoad %float %62
%65 = OpAccessChain %_ptr_Function_float %b %uint_1
%66 = OpLoad %float %65
%68 = OpAccessChain %_ptr_Function_float %a %uint_1
%69 = OpLoad %float %68
%70 = OpFSub %float %47 %50
%71 = OpFSub %float %54 %57
%72 = OpCompositeConstruct %v2float %70 %71
OpStore %param %72
%73 = OpFSub %float %60 %63
%74 = OpFSub %float %66 %69
%75 = OpCompositeConstruct %v2float %73 %74
OpStore %param_1 %75
%76 = OpAccessChain %_ptr_Function_float %param %uint_0
%77 = OpLoad %float %76
%78 = OpAccessChain %_ptr_Function_float %param_1 %uint_1
%79 = OpLoad %float %78
%80 = OpAccessChain %_ptr_Function_float %param_1 %uint_0
%81 = OpLoad %float %80
%82 = OpAccessChain %_ptr_Function_float %param %uint_1
%83 = OpLoad %float %82
%84 = OpFMul %float %77 %79
%85 = OpFMul %float %81 %83
%86 = OpFSub %float %84 %85
OpStore %x_68 %86
%88 = OpAccessChain %_ptr_Function_float %p %uint_0
%89 = OpLoad %float %88
%91 = OpAccessChain %_ptr_Function_float %b %uint_0
%92 = OpLoad %float %91
%94 = OpAccessChain %_ptr_Function_float %p %uint_1
%95 = OpLoad %float %94
%97 = OpAccessChain %_ptr_Function_float %b %uint_1
%98 = OpLoad %float %97
%100 = OpAccessChain %_ptr_Function_float %c %uint_0
%101 = OpLoad %float %100
%103 = OpAccessChain %_ptr_Function_float %b %uint_0
%104 = OpLoad %float %103
%106 = OpAccessChain %_ptr_Function_float %c %uint_1
%107 = OpLoad %float %106
%109 = OpAccessChain %_ptr_Function_float %b %uint_1
%110 = OpLoad %float %109
%111 = OpFSub %float %89 %92
%112 = OpFSub %float %95 %98
%113 = OpCompositeConstruct %v2float %111 %112
OpStore %param_2 %113
%114 = OpFSub %float %101 %104
%115 = OpFSub %float %107 %110
%116 = OpCompositeConstruct %v2float %114 %115
OpStore %param_3 %116
%117 = OpAccessChain %_ptr_Function_float %param_2 %uint_0
%118 = OpLoad %float %117
%119 = OpAccessChain %_ptr_Function_float %param_3 %uint_1
%120 = OpLoad %float %119
%121 = OpAccessChain %_ptr_Function_float %param_3 %uint_0
%122 = OpLoad %float %121
%123 = OpAccessChain %_ptr_Function_float %param_2 %uint_1
%124 = OpLoad %float %123
%125 = OpFMul %float %118 %120
%126 = OpFMul %float %122 %124
%127 = OpFSub %float %125 %126
OpStore %x_67 %127
%129 = OpFOrdLessThan %bool %86 %float_0
%130 = OpFOrdLessThan %bool %127 %float_0
%131 = OpLogicalAnd %bool %129 %130
OpStore %x_136_phi %131
%132 = OpLogicalNot %bool %131
OpSelectionMerge %133 None
OpBranchConditional %132 %134 %133
%134 = OpLabel
%135 = OpFOrdGreaterThanEqual %bool %86 %float_0
%136 = OpFOrdGreaterThanEqual %bool %127 %float_0
%137 = OpLogicalAnd %bool %135 %136
OpStore %x_135 %137
%138 = OpLoad %bool %x_135
OpStore %x_136_phi %138
OpBranch %133
%133 = OpLabel
%139 = OpLoad %bool %x_136_phi
%140 = OpLogicalNot %bool %139
OpSelectionMerge %141 None
OpBranchConditional %140 %142 %141
%142 = OpLabel
OpReturnValue %int_0
%141 = OpLabel
%145 = OpAccessChain %_ptr_Function_float %p %uint_0
%146 = OpLoad %float %145
%148 = OpAccessChain %_ptr_Function_float %c %uint_0
%149 = OpLoad %float %148
%151 = OpAccessChain %_ptr_Function_float %p %uint_1
%152 = OpLoad %float %151
%154 = OpAccessChain %_ptr_Function_float %c %uint_1
%155 = OpLoad %float %154
%157 = OpAccessChain %_ptr_Function_float %a %uint_0
%158 = OpLoad %float %157
%160 = OpAccessChain %_ptr_Function_float %c %uint_0
%161 = OpLoad %float %160
%163 = OpAccessChain %_ptr_Function_float %a %uint_1
%164 = OpLoad %float %163
%166 = OpAccessChain %_ptr_Function_float %c %uint_1
%167 = OpLoad %float %166
%168 = OpFSub %float %146 %149
%169 = OpFSub %float %152 %155
%170 = OpCompositeConstruct %v2float %168 %169
OpStore %param_4 %170
%171 = OpFSub %float %158 %161
%172 = OpFSub %float %164 %167
%173 = OpCompositeConstruct %v2float %171 %172
OpStore %param_5 %173
%174 = OpAccessChain %_ptr_Function_float %param_4 %uint_0
%175 = OpLoad %float %174
%176 = OpAccessChain %_ptr_Function_float %param_5 %uint_1
%177 = OpLoad %float %176
%178 = OpAccessChain %_ptr_Function_float %param_5 %uint_0
%179 = OpLoad %float %178
%180 = OpAccessChain %_ptr_Function_float %param_4 %uint_1
%181 = OpLoad %float %180
%182 = OpFMul %float %175 %177
%183 = OpFMul %float %179 %181
%184 = OpFSub %float %182 %183
OpStore %x_66 %184
%185 = OpFOrdLessThan %bool %184 %float_0
%186 = OpLogicalAnd %bool %129 %185
OpStore %x_173_phi %186
%187 = OpLogicalNot %bool %186
OpSelectionMerge %188 None
OpBranchConditional %187 %189 %188
%189 = OpLabel
%190 = OpFOrdGreaterThanEqual %bool %86 %float_0
%191 = OpFOrdGreaterThanEqual %bool %184 %float_0
%192 = OpLogicalAnd %bool %190 %191
OpStore %x_172 %192
%193 = OpLoad %bool %x_172
OpStore %x_173_phi %193
OpBranch %188
%188 = OpLabel
%194 = OpLoad %bool %x_173_phi
%195 = OpLogicalNot %bool %194
OpSelectionMerge %196 None
OpBranchConditional %195 %197 %196
%197 = OpLabel
OpReturnValue %int_0
%196 = OpLabel
OpReturnValue %int_1
OpFunctionEnd
%main_1 = OpFunction %void None %199
%202 = OpLabel
%param_6 = OpVariable %_ptr_Function_v2float Function %30
%param_7 = OpVariable %_ptr_Function_v2float Function %30
%param_8 = OpVariable %_ptr_Function_v2float Function %30
%param_9 = OpVariable %_ptr_Function_v2float Function %30
%207 = OpLoad %v4float %gl_FragCoord
%209 = OpAccessChain %_ptr_Uniform_v2float %x_17 %uint_0
%210 = OpLoad %v2float %209
%211 = OpCompositeExtract %float %207 0
%212 = OpCompositeExtract %float %207 1
%213 = OpCompositeConstruct %v2float %211 %212
%214 = OpFDiv %v2float %213 %210
OpStore %param_6 %214
OpStore %param_7 %217
OpStore %param_8 %220
OpStore %param_9 %223
%224 = OpFunctionCall %int %pointInTriangle_vf2_vf2_vf2_vf2_ %param_6 %param_7 %param_8 %param_9
%229 = OpIEqual %bool %224 %int_1
OpSelectionMerge %230 None
OpBranchConditional %229 %231 %232
%231 = OpLabel
OpStore %x_GLF_color %234
OpBranch %230
%232 = OpLabel
OpStore %x_GLF_color %235
OpBranch %230
%230 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_3 = OpFunction %void None %236
%tint_symbol_1 = OpFunctionParameter %main_out
%240 = OpLabel
%241 = OpCompositeExtract %v4float %tint_symbol_1 0
OpStore %tint_symbol_2 %241
OpReturn
OpFunctionEnd
%main = OpFunction %void None %199
%243 = OpLabel
%244 = OpLoad %v4float %tint_symbol
OpStore %gl_FragCoord %244
%245 = OpFunctionCall %void %main_1
%247 = OpLoad %v4float %x_GLF_color
%248 = OpCompositeConstruct %main_out %247
%246 = OpFunctionCall %void %tint_symbol_3 %248
OpReturn
OpFunctionEnd