xref: /aosp_15_r20/external/skia/tests/sksl/shared/VectorConstructors.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 "unknownInput"
11               OpName %_entrypoint_v "_entrypoint_v"
12               OpName %check_bf2f2f2f3i2i2f2f2f4i2b4f2f2f2b2b2b3i4 "check_bf2f2f2f3i2i2f2f2f4i2b4f2f2f2b2b2b3i4"
13               OpName %main "main"
14               OpName %v1 "v1"
15               OpName %v2 "v2"
16               OpName %v3 "v3"
17               OpName %v4 "v4"
18               OpName %v5 "v5"
19               OpName %v6 "v6"
20               OpName %v7 "v7"
21               OpName %v8 "v8"
22               OpName %v9 "v9"
23               OpName %v10 "v10"
24               OpName %v11 "v11"
25               OpName %v12 "v12"
26               OpName %v13 "v13"
27               OpName %v14 "v14"
28               OpName %v15 "v15"
29               OpName %v16 "v16"
30               OpName %v17 "v17"
31               OpName %v18 "v18"
32               OpDecorate %sk_FragColor RelaxedPrecision
33               OpDecorate %sk_FragColor Location 0
34               OpDecorate %sk_FragColor Index 0
35               OpMemberDecorate %_UniformBuffer 0 Offset 0
36               OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
37               OpMemberDecorate %_UniformBuffer 1 Offset 16
38               OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
39               OpMemberDecorate %_UniformBuffer 2 Offset 32
40               OpDecorate %_UniformBuffer Block
41               OpDecorate %8 Binding 0
42               OpDecorate %8 DescriptorSet 0
43               OpDecorate %60 RelaxedPrecision
44               OpDecorate %63 RelaxedPrecision
45               OpDecorate %66 RelaxedPrecision
46               OpDecorate %69 RelaxedPrecision
47               OpDecorate %70 RelaxedPrecision
48               OpDecorate %73 RelaxedPrecision
49               OpDecorate %74 RelaxedPrecision
50               OpDecorate %77 RelaxedPrecision
51               OpDecorate %80 RelaxedPrecision
52               OpDecorate %83 RelaxedPrecision
53               OpDecorate %86 RelaxedPrecision
54               OpDecorate %87 RelaxedPrecision
55               OpDecorate %88 RelaxedPrecision
56               OpDecorate %90 RelaxedPrecision
57               OpDecorate %92 RelaxedPrecision
58               OpDecorate %95 RelaxedPrecision
59               OpDecorate %98 RelaxedPrecision
60               OpDecorate %101 RelaxedPrecision
61               OpDecorate %102 RelaxedPrecision
62               OpDecorate %104 RelaxedPrecision
63               OpDecorate %105 RelaxedPrecision
64               OpDecorate %106 RelaxedPrecision
65               OpDecorate %108 RelaxedPrecision
66               OpDecorate %109 RelaxedPrecision
67               OpDecorate %110 RelaxedPrecision
68               OpDecorate %112 RelaxedPrecision
69               OpDecorate %113 RelaxedPrecision
70               OpDecorate %116 RelaxedPrecision
71               OpDecorate %117 RelaxedPrecision
72               OpDecorate %195 RelaxedPrecision
73               OpDecorate %197 RelaxedPrecision
74               OpDecorate %198 RelaxedPrecision
75      %float = OpTypeFloat 32
76    %v4float = OpTypeVector %float 4
77%_ptr_Output_v4float = OpTypePointer Output %v4float
78%sk_FragColor = OpVariable %_ptr_Output_v4float Output
79%_UniformBuffer = OpTypeStruct %v4float %v4float %float
80%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
81          %8 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
82       %void = OpTypeVoid
83         %13 = OpTypeFunction %void
84    %float_0 = OpConstant %float 0
85    %v2float = OpTypeVector %float 2
86         %17 = OpConstantComposite %v2float %float_0 %float_0
87%_ptr_Function_v2float = OpTypePointer Function %v2float
88       %bool = OpTypeBool
89    %v3float = OpTypeVector %float 3
90%_ptr_Function_v3float = OpTypePointer Function %v3float
91        %int = OpTypeInt 32 1
92      %v2int = OpTypeVector %int 2
93%_ptr_Function_v2int = OpTypePointer Function %v2int
94%_ptr_Function_v4float = OpTypePointer Function %v4float
95     %v4bool = OpTypeVector %bool 4
96%_ptr_Function_v4bool = OpTypePointer Function %v4bool
97     %v2bool = OpTypeVector %bool 2
98%_ptr_Function_v2bool = OpTypePointer Function %v2bool
99     %v3bool = OpTypeVector %bool 3
100%_ptr_Function_v3bool = OpTypePointer Function %v3bool
101      %v4int = OpTypeVector %int 4
102%_ptr_Function_v4int = OpTypePointer Function %v4int
103         %36 = OpTypeFunction %bool %_ptr_Function_v2float %_ptr_Function_v2float %_ptr_Function_v2float %_ptr_Function_v3float %_ptr_Function_v2int %_ptr_Function_v2int %_ptr_Function_v2float %_ptr_Function_v2float %_ptr_Function_v4float %_ptr_Function_v2int %_ptr_Function_v4bool %_ptr_Function_v2float %_ptr_Function_v2float %_ptr_Function_v2float %_ptr_Function_v2bool %_ptr_Function_v2bool %_ptr_Function_v3bool %_ptr_Function_v4int
104    %float_1 = OpConstant %float 1
105   %float_18 = OpConstant %float 18
106        %120 = OpTypeFunction %v4float %_ptr_Function_v2float
107        %124 = OpConstantComposite %v2float %float_1 %float_1
108    %float_2 = OpConstant %float 2
109        %127 = OpConstantComposite %v2float %float_1 %float_2
110        %130 = OpConstantComposite %v3float %float_1 %float_1 %float_1
111      %int_1 = OpConstant %int 1
112        %133 = OpConstantComposite %v2int %int_1 %int_1
113      %int_2 = OpConstant %int 2
114        %136 = OpConstantComposite %v2int %int_1 %int_2
115%_ptr_Uniform_float = OpTypePointer Uniform %float
116    %float_3 = OpConstant %float 3
117    %float_4 = OpConstant %float 4
118      %int_3 = OpConstant %int 3
119       %true = OpConstantTrue %bool
120      %false = OpConstantFalse %bool
121        %157 = OpConstantComposite %v4bool %true %false %true %false
122        %159 = OpConstantComposite %v2float %float_1 %float_0
123        %163 = OpConstantComposite %v2bool %true %true
124        %166 = OpConstantComposite %v3bool %true %true %true
125        %168 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
126%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
127      %int_0 = OpConstant %int 0
128%_entrypoint_v = OpFunction %void None %13
129         %14 = OpLabel
130         %18 = OpVariable %_ptr_Function_v2float Function
131               OpStore %18 %17
132         %20 = OpFunctionCall %v4float %main %18
133               OpStore %sk_FragColor %20
134               OpReturn
135               OpFunctionEnd
136%check_bf2f2f2f3i2i2f2f2f4i2b4f2f2f2b2b2b3i4 = OpFunction %bool None %36
137         %37 = OpFunctionParameter %_ptr_Function_v2float
138         %38 = OpFunctionParameter %_ptr_Function_v2float
139         %39 = OpFunctionParameter %_ptr_Function_v2float
140         %40 = OpFunctionParameter %_ptr_Function_v3float
141         %41 = OpFunctionParameter %_ptr_Function_v2int
142         %42 = OpFunctionParameter %_ptr_Function_v2int
143         %43 = OpFunctionParameter %_ptr_Function_v2float
144         %44 = OpFunctionParameter %_ptr_Function_v2float
145         %45 = OpFunctionParameter %_ptr_Function_v4float
146         %46 = OpFunctionParameter %_ptr_Function_v2int
147         %47 = OpFunctionParameter %_ptr_Function_v4bool
148         %48 = OpFunctionParameter %_ptr_Function_v2float
149         %49 = OpFunctionParameter %_ptr_Function_v2float
150         %50 = OpFunctionParameter %_ptr_Function_v2float
151         %51 = OpFunctionParameter %_ptr_Function_v2bool
152         %52 = OpFunctionParameter %_ptr_Function_v2bool
153         %53 = OpFunctionParameter %_ptr_Function_v3bool
154         %54 = OpFunctionParameter %_ptr_Function_v4int
155         %55 = OpLabel
156         %56 = OpLoad %v2float %37
157         %57 = OpCompositeExtract %float %56 0
158         %58 = OpLoad %v2float %38
159         %59 = OpCompositeExtract %float %58 0
160         %60 = OpFAdd %float %57 %59
161         %61 = OpLoad %v2float %39
162         %62 = OpCompositeExtract %float %61 0
163         %63 = OpFAdd %float %60 %62
164         %64 = OpLoad %v3float %40
165         %65 = OpCompositeExtract %float %64 0
166         %66 = OpFAdd %float %63 %65
167         %67 = OpLoad %v2int %41
168         %68 = OpCompositeExtract %int %67 0
169         %69 = OpConvertSToF %float %68
170         %70 = OpFAdd %float %66 %69
171         %71 = OpLoad %v2int %42
172         %72 = OpCompositeExtract %int %71 0
173         %73 = OpConvertSToF %float %72
174         %74 = OpFAdd %float %70 %73
175         %75 = OpLoad %v2float %43
176         %76 = OpCompositeExtract %float %75 0
177         %77 = OpFAdd %float %74 %76
178         %78 = OpLoad %v2float %44
179         %79 = OpCompositeExtract %float %78 0
180         %80 = OpFAdd %float %77 %79
181         %81 = OpLoad %v4float %45
182         %82 = OpCompositeExtract %float %81 0
183         %83 = OpFAdd %float %80 %82
184         %84 = OpLoad %v2int %46
185         %85 = OpCompositeExtract %int %84 0
186         %86 = OpConvertSToF %float %85
187         %87 = OpFAdd %float %83 %86
188         %88 = OpLoad %v4bool %47
189         %89 = OpCompositeExtract %bool %88 0
190         %90 = OpSelect %float %89 %float_1 %float_0
191         %92 = OpFAdd %float %87 %90
192         %93 = OpLoad %v2float %48
193         %94 = OpCompositeExtract %float %93 0
194         %95 = OpFAdd %float %92 %94
195         %96 = OpLoad %v2float %49
196         %97 = OpCompositeExtract %float %96 0
197         %98 = OpFAdd %float %95 %97
198         %99 = OpLoad %v2float %50
199        %100 = OpCompositeExtract %float %99 0
200        %101 = OpFAdd %float %98 %100
201        %102 = OpLoad %v2bool %51
202        %103 = OpCompositeExtract %bool %102 0
203        %104 = OpSelect %float %103 %float_1 %float_0
204        %105 = OpFAdd %float %101 %104
205        %106 = OpLoad %v2bool %52
206        %107 = OpCompositeExtract %bool %106 0
207        %108 = OpSelect %float %107 %float_1 %float_0
208        %109 = OpFAdd %float %105 %108
209        %110 = OpLoad %v3bool %53
210        %111 = OpCompositeExtract %bool %110 0
211        %112 = OpSelect %float %111 %float_1 %float_0
212        %113 = OpFAdd %float %109 %112
213        %114 = OpLoad %v4int %54
214        %115 = OpCompositeExtract %int %114 0
215        %116 = OpConvertSToF %float %115
216        %117 = OpFAdd %float %113 %116
217        %119 = OpFOrdEqual %bool %117 %float_18
218               OpReturnValue %119
219               OpFunctionEnd
220       %main = OpFunction %v4float None %120
221        %121 = OpFunctionParameter %_ptr_Function_v2float
222        %122 = OpLabel
223         %v1 = OpVariable %_ptr_Function_v2float Function
224         %v2 = OpVariable %_ptr_Function_v2float Function
225         %v3 = OpVariable %_ptr_Function_v2float Function
226         %v4 = OpVariable %_ptr_Function_v3float Function
227         %v5 = OpVariable %_ptr_Function_v2int Function
228         %v6 = OpVariable %_ptr_Function_v2int Function
229         %v7 = OpVariable %_ptr_Function_v2float Function
230         %v8 = OpVariable %_ptr_Function_v2float Function
231         %v9 = OpVariable %_ptr_Function_v4float Function
232        %v10 = OpVariable %_ptr_Function_v2int Function
233        %v11 = OpVariable %_ptr_Function_v4bool Function
234        %v12 = OpVariable %_ptr_Function_v2float Function
235        %v13 = OpVariable %_ptr_Function_v2float Function
236        %v14 = OpVariable %_ptr_Function_v2float Function
237        %v15 = OpVariable %_ptr_Function_v2bool Function
238        %v16 = OpVariable %_ptr_Function_v2bool Function
239        %v17 = OpVariable %_ptr_Function_v3bool Function
240        %v18 = OpVariable %_ptr_Function_v4int Function
241        %169 = OpVariable %_ptr_Function_v2float Function
242        %170 = OpVariable %_ptr_Function_v2float Function
243        %171 = OpVariable %_ptr_Function_v2float Function
244        %172 = OpVariable %_ptr_Function_v3float Function
245        %173 = OpVariable %_ptr_Function_v2int Function
246        %174 = OpVariable %_ptr_Function_v2int Function
247        %175 = OpVariable %_ptr_Function_v2float Function
248        %176 = OpVariable %_ptr_Function_v2float Function
249        %177 = OpVariable %_ptr_Function_v4float Function
250        %178 = OpVariable %_ptr_Function_v2int Function
251        %179 = OpVariable %_ptr_Function_v4bool Function
252        %180 = OpVariable %_ptr_Function_v2float Function
253        %181 = OpVariable %_ptr_Function_v2float Function
254        %182 = OpVariable %_ptr_Function_v2float Function
255        %183 = OpVariable %_ptr_Function_v2bool Function
256        %184 = OpVariable %_ptr_Function_v2bool Function
257        %185 = OpVariable %_ptr_Function_v3bool Function
258        %186 = OpVariable %_ptr_Function_v4int Function
259        %188 = OpVariable %_ptr_Function_v4float Function
260               OpStore %v1 %124
261               OpStore %v2 %127
262               OpStore %v3 %124
263               OpStore %v4 %130
264               OpStore %v5 %133
265               OpStore %v6 %136
266               OpStore %v7 %127
267        %139 = OpConvertSToF %float %int_1
268        %140 = OpConvertSToF %float %int_1
269        %141 = OpCompositeConstruct %v2float %139 %140
270               OpStore %v8 %141
271        %143 = OpConvertSToF %float %int_1
272        %144 = OpAccessChain %_ptr_Uniform_float %8 %int_2
273        %146 = OpLoad %float %144
274        %149 = OpCompositeConstruct %v4float %143 %146 %float_3 %float_4
275               OpStore %v9 %149
276        %152 = OpConvertFToS %int %float_1
277        %153 = OpCompositeConstruct %v2int %int_3 %152
278               OpStore %v10 %153
279               OpStore %v11 %157
280               OpStore %v12 %159
281               OpStore %v13 %17
282               OpStore %v14 %17
283               OpStore %v15 %163
284               OpStore %v16 %163
285               OpStore %v17 %166
286               OpStore %v18 %168
287               OpStore %169 %124
288               OpStore %170 %127
289               OpStore %171 %124
290               OpStore %172 %130
291               OpStore %173 %133
292               OpStore %174 %136
293               OpStore %175 %127
294               OpStore %176 %141
295               OpStore %177 %149
296               OpStore %178 %153
297               OpStore %179 %157
298               OpStore %180 %159
299               OpStore %181 %17
300               OpStore %182 %17
301               OpStore %183 %163
302               OpStore %184 %163
303               OpStore %185 %166
304               OpStore %186 %168
305        %187 = OpFunctionCall %bool %check_bf2f2f2f3i2i2f2f2f4i2b4f2f2f2b2b2b3i4 %169 %170 %171 %172 %173 %174 %175 %176 %177 %178 %179 %180 %181 %182 %183 %184 %185 %186
306               OpSelectionMerge %191 None
307               OpBranchConditional %187 %189 %190
308        %189 = OpLabel
309        %192 = OpAccessChain %_ptr_Uniform_v4float %8 %int_0
310        %195 = OpLoad %v4float %192
311               OpStore %188 %195
312               OpBranch %191
313        %190 = OpLabel
314        %196 = OpAccessChain %_ptr_Uniform_v4float %8 %int_1
315        %197 = OpLoad %v4float %196
316               OpStore %188 %197
317               OpBranch %191
318        %191 = OpLabel
319        %198 = OpLoad %v4float %188
320               OpReturnValue %198
321               OpFunctionEnd
322