xref: /aosp_15_r20/external/skia/tests/sksl/intrinsics/MixFloatES3.asm.frag (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1               OpCapability Shader
2          %1 = OpExtInstImport "GLSL.std.450"
3               OpMemoryModel Logical GLSL450
4               OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_FragColor
5               OpExecutionMode %_entrypoint_v OriginUpperLeft
6               OpName %sk_FragColor "sk_FragColor"
7               OpName %_UniformBuffer "_UniformBuffer"
8               OpMemberName %_UniformBuffer 0 "colorGreen"
9               OpMemberName %_UniformBuffer 1 "colorRed"
10               OpMemberName %_UniformBuffer 2 "colorBlack"
11               OpMemberName %_UniformBuffer 3 "colorWhite"
12               OpMemberName %_UniformBuffer 4 "testInputs"
13               OpName %_entrypoint_v "_entrypoint_v"
14               OpName %main "main"
15               OpName %FTFT "FTFT"
16               OpName %TFTF "TFTF"
17               OpDecorate %sk_FragColor RelaxedPrecision
18               OpDecorate %sk_FragColor Location 0
19               OpDecorate %sk_FragColor Index 0
20               OpMemberDecorate %_UniformBuffer 0 Offset 0
21               OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
22               OpMemberDecorate %_UniformBuffer 1 Offset 16
23               OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
24               OpMemberDecorate %_UniformBuffer 2 Offset 32
25               OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision
26               OpMemberDecorate %_UniformBuffer 3 Offset 48
27               OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision
28               OpMemberDecorate %_UniformBuffer 4 Offset 64
29               OpMemberDecorate %_UniformBuffer 4 RelaxedPrecision
30               OpDecorate %_UniformBuffer Block
31               OpDecorate %7 Binding 0
32               OpDecorate %7 DescriptorSet 0
33               OpDecorate %31 RelaxedPrecision
34               OpDecorate %32 RelaxedPrecision
35               OpDecorate %34 RelaxedPrecision
36               OpDecorate %36 RelaxedPrecision
37               OpDecorate %38 RelaxedPrecision
38               OpDecorate %47 RelaxedPrecision
39               OpDecorate %48 RelaxedPrecision
40               OpDecorate %51 RelaxedPrecision
41               OpDecorate %52 RelaxedPrecision
42               OpDecorate %55 RelaxedPrecision
43               OpDecorate %56 RelaxedPrecision
44               OpDecorate %58 RelaxedPrecision
45               OpDecorate %59 RelaxedPrecision
46               OpDecorate %61 RelaxedPrecision
47               OpDecorate %62 RelaxedPrecision
48               OpDecorate %68 RelaxedPrecision
49               OpDecorate %69 RelaxedPrecision
50               OpDecorate %71 RelaxedPrecision
51               OpDecorate %72 RelaxedPrecision
52               OpDecorate %76 RelaxedPrecision
53               OpDecorate %77 RelaxedPrecision
54               OpDecorate %79 RelaxedPrecision
55               OpDecorate %80 RelaxedPrecision
56               OpDecorate %83 RelaxedPrecision
57               OpDecorate %84 RelaxedPrecision
58               OpDecorate %86 RelaxedPrecision
59               OpDecorate %94 RelaxedPrecision
60               OpDecorate %95 RelaxedPrecision
61               OpDecorate %98 RelaxedPrecision
62               OpDecorate %99 RelaxedPrecision
63               OpDecorate %103 RelaxedPrecision
64               OpDecorate %104 RelaxedPrecision
65               OpDecorate %106 RelaxedPrecision
66               OpDecorate %107 RelaxedPrecision
67               OpDecorate %110 RelaxedPrecision
68               OpDecorate %111 RelaxedPrecision
69               OpDecorate %113 RelaxedPrecision
70               OpDecorate %114 RelaxedPrecision
71               OpDecorate %115 RelaxedPrecision
72               OpDecorate %123 RelaxedPrecision
73               OpDecorate %125 RelaxedPrecision
74               OpDecorate %127 RelaxedPrecision
75               OpDecorate %129 RelaxedPrecision
76               OpDecorate %131 RelaxedPrecision
77               OpDecorate %132 RelaxedPrecision
78               OpDecorate %134 RelaxedPrecision
79               OpDecorate %135 RelaxedPrecision
80               OpDecorate %136 RelaxedPrecision
81               OpDecorate %144 RelaxedPrecision
82               OpDecorate %145 RelaxedPrecision
83               OpDecorate %148 RelaxedPrecision
84               OpDecorate %149 RelaxedPrecision
85               OpDecorate %152 RelaxedPrecision
86               OpDecorate %153 RelaxedPrecision
87               OpDecorate %155 RelaxedPrecision
88               OpDecorate %156 RelaxedPrecision
89               OpDecorate %158 RelaxedPrecision
90               OpDecorate %159 RelaxedPrecision
91               OpDecorate %166 RelaxedPrecision
92               OpDecorate %167 RelaxedPrecision
93               OpDecorate %169 RelaxedPrecision
94               OpDecorate %170 RelaxedPrecision
95               OpDecorate %173 RelaxedPrecision
96               OpDecorate %174 RelaxedPrecision
97               OpDecorate %176 RelaxedPrecision
98               OpDecorate %177 RelaxedPrecision
99               OpDecorate %180 RelaxedPrecision
100               OpDecorate %181 RelaxedPrecision
101               OpDecorate %182 RelaxedPrecision
102               OpDecorate %190 RelaxedPrecision
103               OpDecorate %191 RelaxedPrecision
104               OpDecorate %193 RelaxedPrecision
105               OpDecorate %194 RelaxedPrecision
106               OpDecorate %197 RelaxedPrecision
107               OpDecorate %198 RelaxedPrecision
108               OpDecorate %200 RelaxedPrecision
109               OpDecorate %201 RelaxedPrecision
110               OpDecorate %204 RelaxedPrecision
111               OpDecorate %205 RelaxedPrecision
112               OpDecorate %207 RelaxedPrecision
113               OpDecorate %208 RelaxedPrecision
114               OpDecorate %209 RelaxedPrecision
115               OpDecorate %217 RelaxedPrecision
116               OpDecorate %219 RelaxedPrecision
117               OpDecorate %221 RelaxedPrecision
118               OpDecorate %223 RelaxedPrecision
119               OpDecorate %225 RelaxedPrecision
120               OpDecorate %226 RelaxedPrecision
121               OpDecorate %228 RelaxedPrecision
122               OpDecorate %229 RelaxedPrecision
123               OpDecorate %230 RelaxedPrecision
124               OpDecorate %240 RelaxedPrecision
125               OpDecorate %243 RelaxedPrecision
126               OpDecorate %244 RelaxedPrecision
127      %float = OpTypeFloat 32
128    %v4float = OpTypeVector %float 4
129%_ptr_Output_v4float = OpTypePointer Output %v4float
130%sk_FragColor = OpVariable %_ptr_Output_v4float Output
131%_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %v4float %v4float
132%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
133          %7 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
134       %void = OpTypeVoid
135         %12 = OpTypeFunction %void
136    %float_0 = OpConstant %float 0
137    %v2float = OpTypeVector %float 2
138         %16 = OpConstantComposite %v2float %float_0 %float_0
139%_ptr_Function_v2float = OpTypePointer Function %v2float
140         %20 = OpTypeFunction %v4float %_ptr_Function_v2float
141       %bool = OpTypeBool
142     %v4bool = OpTypeVector %bool 4
143%_ptr_Function_v4bool = OpTypePointer Function %v4bool
144%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
145        %int = OpTypeInt 32 1
146      %int_0 = OpConstant %int 0
147      %false = OpConstantFalse %bool
148      %int_2 = OpConstant %int 2
149      %int_3 = OpConstant %int 3
150     %v2bool = OpTypeVector %bool 2
151    %float_1 = OpConstant %float 1
152    %v3float = OpTypeVector %float 3
153     %v3bool = OpTypeVector %bool 3
154      %int_4 = OpConstant %int 4
155%_ptr_Function_v4float = OpTypePointer Function %v4float
156      %int_1 = OpConstant %int 1
157%_entrypoint_v = OpFunction %void None %12
158         %13 = OpLabel
159         %17 = OpVariable %_ptr_Function_v2float Function
160               OpStore %17 %16
161         %19 = OpFunctionCall %v4float %main %17
162               OpStore %sk_FragColor %19
163               OpReturn
164               OpFunctionEnd
165       %main = OpFunction %v4float None %20
166         %21 = OpFunctionParameter %_ptr_Function_v2float
167         %22 = OpLabel
168       %FTFT = OpVariable %_ptr_Function_v4bool Function
169       %TFTF = OpVariable %_ptr_Function_v4bool Function
170        %234 = OpVariable %_ptr_Function_v4float Function
171         %27 = OpAccessChain %_ptr_Uniform_v4float %7 %int_0
172         %31 = OpLoad %v4float %27
173         %32 = OpCompositeExtract %float %31 0
174         %33 = OpFUnordNotEqual %bool %32 %float_0
175         %34 = OpCompositeExtract %float %31 1
176         %35 = OpFUnordNotEqual %bool %34 %float_0
177         %36 = OpCompositeExtract %float %31 2
178         %37 = OpFUnordNotEqual %bool %36 %float_0
179         %38 = OpCompositeExtract %float %31 3
180         %39 = OpFUnordNotEqual %bool %38 %float_0
181         %40 = OpCompositeConstruct %v4bool %33 %35 %37 %39
182               OpStore %FTFT %40
183         %42 = OpVectorShuffle %v4bool %40 %40 3 2 1 0
184               OpStore %TFTF %42
185         %45 = OpAccessChain %_ptr_Uniform_v4float %7 %int_2
186         %47 = OpLoad %v4float %45
187         %48 = OpCompositeExtract %float %47 0
188         %49 = OpAccessChain %_ptr_Uniform_v4float %7 %int_3
189         %51 = OpLoad %v4float %49
190         %52 = OpCompositeExtract %float %51 0
191         %53 = OpCompositeExtract %bool %40 0
192         %54 = OpAccessChain %_ptr_Uniform_v4float %7 %int_2
193         %55 = OpLoad %v4float %54
194         %56 = OpCompositeExtract %float %55 0
195         %57 = OpAccessChain %_ptr_Uniform_v4float %7 %int_3
196         %58 = OpLoad %v4float %57
197         %59 = OpCompositeExtract %float %58 0
198         %44 = OpSelect %float %53 %59 %56
199         %60 = OpAccessChain %_ptr_Uniform_v4float %7 %int_2
200         %61 = OpLoad %v4float %60
201         %62 = OpCompositeExtract %float %61 0
202         %63 = OpFOrdEqual %bool %44 %62
203               OpSelectionMerge %65 None
204               OpBranchConditional %63 %64 %65
205         %64 = OpLabel
206         %67 = OpAccessChain %_ptr_Uniform_v4float %7 %int_2
207         %68 = OpLoad %v4float %67
208         %69 = OpVectorShuffle %v2float %68 %68 0 1
209         %70 = OpAccessChain %_ptr_Uniform_v4float %7 %int_3
210         %71 = OpLoad %v4float %70
211         %72 = OpVectorShuffle %v2float %71 %71 0 1
212         %73 = OpVectorShuffle %v2bool %40 %40 0 1
213         %75 = OpAccessChain %_ptr_Uniform_v4float %7 %int_2
214         %76 = OpLoad %v4float %75
215         %77 = OpVectorShuffle %v2float %76 %76 0 1
216         %78 = OpAccessChain %_ptr_Uniform_v4float %7 %int_3
217         %79 = OpLoad %v4float %78
218         %80 = OpVectorShuffle %v2float %79 %79 0 1
219         %81 = OpVectorShuffle %v2bool %40 %40 0 1
220         %66 = OpSelect %v2float %81 %80 %77
221         %82 = OpAccessChain %_ptr_Uniform_v4float %7 %int_2
222         %83 = OpLoad %v4float %82
223         %84 = OpCompositeExtract %float %83 0
224         %86 = OpCompositeConstruct %v2float %84 %float_1
225         %87 = OpFOrdEqual %v2bool %66 %86
226         %88 = OpAll %bool %87
227               OpBranch %65
228         %65 = OpLabel
229         %89 = OpPhi %bool %false %22 %88 %64
230               OpSelectionMerge %91 None
231               OpBranchConditional %89 %90 %91
232         %90 = OpLabel
233         %93 = OpAccessChain %_ptr_Uniform_v4float %7 %int_2
234         %94 = OpLoad %v4float %93
235         %95 = OpVectorShuffle %v3float %94 %94 0 1 2
236         %97 = OpAccessChain %_ptr_Uniform_v4float %7 %int_3
237         %98 = OpLoad %v4float %97
238         %99 = OpVectorShuffle %v3float %98 %98 0 1 2
239        %100 = OpVectorShuffle %v3bool %40 %40 0 1 2
240        %102 = OpAccessChain %_ptr_Uniform_v4float %7 %int_2
241        %103 = OpLoad %v4float %102
242        %104 = OpVectorShuffle %v3float %103 %103 0 1 2
243        %105 = OpAccessChain %_ptr_Uniform_v4float %7 %int_3
244        %106 = OpLoad %v4float %105
245        %107 = OpVectorShuffle %v3float %106 %106 0 1 2
246        %108 = OpVectorShuffle %v3bool %40 %40 0 1 2
247         %92 = OpSelect %v3float %108 %107 %104
248        %109 = OpAccessChain %_ptr_Uniform_v4float %7 %int_2
249        %110 = OpLoad %v4float %109
250        %111 = OpCompositeExtract %float %110 0
251        %112 = OpAccessChain %_ptr_Uniform_v4float %7 %int_2
252        %113 = OpLoad %v4float %112
253        %114 = OpCompositeExtract %float %113 2
254        %115 = OpCompositeConstruct %v3float %111 %float_1 %114
255        %116 = OpFOrdEqual %v3bool %92 %115
256        %117 = OpAll %bool %116
257               OpBranch %91
258         %91 = OpLabel
259        %118 = OpPhi %bool %false %65 %117 %90
260               OpSelectionMerge %120 None
261               OpBranchConditional %118 %119 %120
262        %119 = OpLabel
263        %122 = OpAccessChain %_ptr_Uniform_v4float %7 %int_2
264        %123 = OpLoad %v4float %122
265        %124 = OpAccessChain %_ptr_Uniform_v4float %7 %int_3
266        %125 = OpLoad %v4float %124
267        %126 = OpAccessChain %_ptr_Uniform_v4float %7 %int_2
268        %127 = OpLoad %v4float %126
269        %128 = OpAccessChain %_ptr_Uniform_v4float %7 %int_3
270        %129 = OpLoad %v4float %128
271        %121 = OpSelect %v4float %40 %129 %127
272        %130 = OpAccessChain %_ptr_Uniform_v4float %7 %int_2
273        %131 = OpLoad %v4float %130
274        %132 = OpCompositeExtract %float %131 0
275        %133 = OpAccessChain %_ptr_Uniform_v4float %7 %int_2
276        %134 = OpLoad %v4float %133
277        %135 = OpCompositeExtract %float %134 2
278        %136 = OpCompositeConstruct %v4float %132 %float_1 %135 %float_1
279        %137 = OpFOrdEqual %v4bool %121 %136
280        %138 = OpAll %bool %137
281               OpBranch %120
282        %120 = OpLabel
283        %139 = OpPhi %bool %false %91 %138 %119
284               OpSelectionMerge %141 None
285               OpBranchConditional %139 %140 %141
286        %140 = OpLabel
287        %143 = OpAccessChain %_ptr_Uniform_v4float %7 %int_3
288        %144 = OpLoad %v4float %143
289        %145 = OpCompositeExtract %float %144 0
290        %146 = OpAccessChain %_ptr_Uniform_v4float %7 %int_4
291        %148 = OpLoad %v4float %146
292        %149 = OpCompositeExtract %float %148 0
293        %150 = OpCompositeExtract %bool %42 0
294        %151 = OpAccessChain %_ptr_Uniform_v4float %7 %int_3
295        %152 = OpLoad %v4float %151
296        %153 = OpCompositeExtract %float %152 0
297        %154 = OpAccessChain %_ptr_Uniform_v4float %7 %int_4
298        %155 = OpLoad %v4float %154
299        %156 = OpCompositeExtract %float %155 0
300        %142 = OpSelect %float %150 %156 %153
301        %157 = OpAccessChain %_ptr_Uniform_v4float %7 %int_4
302        %158 = OpLoad %v4float %157
303        %159 = OpCompositeExtract %float %158 0
304        %160 = OpFOrdEqual %bool %142 %159
305               OpBranch %141
306        %141 = OpLabel
307        %161 = OpPhi %bool %false %120 %160 %140
308               OpSelectionMerge %163 None
309               OpBranchConditional %161 %162 %163
310        %162 = OpLabel
311        %165 = OpAccessChain %_ptr_Uniform_v4float %7 %int_3
312        %166 = OpLoad %v4float %165
313        %167 = OpVectorShuffle %v2float %166 %166 0 1
314        %168 = OpAccessChain %_ptr_Uniform_v4float %7 %int_4
315        %169 = OpLoad %v4float %168
316        %170 = OpVectorShuffle %v2float %169 %169 0 1
317        %171 = OpVectorShuffle %v2bool %42 %42 0 1
318        %172 = OpAccessChain %_ptr_Uniform_v4float %7 %int_3
319        %173 = OpLoad %v4float %172
320        %174 = OpVectorShuffle %v2float %173 %173 0 1
321        %175 = OpAccessChain %_ptr_Uniform_v4float %7 %int_4
322        %176 = OpLoad %v4float %175
323        %177 = OpVectorShuffle %v2float %176 %176 0 1
324        %178 = OpVectorShuffle %v2bool %42 %42 0 1
325        %164 = OpSelect %v2float %178 %177 %174
326        %179 = OpAccessChain %_ptr_Uniform_v4float %7 %int_4
327        %180 = OpLoad %v4float %179
328        %181 = OpCompositeExtract %float %180 0
329        %182 = OpCompositeConstruct %v2float %181 %float_1
330        %183 = OpFOrdEqual %v2bool %164 %182
331        %184 = OpAll %bool %183
332               OpBranch %163
333        %163 = OpLabel
334        %185 = OpPhi %bool %false %141 %184 %162
335               OpSelectionMerge %187 None
336               OpBranchConditional %185 %186 %187
337        %186 = OpLabel
338        %189 = OpAccessChain %_ptr_Uniform_v4float %7 %int_3
339        %190 = OpLoad %v4float %189
340        %191 = OpVectorShuffle %v3float %190 %190 0 1 2
341        %192 = OpAccessChain %_ptr_Uniform_v4float %7 %int_4
342        %193 = OpLoad %v4float %192
343        %194 = OpVectorShuffle %v3float %193 %193 0 1 2
344        %195 = OpVectorShuffle %v3bool %42 %42 0 1 2
345        %196 = OpAccessChain %_ptr_Uniform_v4float %7 %int_3
346        %197 = OpLoad %v4float %196
347        %198 = OpVectorShuffle %v3float %197 %197 0 1 2
348        %199 = OpAccessChain %_ptr_Uniform_v4float %7 %int_4
349        %200 = OpLoad %v4float %199
350        %201 = OpVectorShuffle %v3float %200 %200 0 1 2
351        %202 = OpVectorShuffle %v3bool %42 %42 0 1 2
352        %188 = OpSelect %v3float %202 %201 %198
353        %203 = OpAccessChain %_ptr_Uniform_v4float %7 %int_4
354        %204 = OpLoad %v4float %203
355        %205 = OpCompositeExtract %float %204 0
356        %206 = OpAccessChain %_ptr_Uniform_v4float %7 %int_4
357        %207 = OpLoad %v4float %206
358        %208 = OpCompositeExtract %float %207 2
359        %209 = OpCompositeConstruct %v3float %205 %float_1 %208
360        %210 = OpFOrdEqual %v3bool %188 %209
361        %211 = OpAll %bool %210
362               OpBranch %187
363        %187 = OpLabel
364        %212 = OpPhi %bool %false %163 %211 %186
365               OpSelectionMerge %214 None
366               OpBranchConditional %212 %213 %214
367        %213 = OpLabel
368        %216 = OpAccessChain %_ptr_Uniform_v4float %7 %int_3
369        %217 = OpLoad %v4float %216
370        %218 = OpAccessChain %_ptr_Uniform_v4float %7 %int_4
371        %219 = OpLoad %v4float %218
372        %220 = OpAccessChain %_ptr_Uniform_v4float %7 %int_3
373        %221 = OpLoad %v4float %220
374        %222 = OpAccessChain %_ptr_Uniform_v4float %7 %int_4
375        %223 = OpLoad %v4float %222
376        %215 = OpSelect %v4float %42 %223 %221
377        %224 = OpAccessChain %_ptr_Uniform_v4float %7 %int_4
378        %225 = OpLoad %v4float %224
379        %226 = OpCompositeExtract %float %225 0
380        %227 = OpAccessChain %_ptr_Uniform_v4float %7 %int_4
381        %228 = OpLoad %v4float %227
382        %229 = OpCompositeExtract %float %228 2
383        %230 = OpCompositeConstruct %v4float %226 %float_1 %229 %float_1
384        %231 = OpFOrdEqual %v4bool %215 %230
385        %232 = OpAll %bool %231
386               OpBranch %214
387        %214 = OpLabel
388        %233 = OpPhi %bool %false %187 %232 %213
389               OpSelectionMerge %238 None
390               OpBranchConditional %233 %236 %237
391        %236 = OpLabel
392        %239 = OpAccessChain %_ptr_Uniform_v4float %7 %int_0
393        %240 = OpLoad %v4float %239
394               OpStore %234 %240
395               OpBranch %238
396        %237 = OpLabel
397        %241 = OpAccessChain %_ptr_Uniform_v4float %7 %int_1
398        %243 = OpLoad %v4float %241
399               OpStore %234 %243
400               OpBranch %238
401        %238 = OpLabel
402        %244 = OpLoad %v4float %234
403               OpReturnValue %244
404               OpFunctionEnd
405