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