• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* Copyright (C) 2015 Broadcom
2  *
3  * Permission is hereby granted, free of charge, to any person obtaining a
4  * copy of this software and associated documentation files (the "Software"),
5  * to deal in the Software without restriction, including without limitation
6  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
7  * and/or sell copies of the Software, and to permit persons to whom the
8  * Software is furnished to do so, subject to the following conditions:
9  *
10  * The above copyright notice and this permission notice (including the next
11  * paragraph) shall be included in all copies or substantial portions of the
12  * Software.
13  *
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
17  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
20  * IN THE SOFTWARE.
21  */
22 
23 #ifndef _NIR_BUILDER_OPCODES_
24 #define _NIR_BUILDER_OPCODES_
25 
26 
27 
28 static inline nir_ssa_def *
nir_b2f(nir_builder * build,nir_ssa_def * src0)29 nir_b2f(nir_builder *build, nir_ssa_def *src0)
30 {
31    return nir_build_alu(build, nir_op_b2f, src0, NULL, NULL, NULL);
32 }
33 static inline nir_ssa_def *
nir_b2i(nir_builder * build,nir_ssa_def * src0)34 nir_b2i(nir_builder *build, nir_ssa_def *src0)
35 {
36    return nir_build_alu(build, nir_op_b2i, src0, NULL, NULL, NULL);
37 }
38 static inline nir_ssa_def *
nir_ball_fequal2(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)39 nir_ball_fequal2(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
40 {
41    return nir_build_alu(build, nir_op_ball_fequal2, src0, src1, NULL, NULL);
42 }
43 static inline nir_ssa_def *
nir_ball_fequal3(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)44 nir_ball_fequal3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
45 {
46    return nir_build_alu(build, nir_op_ball_fequal3, src0, src1, NULL, NULL);
47 }
48 static inline nir_ssa_def *
nir_ball_fequal4(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)49 nir_ball_fequal4(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
50 {
51    return nir_build_alu(build, nir_op_ball_fequal4, src0, src1, NULL, NULL);
52 }
53 static inline nir_ssa_def *
nir_ball_iequal2(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)54 nir_ball_iequal2(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
55 {
56    return nir_build_alu(build, nir_op_ball_iequal2, src0, src1, NULL, NULL);
57 }
58 static inline nir_ssa_def *
nir_ball_iequal3(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)59 nir_ball_iequal3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
60 {
61    return nir_build_alu(build, nir_op_ball_iequal3, src0, src1, NULL, NULL);
62 }
63 static inline nir_ssa_def *
nir_ball_iequal4(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)64 nir_ball_iequal4(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
65 {
66    return nir_build_alu(build, nir_op_ball_iequal4, src0, src1, NULL, NULL);
67 }
68 static inline nir_ssa_def *
nir_bany_fnequal2(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)69 nir_bany_fnequal2(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
70 {
71    return nir_build_alu(build, nir_op_bany_fnequal2, src0, src1, NULL, NULL);
72 }
73 static inline nir_ssa_def *
nir_bany_fnequal3(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)74 nir_bany_fnequal3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
75 {
76    return nir_build_alu(build, nir_op_bany_fnequal3, src0, src1, NULL, NULL);
77 }
78 static inline nir_ssa_def *
nir_bany_fnequal4(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)79 nir_bany_fnequal4(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
80 {
81    return nir_build_alu(build, nir_op_bany_fnequal4, src0, src1, NULL, NULL);
82 }
83 static inline nir_ssa_def *
nir_bany_inequal2(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)84 nir_bany_inequal2(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
85 {
86    return nir_build_alu(build, nir_op_bany_inequal2, src0, src1, NULL, NULL);
87 }
88 static inline nir_ssa_def *
nir_bany_inequal3(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)89 nir_bany_inequal3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
90 {
91    return nir_build_alu(build, nir_op_bany_inequal3, src0, src1, NULL, NULL);
92 }
93 static inline nir_ssa_def *
nir_bany_inequal4(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)94 nir_bany_inequal4(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
95 {
96    return nir_build_alu(build, nir_op_bany_inequal4, src0, src1, NULL, NULL);
97 }
98 static inline nir_ssa_def *
nir_bcsel(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1,nir_ssa_def * src2)99 nir_bcsel(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
100 {
101    return nir_build_alu(build, nir_op_bcsel, src0, src1, src2, NULL);
102 }
103 static inline nir_ssa_def *
nir_bfi(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1,nir_ssa_def * src2)104 nir_bfi(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
105 {
106    return nir_build_alu(build, nir_op_bfi, src0, src1, src2, NULL);
107 }
108 static inline nir_ssa_def *
nir_bfm(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)109 nir_bfm(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
110 {
111    return nir_build_alu(build, nir_op_bfm, src0, src1, NULL, NULL);
112 }
113 static inline nir_ssa_def *
nir_bit_count(nir_builder * build,nir_ssa_def * src0)114 nir_bit_count(nir_builder *build, nir_ssa_def *src0)
115 {
116    return nir_build_alu(build, nir_op_bit_count, src0, NULL, NULL, NULL);
117 }
118 static inline nir_ssa_def *
nir_bitfield_insert(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1,nir_ssa_def * src2,nir_ssa_def * src3)119 nir_bitfield_insert(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2, nir_ssa_def *src3)
120 {
121    return nir_build_alu(build, nir_op_bitfield_insert, src0, src1, src2, src3);
122 }
123 static inline nir_ssa_def *
nir_bitfield_reverse(nir_builder * build,nir_ssa_def * src0)124 nir_bitfield_reverse(nir_builder *build, nir_ssa_def *src0)
125 {
126    return nir_build_alu(build, nir_op_bitfield_reverse, src0, NULL, NULL, NULL);
127 }
128 static inline nir_ssa_def *
nir_extract_i16(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)129 nir_extract_i16(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
130 {
131    return nir_build_alu(build, nir_op_extract_i16, src0, src1, NULL, NULL);
132 }
133 static inline nir_ssa_def *
nir_extract_i8(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)134 nir_extract_i8(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
135 {
136    return nir_build_alu(build, nir_op_extract_i8, src0, src1, NULL, NULL);
137 }
138 static inline nir_ssa_def *
nir_extract_u16(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)139 nir_extract_u16(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
140 {
141    return nir_build_alu(build, nir_op_extract_u16, src0, src1, NULL, NULL);
142 }
143 static inline nir_ssa_def *
nir_extract_u8(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)144 nir_extract_u8(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
145 {
146    return nir_build_alu(build, nir_op_extract_u8, src0, src1, NULL, NULL);
147 }
148 static inline nir_ssa_def *
nir_f2b(nir_builder * build,nir_ssa_def * src0)149 nir_f2b(nir_builder *build, nir_ssa_def *src0)
150 {
151    return nir_build_alu(build, nir_op_f2b, src0, NULL, NULL, NULL);
152 }
153 static inline nir_ssa_def *
nir_f2f16_rtne(nir_builder * build,nir_ssa_def * src0)154 nir_f2f16_rtne(nir_builder *build, nir_ssa_def *src0)
155 {
156    return nir_build_alu(build, nir_op_f2f16_rtne, src0, NULL, NULL, NULL);
157 }
158 static inline nir_ssa_def *
nir_f2f16_rtz(nir_builder * build,nir_ssa_def * src0)159 nir_f2f16_rtz(nir_builder *build, nir_ssa_def *src0)
160 {
161    return nir_build_alu(build, nir_op_f2f16_rtz, src0, NULL, NULL, NULL);
162 }
163 static inline nir_ssa_def *
nir_f2f16_undef(nir_builder * build,nir_ssa_def * src0)164 nir_f2f16_undef(nir_builder *build, nir_ssa_def *src0)
165 {
166    return nir_build_alu(build, nir_op_f2f16_undef, src0, NULL, NULL, NULL);
167 }
168 static inline nir_ssa_def *
nir_f2f32(nir_builder * build,nir_ssa_def * src0)169 nir_f2f32(nir_builder *build, nir_ssa_def *src0)
170 {
171    return nir_build_alu(build, nir_op_f2f32, src0, NULL, NULL, NULL);
172 }
173 static inline nir_ssa_def *
nir_f2f64(nir_builder * build,nir_ssa_def * src0)174 nir_f2f64(nir_builder *build, nir_ssa_def *src0)
175 {
176    return nir_build_alu(build, nir_op_f2f64, src0, NULL, NULL, NULL);
177 }
178 static inline nir_ssa_def *
nir_f2i16(nir_builder * build,nir_ssa_def * src0)179 nir_f2i16(nir_builder *build, nir_ssa_def *src0)
180 {
181    return nir_build_alu(build, nir_op_f2i16, src0, NULL, NULL, NULL);
182 }
183 static inline nir_ssa_def *
nir_f2i32(nir_builder * build,nir_ssa_def * src0)184 nir_f2i32(nir_builder *build, nir_ssa_def *src0)
185 {
186    return nir_build_alu(build, nir_op_f2i32, src0, NULL, NULL, NULL);
187 }
188 static inline nir_ssa_def *
nir_f2i64(nir_builder * build,nir_ssa_def * src0)189 nir_f2i64(nir_builder *build, nir_ssa_def *src0)
190 {
191    return nir_build_alu(build, nir_op_f2i64, src0, NULL, NULL, NULL);
192 }
193 static inline nir_ssa_def *
nir_f2i8(nir_builder * build,nir_ssa_def * src0)194 nir_f2i8(nir_builder *build, nir_ssa_def *src0)
195 {
196    return nir_build_alu(build, nir_op_f2i8, src0, NULL, NULL, NULL);
197 }
198 static inline nir_ssa_def *
nir_f2u16(nir_builder * build,nir_ssa_def * src0)199 nir_f2u16(nir_builder *build, nir_ssa_def *src0)
200 {
201    return nir_build_alu(build, nir_op_f2u16, src0, NULL, NULL, NULL);
202 }
203 static inline nir_ssa_def *
nir_f2u32(nir_builder * build,nir_ssa_def * src0)204 nir_f2u32(nir_builder *build, nir_ssa_def *src0)
205 {
206    return nir_build_alu(build, nir_op_f2u32, src0, NULL, NULL, NULL);
207 }
208 static inline nir_ssa_def *
nir_f2u64(nir_builder * build,nir_ssa_def * src0)209 nir_f2u64(nir_builder *build, nir_ssa_def *src0)
210 {
211    return nir_build_alu(build, nir_op_f2u64, src0, NULL, NULL, NULL);
212 }
213 static inline nir_ssa_def *
nir_f2u8(nir_builder * build,nir_ssa_def * src0)214 nir_f2u8(nir_builder *build, nir_ssa_def *src0)
215 {
216    return nir_build_alu(build, nir_op_f2u8, src0, NULL, NULL, NULL);
217 }
218 static inline nir_ssa_def *
nir_fabs(nir_builder * build,nir_ssa_def * src0)219 nir_fabs(nir_builder *build, nir_ssa_def *src0)
220 {
221    return nir_build_alu(build, nir_op_fabs, src0, NULL, NULL, NULL);
222 }
223 static inline nir_ssa_def *
nir_fadd(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)224 nir_fadd(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
225 {
226    return nir_build_alu(build, nir_op_fadd, src0, src1, NULL, NULL);
227 }
228 static inline nir_ssa_def *
nir_fall_equal2(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)229 nir_fall_equal2(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
230 {
231    return nir_build_alu(build, nir_op_fall_equal2, src0, src1, NULL, NULL);
232 }
233 static inline nir_ssa_def *
nir_fall_equal3(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)234 nir_fall_equal3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
235 {
236    return nir_build_alu(build, nir_op_fall_equal3, src0, src1, NULL, NULL);
237 }
238 static inline nir_ssa_def *
nir_fall_equal4(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)239 nir_fall_equal4(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
240 {
241    return nir_build_alu(build, nir_op_fall_equal4, src0, src1, NULL, NULL);
242 }
243 static inline nir_ssa_def *
nir_fand(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)244 nir_fand(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
245 {
246    return nir_build_alu(build, nir_op_fand, src0, src1, NULL, NULL);
247 }
248 static inline nir_ssa_def *
nir_fany_nequal2(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)249 nir_fany_nequal2(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
250 {
251    return nir_build_alu(build, nir_op_fany_nequal2, src0, src1, NULL, NULL);
252 }
253 static inline nir_ssa_def *
nir_fany_nequal3(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)254 nir_fany_nequal3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
255 {
256    return nir_build_alu(build, nir_op_fany_nequal3, src0, src1, NULL, NULL);
257 }
258 static inline nir_ssa_def *
nir_fany_nequal4(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)259 nir_fany_nequal4(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
260 {
261    return nir_build_alu(build, nir_op_fany_nequal4, src0, src1, NULL, NULL);
262 }
263 static inline nir_ssa_def *
nir_fceil(nir_builder * build,nir_ssa_def * src0)264 nir_fceil(nir_builder *build, nir_ssa_def *src0)
265 {
266    return nir_build_alu(build, nir_op_fceil, src0, NULL, NULL, NULL);
267 }
268 static inline nir_ssa_def *
nir_fcos(nir_builder * build,nir_ssa_def * src0)269 nir_fcos(nir_builder *build, nir_ssa_def *src0)
270 {
271    return nir_build_alu(build, nir_op_fcos, src0, NULL, NULL, NULL);
272 }
273 static inline nir_ssa_def *
nir_fcsel(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1,nir_ssa_def * src2)274 nir_fcsel(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
275 {
276    return nir_build_alu(build, nir_op_fcsel, src0, src1, src2, NULL);
277 }
278 static inline nir_ssa_def *
nir_fddx(nir_builder * build,nir_ssa_def * src0)279 nir_fddx(nir_builder *build, nir_ssa_def *src0)
280 {
281    return nir_build_alu(build, nir_op_fddx, src0, NULL, NULL, NULL);
282 }
283 static inline nir_ssa_def *
nir_fddx_coarse(nir_builder * build,nir_ssa_def * src0)284 nir_fddx_coarse(nir_builder *build, nir_ssa_def *src0)
285 {
286    return nir_build_alu(build, nir_op_fddx_coarse, src0, NULL, NULL, NULL);
287 }
288 static inline nir_ssa_def *
nir_fddx_fine(nir_builder * build,nir_ssa_def * src0)289 nir_fddx_fine(nir_builder *build, nir_ssa_def *src0)
290 {
291    return nir_build_alu(build, nir_op_fddx_fine, src0, NULL, NULL, NULL);
292 }
293 static inline nir_ssa_def *
nir_fddy(nir_builder * build,nir_ssa_def * src0)294 nir_fddy(nir_builder *build, nir_ssa_def *src0)
295 {
296    return nir_build_alu(build, nir_op_fddy, src0, NULL, NULL, NULL);
297 }
298 static inline nir_ssa_def *
nir_fddy_coarse(nir_builder * build,nir_ssa_def * src0)299 nir_fddy_coarse(nir_builder *build, nir_ssa_def *src0)
300 {
301    return nir_build_alu(build, nir_op_fddy_coarse, src0, NULL, NULL, NULL);
302 }
303 static inline nir_ssa_def *
nir_fddy_fine(nir_builder * build,nir_ssa_def * src0)304 nir_fddy_fine(nir_builder *build, nir_ssa_def *src0)
305 {
306    return nir_build_alu(build, nir_op_fddy_fine, src0, NULL, NULL, NULL);
307 }
308 static inline nir_ssa_def *
nir_fdiv(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)309 nir_fdiv(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
310 {
311    return nir_build_alu(build, nir_op_fdiv, src0, src1, NULL, NULL);
312 }
313 static inline nir_ssa_def *
nir_fdot2(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)314 nir_fdot2(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
315 {
316    return nir_build_alu(build, nir_op_fdot2, src0, src1, NULL, NULL);
317 }
318 static inline nir_ssa_def *
nir_fdot3(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)319 nir_fdot3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
320 {
321    return nir_build_alu(build, nir_op_fdot3, src0, src1, NULL, NULL);
322 }
323 static inline nir_ssa_def *
nir_fdot4(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)324 nir_fdot4(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
325 {
326    return nir_build_alu(build, nir_op_fdot4, src0, src1, NULL, NULL);
327 }
328 static inline nir_ssa_def *
nir_fdot_replicated2(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)329 nir_fdot_replicated2(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
330 {
331    return nir_build_alu(build, nir_op_fdot_replicated2, src0, src1, NULL, NULL);
332 }
333 static inline nir_ssa_def *
nir_fdot_replicated3(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)334 nir_fdot_replicated3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
335 {
336    return nir_build_alu(build, nir_op_fdot_replicated3, src0, src1, NULL, NULL);
337 }
338 static inline nir_ssa_def *
nir_fdot_replicated4(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)339 nir_fdot_replicated4(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
340 {
341    return nir_build_alu(build, nir_op_fdot_replicated4, src0, src1, NULL, NULL);
342 }
343 static inline nir_ssa_def *
nir_fdph(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)344 nir_fdph(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
345 {
346    return nir_build_alu(build, nir_op_fdph, src0, src1, NULL, NULL);
347 }
348 static inline nir_ssa_def *
nir_fdph_replicated(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)349 nir_fdph_replicated(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
350 {
351    return nir_build_alu(build, nir_op_fdph_replicated, src0, src1, NULL, NULL);
352 }
353 static inline nir_ssa_def *
nir_feq(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)354 nir_feq(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
355 {
356    return nir_build_alu(build, nir_op_feq, src0, src1, NULL, NULL);
357 }
358 static inline nir_ssa_def *
nir_fexp2(nir_builder * build,nir_ssa_def * src0)359 nir_fexp2(nir_builder *build, nir_ssa_def *src0)
360 {
361    return nir_build_alu(build, nir_op_fexp2, src0, NULL, NULL, NULL);
362 }
363 static inline nir_ssa_def *
nir_ffloor(nir_builder * build,nir_ssa_def * src0)364 nir_ffloor(nir_builder *build, nir_ssa_def *src0)
365 {
366    return nir_build_alu(build, nir_op_ffloor, src0, NULL, NULL, NULL);
367 }
368 static inline nir_ssa_def *
nir_ffma(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1,nir_ssa_def * src2)369 nir_ffma(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
370 {
371    return nir_build_alu(build, nir_op_ffma, src0, src1, src2, NULL);
372 }
373 static inline nir_ssa_def *
nir_ffract(nir_builder * build,nir_ssa_def * src0)374 nir_ffract(nir_builder *build, nir_ssa_def *src0)
375 {
376    return nir_build_alu(build, nir_op_ffract, src0, NULL, NULL, NULL);
377 }
378 static inline nir_ssa_def *
nir_fge(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)379 nir_fge(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
380 {
381    return nir_build_alu(build, nir_op_fge, src0, src1, NULL, NULL);
382 }
383 static inline nir_ssa_def *
nir_find_lsb(nir_builder * build,nir_ssa_def * src0)384 nir_find_lsb(nir_builder *build, nir_ssa_def *src0)
385 {
386    return nir_build_alu(build, nir_op_find_lsb, src0, NULL, NULL, NULL);
387 }
388 static inline nir_ssa_def *
nir_flog2(nir_builder * build,nir_ssa_def * src0)389 nir_flog2(nir_builder *build, nir_ssa_def *src0)
390 {
391    return nir_build_alu(build, nir_op_flog2, src0, NULL, NULL, NULL);
392 }
393 static inline nir_ssa_def *
nir_flrp(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1,nir_ssa_def * src2)394 nir_flrp(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
395 {
396    return nir_build_alu(build, nir_op_flrp, src0, src1, src2, NULL);
397 }
398 static inline nir_ssa_def *
nir_flt(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)399 nir_flt(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
400 {
401    return nir_build_alu(build, nir_op_flt, src0, src1, NULL, NULL);
402 }
403 static inline nir_ssa_def *
nir_fmax(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)404 nir_fmax(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
405 {
406    return nir_build_alu(build, nir_op_fmax, src0, src1, NULL, NULL);
407 }
408 static inline nir_ssa_def *
nir_fmin(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)409 nir_fmin(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
410 {
411    return nir_build_alu(build, nir_op_fmin, src0, src1, NULL, NULL);
412 }
413 static inline nir_ssa_def *
nir_fmod(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)414 nir_fmod(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
415 {
416    return nir_build_alu(build, nir_op_fmod, src0, src1, NULL, NULL);
417 }
418 static inline nir_ssa_def *
nir_fmov(nir_builder * build,nir_ssa_def * src0)419 nir_fmov(nir_builder *build, nir_ssa_def *src0)
420 {
421    return nir_build_alu(build, nir_op_fmov, src0, NULL, NULL, NULL);
422 }
423 static inline nir_ssa_def *
nir_fmul(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)424 nir_fmul(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
425 {
426    return nir_build_alu(build, nir_op_fmul, src0, src1, NULL, NULL);
427 }
428 static inline nir_ssa_def *
nir_fne(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)429 nir_fne(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
430 {
431    return nir_build_alu(build, nir_op_fne, src0, src1, NULL, NULL);
432 }
433 static inline nir_ssa_def *
nir_fneg(nir_builder * build,nir_ssa_def * src0)434 nir_fneg(nir_builder *build, nir_ssa_def *src0)
435 {
436    return nir_build_alu(build, nir_op_fneg, src0, NULL, NULL, NULL);
437 }
438 static inline nir_ssa_def *
nir_fnoise1_1(nir_builder * build,nir_ssa_def * src0)439 nir_fnoise1_1(nir_builder *build, nir_ssa_def *src0)
440 {
441    return nir_build_alu(build, nir_op_fnoise1_1, src0, NULL, NULL, NULL);
442 }
443 static inline nir_ssa_def *
nir_fnoise1_2(nir_builder * build,nir_ssa_def * src0)444 nir_fnoise1_2(nir_builder *build, nir_ssa_def *src0)
445 {
446    return nir_build_alu(build, nir_op_fnoise1_2, src0, NULL, NULL, NULL);
447 }
448 static inline nir_ssa_def *
nir_fnoise1_3(nir_builder * build,nir_ssa_def * src0)449 nir_fnoise1_3(nir_builder *build, nir_ssa_def *src0)
450 {
451    return nir_build_alu(build, nir_op_fnoise1_3, src0, NULL, NULL, NULL);
452 }
453 static inline nir_ssa_def *
nir_fnoise1_4(nir_builder * build,nir_ssa_def * src0)454 nir_fnoise1_4(nir_builder *build, nir_ssa_def *src0)
455 {
456    return nir_build_alu(build, nir_op_fnoise1_4, src0, NULL, NULL, NULL);
457 }
458 static inline nir_ssa_def *
nir_fnoise2_1(nir_builder * build,nir_ssa_def * src0)459 nir_fnoise2_1(nir_builder *build, nir_ssa_def *src0)
460 {
461    return nir_build_alu(build, nir_op_fnoise2_1, src0, NULL, NULL, NULL);
462 }
463 static inline nir_ssa_def *
nir_fnoise2_2(nir_builder * build,nir_ssa_def * src0)464 nir_fnoise2_2(nir_builder *build, nir_ssa_def *src0)
465 {
466    return nir_build_alu(build, nir_op_fnoise2_2, src0, NULL, NULL, NULL);
467 }
468 static inline nir_ssa_def *
nir_fnoise2_3(nir_builder * build,nir_ssa_def * src0)469 nir_fnoise2_3(nir_builder *build, nir_ssa_def *src0)
470 {
471    return nir_build_alu(build, nir_op_fnoise2_3, src0, NULL, NULL, NULL);
472 }
473 static inline nir_ssa_def *
nir_fnoise2_4(nir_builder * build,nir_ssa_def * src0)474 nir_fnoise2_4(nir_builder *build, nir_ssa_def *src0)
475 {
476    return nir_build_alu(build, nir_op_fnoise2_4, src0, NULL, NULL, NULL);
477 }
478 static inline nir_ssa_def *
nir_fnoise3_1(nir_builder * build,nir_ssa_def * src0)479 nir_fnoise3_1(nir_builder *build, nir_ssa_def *src0)
480 {
481    return nir_build_alu(build, nir_op_fnoise3_1, src0, NULL, NULL, NULL);
482 }
483 static inline nir_ssa_def *
nir_fnoise3_2(nir_builder * build,nir_ssa_def * src0)484 nir_fnoise3_2(nir_builder *build, nir_ssa_def *src0)
485 {
486    return nir_build_alu(build, nir_op_fnoise3_2, src0, NULL, NULL, NULL);
487 }
488 static inline nir_ssa_def *
nir_fnoise3_3(nir_builder * build,nir_ssa_def * src0)489 nir_fnoise3_3(nir_builder *build, nir_ssa_def *src0)
490 {
491    return nir_build_alu(build, nir_op_fnoise3_3, src0, NULL, NULL, NULL);
492 }
493 static inline nir_ssa_def *
nir_fnoise3_4(nir_builder * build,nir_ssa_def * src0)494 nir_fnoise3_4(nir_builder *build, nir_ssa_def *src0)
495 {
496    return nir_build_alu(build, nir_op_fnoise3_4, src0, NULL, NULL, NULL);
497 }
498 static inline nir_ssa_def *
nir_fnoise4_1(nir_builder * build,nir_ssa_def * src0)499 nir_fnoise4_1(nir_builder *build, nir_ssa_def *src0)
500 {
501    return nir_build_alu(build, nir_op_fnoise4_1, src0, NULL, NULL, NULL);
502 }
503 static inline nir_ssa_def *
nir_fnoise4_2(nir_builder * build,nir_ssa_def * src0)504 nir_fnoise4_2(nir_builder *build, nir_ssa_def *src0)
505 {
506    return nir_build_alu(build, nir_op_fnoise4_2, src0, NULL, NULL, NULL);
507 }
508 static inline nir_ssa_def *
nir_fnoise4_3(nir_builder * build,nir_ssa_def * src0)509 nir_fnoise4_3(nir_builder *build, nir_ssa_def *src0)
510 {
511    return nir_build_alu(build, nir_op_fnoise4_3, src0, NULL, NULL, NULL);
512 }
513 static inline nir_ssa_def *
nir_fnoise4_4(nir_builder * build,nir_ssa_def * src0)514 nir_fnoise4_4(nir_builder *build, nir_ssa_def *src0)
515 {
516    return nir_build_alu(build, nir_op_fnoise4_4, src0, NULL, NULL, NULL);
517 }
518 static inline nir_ssa_def *
nir_fnot(nir_builder * build,nir_ssa_def * src0)519 nir_fnot(nir_builder *build, nir_ssa_def *src0)
520 {
521    return nir_build_alu(build, nir_op_fnot, src0, NULL, NULL, NULL);
522 }
523 static inline nir_ssa_def *
nir_for(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)524 nir_for(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
525 {
526    return nir_build_alu(build, nir_op_for, src0, src1, NULL, NULL);
527 }
528 static inline nir_ssa_def *
nir_fpow(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)529 nir_fpow(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
530 {
531    return nir_build_alu(build, nir_op_fpow, src0, src1, NULL, NULL);
532 }
533 static inline nir_ssa_def *
nir_fquantize2f16(nir_builder * build,nir_ssa_def * src0)534 nir_fquantize2f16(nir_builder *build, nir_ssa_def *src0)
535 {
536    return nir_build_alu(build, nir_op_fquantize2f16, src0, NULL, NULL, NULL);
537 }
538 static inline nir_ssa_def *
nir_frcp(nir_builder * build,nir_ssa_def * src0)539 nir_frcp(nir_builder *build, nir_ssa_def *src0)
540 {
541    return nir_build_alu(build, nir_op_frcp, src0, NULL, NULL, NULL);
542 }
543 static inline nir_ssa_def *
nir_frem(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)544 nir_frem(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
545 {
546    return nir_build_alu(build, nir_op_frem, src0, src1, NULL, NULL);
547 }
548 static inline nir_ssa_def *
nir_fround_even(nir_builder * build,nir_ssa_def * src0)549 nir_fround_even(nir_builder *build, nir_ssa_def *src0)
550 {
551    return nir_build_alu(build, nir_op_fround_even, src0, NULL, NULL, NULL);
552 }
553 static inline nir_ssa_def *
nir_frsq(nir_builder * build,nir_ssa_def * src0)554 nir_frsq(nir_builder *build, nir_ssa_def *src0)
555 {
556    return nir_build_alu(build, nir_op_frsq, src0, NULL, NULL, NULL);
557 }
558 static inline nir_ssa_def *
nir_fsat(nir_builder * build,nir_ssa_def * src0)559 nir_fsat(nir_builder *build, nir_ssa_def *src0)
560 {
561    return nir_build_alu(build, nir_op_fsat, src0, NULL, NULL, NULL);
562 }
563 static inline nir_ssa_def *
nir_fsign(nir_builder * build,nir_ssa_def * src0)564 nir_fsign(nir_builder *build, nir_ssa_def *src0)
565 {
566    return nir_build_alu(build, nir_op_fsign, src0, NULL, NULL, NULL);
567 }
568 static inline nir_ssa_def *
nir_fsin(nir_builder * build,nir_ssa_def * src0)569 nir_fsin(nir_builder *build, nir_ssa_def *src0)
570 {
571    return nir_build_alu(build, nir_op_fsin, src0, NULL, NULL, NULL);
572 }
573 static inline nir_ssa_def *
nir_fsqrt(nir_builder * build,nir_ssa_def * src0)574 nir_fsqrt(nir_builder *build, nir_ssa_def *src0)
575 {
576    return nir_build_alu(build, nir_op_fsqrt, src0, NULL, NULL, NULL);
577 }
578 static inline nir_ssa_def *
nir_fsub(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)579 nir_fsub(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
580 {
581    return nir_build_alu(build, nir_op_fsub, src0, src1, NULL, NULL);
582 }
583 static inline nir_ssa_def *
nir_ftrunc(nir_builder * build,nir_ssa_def * src0)584 nir_ftrunc(nir_builder *build, nir_ssa_def *src0)
585 {
586    return nir_build_alu(build, nir_op_ftrunc, src0, NULL, NULL, NULL);
587 }
588 static inline nir_ssa_def *
nir_fxor(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)589 nir_fxor(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
590 {
591    return nir_build_alu(build, nir_op_fxor, src0, src1, NULL, NULL);
592 }
593 static inline nir_ssa_def *
nir_i2b(nir_builder * build,nir_ssa_def * src0)594 nir_i2b(nir_builder *build, nir_ssa_def *src0)
595 {
596    return nir_build_alu(build, nir_op_i2b, src0, NULL, NULL, NULL);
597 }
598 static inline nir_ssa_def *
nir_i2f16(nir_builder * build,nir_ssa_def * src0)599 nir_i2f16(nir_builder *build, nir_ssa_def *src0)
600 {
601    return nir_build_alu(build, nir_op_i2f16, src0, NULL, NULL, NULL);
602 }
603 static inline nir_ssa_def *
nir_i2f32(nir_builder * build,nir_ssa_def * src0)604 nir_i2f32(nir_builder *build, nir_ssa_def *src0)
605 {
606    return nir_build_alu(build, nir_op_i2f32, src0, NULL, NULL, NULL);
607 }
608 static inline nir_ssa_def *
nir_i2f64(nir_builder * build,nir_ssa_def * src0)609 nir_i2f64(nir_builder *build, nir_ssa_def *src0)
610 {
611    return nir_build_alu(build, nir_op_i2f64, src0, NULL, NULL, NULL);
612 }
613 static inline nir_ssa_def *
nir_i2i16(nir_builder * build,nir_ssa_def * src0)614 nir_i2i16(nir_builder *build, nir_ssa_def *src0)
615 {
616    return nir_build_alu(build, nir_op_i2i16, src0, NULL, NULL, NULL);
617 }
618 static inline nir_ssa_def *
nir_i2i32(nir_builder * build,nir_ssa_def * src0)619 nir_i2i32(nir_builder *build, nir_ssa_def *src0)
620 {
621    return nir_build_alu(build, nir_op_i2i32, src0, NULL, NULL, NULL);
622 }
623 static inline nir_ssa_def *
nir_i2i64(nir_builder * build,nir_ssa_def * src0)624 nir_i2i64(nir_builder *build, nir_ssa_def *src0)
625 {
626    return nir_build_alu(build, nir_op_i2i64, src0, NULL, NULL, NULL);
627 }
628 static inline nir_ssa_def *
nir_i2i8(nir_builder * build,nir_ssa_def * src0)629 nir_i2i8(nir_builder *build, nir_ssa_def *src0)
630 {
631    return nir_build_alu(build, nir_op_i2i8, src0, NULL, NULL, NULL);
632 }
633 static inline nir_ssa_def *
nir_iabs(nir_builder * build,nir_ssa_def * src0)634 nir_iabs(nir_builder *build, nir_ssa_def *src0)
635 {
636    return nir_build_alu(build, nir_op_iabs, src0, NULL, NULL, NULL);
637 }
638 static inline nir_ssa_def *
nir_iadd(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)639 nir_iadd(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
640 {
641    return nir_build_alu(build, nir_op_iadd, src0, src1, NULL, NULL);
642 }
643 static inline nir_ssa_def *
nir_iand(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)644 nir_iand(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
645 {
646    return nir_build_alu(build, nir_op_iand, src0, src1, NULL, NULL);
647 }
648 static inline nir_ssa_def *
nir_ibfe(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1,nir_ssa_def * src2)649 nir_ibfe(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
650 {
651    return nir_build_alu(build, nir_op_ibfe, src0, src1, src2, NULL);
652 }
653 static inline nir_ssa_def *
nir_ibitfield_extract(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1,nir_ssa_def * src2)654 nir_ibitfield_extract(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
655 {
656    return nir_build_alu(build, nir_op_ibitfield_extract, src0, src1, src2, NULL);
657 }
658 static inline nir_ssa_def *
nir_idiv(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)659 nir_idiv(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
660 {
661    return nir_build_alu(build, nir_op_idiv, src0, src1, NULL, NULL);
662 }
663 static inline nir_ssa_def *
nir_ieq(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)664 nir_ieq(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
665 {
666    return nir_build_alu(build, nir_op_ieq, src0, src1, NULL, NULL);
667 }
668 static inline nir_ssa_def *
nir_ifind_msb(nir_builder * build,nir_ssa_def * src0)669 nir_ifind_msb(nir_builder *build, nir_ssa_def *src0)
670 {
671    return nir_build_alu(build, nir_op_ifind_msb, src0, NULL, NULL, NULL);
672 }
673 static inline nir_ssa_def *
nir_ige(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)674 nir_ige(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
675 {
676    return nir_build_alu(build, nir_op_ige, src0, src1, NULL, NULL);
677 }
678 static inline nir_ssa_def *
nir_ilt(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)679 nir_ilt(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
680 {
681    return nir_build_alu(build, nir_op_ilt, src0, src1, NULL, NULL);
682 }
683 static inline nir_ssa_def *
nir_imax(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)684 nir_imax(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
685 {
686    return nir_build_alu(build, nir_op_imax, src0, src1, NULL, NULL);
687 }
688 static inline nir_ssa_def *
nir_imin(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)689 nir_imin(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
690 {
691    return nir_build_alu(build, nir_op_imin, src0, src1, NULL, NULL);
692 }
693 static inline nir_ssa_def *
nir_imod(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)694 nir_imod(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
695 {
696    return nir_build_alu(build, nir_op_imod, src0, src1, NULL, NULL);
697 }
698 static inline nir_ssa_def *
nir_imov(nir_builder * build,nir_ssa_def * src0)699 nir_imov(nir_builder *build, nir_ssa_def *src0)
700 {
701    return nir_build_alu(build, nir_op_imov, src0, NULL, NULL, NULL);
702 }
703 static inline nir_ssa_def *
nir_imul(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)704 nir_imul(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
705 {
706    return nir_build_alu(build, nir_op_imul, src0, src1, NULL, NULL);
707 }
708 static inline nir_ssa_def *
nir_imul_high(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)709 nir_imul_high(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
710 {
711    return nir_build_alu(build, nir_op_imul_high, src0, src1, NULL, NULL);
712 }
713 static inline nir_ssa_def *
nir_ine(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)714 nir_ine(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
715 {
716    return nir_build_alu(build, nir_op_ine, src0, src1, NULL, NULL);
717 }
718 static inline nir_ssa_def *
nir_ineg(nir_builder * build,nir_ssa_def * src0)719 nir_ineg(nir_builder *build, nir_ssa_def *src0)
720 {
721    return nir_build_alu(build, nir_op_ineg, src0, NULL, NULL, NULL);
722 }
723 static inline nir_ssa_def *
nir_inot(nir_builder * build,nir_ssa_def * src0)724 nir_inot(nir_builder *build, nir_ssa_def *src0)
725 {
726    return nir_build_alu(build, nir_op_inot, src0, NULL, NULL, NULL);
727 }
728 static inline nir_ssa_def *
nir_ior(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)729 nir_ior(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
730 {
731    return nir_build_alu(build, nir_op_ior, src0, src1, NULL, NULL);
732 }
733 static inline nir_ssa_def *
nir_irem(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)734 nir_irem(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
735 {
736    return nir_build_alu(build, nir_op_irem, src0, src1, NULL, NULL);
737 }
738 static inline nir_ssa_def *
nir_ishl(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)739 nir_ishl(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
740 {
741    return nir_build_alu(build, nir_op_ishl, src0, src1, NULL, NULL);
742 }
743 static inline nir_ssa_def *
nir_ishr(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)744 nir_ishr(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
745 {
746    return nir_build_alu(build, nir_op_ishr, src0, src1, NULL, NULL);
747 }
748 static inline nir_ssa_def *
nir_isign(nir_builder * build,nir_ssa_def * src0)749 nir_isign(nir_builder *build, nir_ssa_def *src0)
750 {
751    return nir_build_alu(build, nir_op_isign, src0, NULL, NULL, NULL);
752 }
753 static inline nir_ssa_def *
nir_isub(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)754 nir_isub(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
755 {
756    return nir_build_alu(build, nir_op_isub, src0, src1, NULL, NULL);
757 }
758 static inline nir_ssa_def *
nir_ixor(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)759 nir_ixor(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
760 {
761    return nir_build_alu(build, nir_op_ixor, src0, src1, NULL, NULL);
762 }
763 static inline nir_ssa_def *
nir_ldexp(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)764 nir_ldexp(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
765 {
766    return nir_build_alu(build, nir_op_ldexp, src0, src1, NULL, NULL);
767 }
768 static inline nir_ssa_def *
nir_pack_64_2x32(nir_builder * build,nir_ssa_def * src0)769 nir_pack_64_2x32(nir_builder *build, nir_ssa_def *src0)
770 {
771    return nir_build_alu(build, nir_op_pack_64_2x32, src0, NULL, NULL, NULL);
772 }
773 static inline nir_ssa_def *
nir_pack_64_2x32_split(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)774 nir_pack_64_2x32_split(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
775 {
776    return nir_build_alu(build, nir_op_pack_64_2x32_split, src0, src1, NULL, NULL);
777 }
778 static inline nir_ssa_def *
nir_pack_half_2x16(nir_builder * build,nir_ssa_def * src0)779 nir_pack_half_2x16(nir_builder *build, nir_ssa_def *src0)
780 {
781    return nir_build_alu(build, nir_op_pack_half_2x16, src0, NULL, NULL, NULL);
782 }
783 static inline nir_ssa_def *
nir_pack_half_2x16_split(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)784 nir_pack_half_2x16_split(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
785 {
786    return nir_build_alu(build, nir_op_pack_half_2x16_split, src0, src1, NULL, NULL);
787 }
788 static inline nir_ssa_def *
nir_pack_snorm_2x16(nir_builder * build,nir_ssa_def * src0)789 nir_pack_snorm_2x16(nir_builder *build, nir_ssa_def *src0)
790 {
791    return nir_build_alu(build, nir_op_pack_snorm_2x16, src0, NULL, NULL, NULL);
792 }
793 static inline nir_ssa_def *
nir_pack_snorm_4x8(nir_builder * build,nir_ssa_def * src0)794 nir_pack_snorm_4x8(nir_builder *build, nir_ssa_def *src0)
795 {
796    return nir_build_alu(build, nir_op_pack_snorm_4x8, src0, NULL, NULL, NULL);
797 }
798 static inline nir_ssa_def *
nir_pack_unorm_2x16(nir_builder * build,nir_ssa_def * src0)799 nir_pack_unorm_2x16(nir_builder *build, nir_ssa_def *src0)
800 {
801    return nir_build_alu(build, nir_op_pack_unorm_2x16, src0, NULL, NULL, NULL);
802 }
803 static inline nir_ssa_def *
nir_pack_unorm_4x8(nir_builder * build,nir_ssa_def * src0)804 nir_pack_unorm_4x8(nir_builder *build, nir_ssa_def *src0)
805 {
806    return nir_build_alu(build, nir_op_pack_unorm_4x8, src0, NULL, NULL, NULL);
807 }
808 static inline nir_ssa_def *
nir_pack_uvec2_to_uint(nir_builder * build,nir_ssa_def * src0)809 nir_pack_uvec2_to_uint(nir_builder *build, nir_ssa_def *src0)
810 {
811    return nir_build_alu(build, nir_op_pack_uvec2_to_uint, src0, NULL, NULL, NULL);
812 }
813 static inline nir_ssa_def *
nir_pack_uvec4_to_uint(nir_builder * build,nir_ssa_def * src0)814 nir_pack_uvec4_to_uint(nir_builder *build, nir_ssa_def *src0)
815 {
816    return nir_build_alu(build, nir_op_pack_uvec4_to_uint, src0, NULL, NULL, NULL);
817 }
818 static inline nir_ssa_def *
nir_seq(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)819 nir_seq(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
820 {
821    return nir_build_alu(build, nir_op_seq, src0, src1, NULL, NULL);
822 }
823 static inline nir_ssa_def *
nir_sge(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)824 nir_sge(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
825 {
826    return nir_build_alu(build, nir_op_sge, src0, src1, NULL, NULL);
827 }
828 static inline nir_ssa_def *
nir_slt(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)829 nir_slt(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
830 {
831    return nir_build_alu(build, nir_op_slt, src0, src1, NULL, NULL);
832 }
833 static inline nir_ssa_def *
nir_sne(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)834 nir_sne(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
835 {
836    return nir_build_alu(build, nir_op_sne, src0, src1, NULL, NULL);
837 }
838 static inline nir_ssa_def *
nir_u2f16(nir_builder * build,nir_ssa_def * src0)839 nir_u2f16(nir_builder *build, nir_ssa_def *src0)
840 {
841    return nir_build_alu(build, nir_op_u2f16, src0, NULL, NULL, NULL);
842 }
843 static inline nir_ssa_def *
nir_u2f32(nir_builder * build,nir_ssa_def * src0)844 nir_u2f32(nir_builder *build, nir_ssa_def *src0)
845 {
846    return nir_build_alu(build, nir_op_u2f32, src0, NULL, NULL, NULL);
847 }
848 static inline nir_ssa_def *
nir_u2f64(nir_builder * build,nir_ssa_def * src0)849 nir_u2f64(nir_builder *build, nir_ssa_def *src0)
850 {
851    return nir_build_alu(build, nir_op_u2f64, src0, NULL, NULL, NULL);
852 }
853 static inline nir_ssa_def *
nir_u2u16(nir_builder * build,nir_ssa_def * src0)854 nir_u2u16(nir_builder *build, nir_ssa_def *src0)
855 {
856    return nir_build_alu(build, nir_op_u2u16, src0, NULL, NULL, NULL);
857 }
858 static inline nir_ssa_def *
nir_u2u32(nir_builder * build,nir_ssa_def * src0)859 nir_u2u32(nir_builder *build, nir_ssa_def *src0)
860 {
861    return nir_build_alu(build, nir_op_u2u32, src0, NULL, NULL, NULL);
862 }
863 static inline nir_ssa_def *
nir_u2u64(nir_builder * build,nir_ssa_def * src0)864 nir_u2u64(nir_builder *build, nir_ssa_def *src0)
865 {
866    return nir_build_alu(build, nir_op_u2u64, src0, NULL, NULL, NULL);
867 }
868 static inline nir_ssa_def *
nir_u2u8(nir_builder * build,nir_ssa_def * src0)869 nir_u2u8(nir_builder *build, nir_ssa_def *src0)
870 {
871    return nir_build_alu(build, nir_op_u2u8, src0, NULL, NULL, NULL);
872 }
873 static inline nir_ssa_def *
nir_uadd_carry(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)874 nir_uadd_carry(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
875 {
876    return nir_build_alu(build, nir_op_uadd_carry, src0, src1, NULL, NULL);
877 }
878 static inline nir_ssa_def *
nir_ubfe(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1,nir_ssa_def * src2)879 nir_ubfe(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
880 {
881    return nir_build_alu(build, nir_op_ubfe, src0, src1, src2, NULL);
882 }
883 static inline nir_ssa_def *
nir_ubitfield_extract(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1,nir_ssa_def * src2)884 nir_ubitfield_extract(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
885 {
886    return nir_build_alu(build, nir_op_ubitfield_extract, src0, src1, src2, NULL);
887 }
888 static inline nir_ssa_def *
nir_udiv(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)889 nir_udiv(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
890 {
891    return nir_build_alu(build, nir_op_udiv, src0, src1, NULL, NULL);
892 }
893 static inline nir_ssa_def *
nir_ufind_msb(nir_builder * build,nir_ssa_def * src0)894 nir_ufind_msb(nir_builder *build, nir_ssa_def *src0)
895 {
896    return nir_build_alu(build, nir_op_ufind_msb, src0, NULL, NULL, NULL);
897 }
898 static inline nir_ssa_def *
nir_uge(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)899 nir_uge(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
900 {
901    return nir_build_alu(build, nir_op_uge, src0, src1, NULL, NULL);
902 }
903 static inline nir_ssa_def *
nir_ult(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)904 nir_ult(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
905 {
906    return nir_build_alu(build, nir_op_ult, src0, src1, NULL, NULL);
907 }
908 static inline nir_ssa_def *
nir_umax(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)909 nir_umax(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
910 {
911    return nir_build_alu(build, nir_op_umax, src0, src1, NULL, NULL);
912 }
913 static inline nir_ssa_def *
nir_umax_4x8(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)914 nir_umax_4x8(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
915 {
916    return nir_build_alu(build, nir_op_umax_4x8, src0, src1, NULL, NULL);
917 }
918 static inline nir_ssa_def *
nir_umin(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)919 nir_umin(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
920 {
921    return nir_build_alu(build, nir_op_umin, src0, src1, NULL, NULL);
922 }
923 static inline nir_ssa_def *
nir_umin_4x8(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)924 nir_umin_4x8(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
925 {
926    return nir_build_alu(build, nir_op_umin_4x8, src0, src1, NULL, NULL);
927 }
928 static inline nir_ssa_def *
nir_umod(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)929 nir_umod(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
930 {
931    return nir_build_alu(build, nir_op_umod, src0, src1, NULL, NULL);
932 }
933 static inline nir_ssa_def *
nir_umul_high(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)934 nir_umul_high(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
935 {
936    return nir_build_alu(build, nir_op_umul_high, src0, src1, NULL, NULL);
937 }
938 static inline nir_ssa_def *
nir_umul_unorm_4x8(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)939 nir_umul_unorm_4x8(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
940 {
941    return nir_build_alu(build, nir_op_umul_unorm_4x8, src0, src1, NULL, NULL);
942 }
943 static inline nir_ssa_def *
nir_unpack_64_2x32(nir_builder * build,nir_ssa_def * src0)944 nir_unpack_64_2x32(nir_builder *build, nir_ssa_def *src0)
945 {
946    return nir_build_alu(build, nir_op_unpack_64_2x32, src0, NULL, NULL, NULL);
947 }
948 static inline nir_ssa_def *
nir_unpack_64_2x32_split_x(nir_builder * build,nir_ssa_def * src0)949 nir_unpack_64_2x32_split_x(nir_builder *build, nir_ssa_def *src0)
950 {
951    return nir_build_alu(build, nir_op_unpack_64_2x32_split_x, src0, NULL, NULL, NULL);
952 }
953 static inline nir_ssa_def *
nir_unpack_64_2x32_split_y(nir_builder * build,nir_ssa_def * src0)954 nir_unpack_64_2x32_split_y(nir_builder *build, nir_ssa_def *src0)
955 {
956    return nir_build_alu(build, nir_op_unpack_64_2x32_split_y, src0, NULL, NULL, NULL);
957 }
958 static inline nir_ssa_def *
nir_unpack_half_2x16(nir_builder * build,nir_ssa_def * src0)959 nir_unpack_half_2x16(nir_builder *build, nir_ssa_def *src0)
960 {
961    return nir_build_alu(build, nir_op_unpack_half_2x16, src0, NULL, NULL, NULL);
962 }
963 static inline nir_ssa_def *
nir_unpack_half_2x16_split_x(nir_builder * build,nir_ssa_def * src0)964 nir_unpack_half_2x16_split_x(nir_builder *build, nir_ssa_def *src0)
965 {
966    return nir_build_alu(build, nir_op_unpack_half_2x16_split_x, src0, NULL, NULL, NULL);
967 }
968 static inline nir_ssa_def *
nir_unpack_half_2x16_split_y(nir_builder * build,nir_ssa_def * src0)969 nir_unpack_half_2x16_split_y(nir_builder *build, nir_ssa_def *src0)
970 {
971    return nir_build_alu(build, nir_op_unpack_half_2x16_split_y, src0, NULL, NULL, NULL);
972 }
973 static inline nir_ssa_def *
nir_unpack_snorm_2x16(nir_builder * build,nir_ssa_def * src0)974 nir_unpack_snorm_2x16(nir_builder *build, nir_ssa_def *src0)
975 {
976    return nir_build_alu(build, nir_op_unpack_snorm_2x16, src0, NULL, NULL, NULL);
977 }
978 static inline nir_ssa_def *
nir_unpack_snorm_4x8(nir_builder * build,nir_ssa_def * src0)979 nir_unpack_snorm_4x8(nir_builder *build, nir_ssa_def *src0)
980 {
981    return nir_build_alu(build, nir_op_unpack_snorm_4x8, src0, NULL, NULL, NULL);
982 }
983 static inline nir_ssa_def *
nir_unpack_unorm_2x16(nir_builder * build,nir_ssa_def * src0)984 nir_unpack_unorm_2x16(nir_builder *build, nir_ssa_def *src0)
985 {
986    return nir_build_alu(build, nir_op_unpack_unorm_2x16, src0, NULL, NULL, NULL);
987 }
988 static inline nir_ssa_def *
nir_unpack_unorm_4x8(nir_builder * build,nir_ssa_def * src0)989 nir_unpack_unorm_4x8(nir_builder *build, nir_ssa_def *src0)
990 {
991    return nir_build_alu(build, nir_op_unpack_unorm_4x8, src0, NULL, NULL, NULL);
992 }
993 static inline nir_ssa_def *
nir_usadd_4x8(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)994 nir_usadd_4x8(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
995 {
996    return nir_build_alu(build, nir_op_usadd_4x8, src0, src1, NULL, NULL);
997 }
998 static inline nir_ssa_def *
nir_ushr(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)999 nir_ushr(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1000 {
1001    return nir_build_alu(build, nir_op_ushr, src0, src1, NULL, NULL);
1002 }
1003 static inline nir_ssa_def *
nir_ussub_4x8(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1004 nir_ussub_4x8(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1005 {
1006    return nir_build_alu(build, nir_op_ussub_4x8, src0, src1, NULL, NULL);
1007 }
1008 static inline nir_ssa_def *
nir_usub_borrow(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1009 nir_usub_borrow(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1010 {
1011    return nir_build_alu(build, nir_op_usub_borrow, src0, src1, NULL, NULL);
1012 }
1013 static inline nir_ssa_def *
nir_vec2(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1014 nir_vec2(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1015 {
1016    return nir_build_alu(build, nir_op_vec2, src0, src1, NULL, NULL);
1017 }
1018 static inline nir_ssa_def *
nir_vec3(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1,nir_ssa_def * src2)1019 nir_vec3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
1020 {
1021    return nir_build_alu(build, nir_op_vec3, src0, src1, src2, NULL);
1022 }
1023 static inline nir_ssa_def *
nir_vec4(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1,nir_ssa_def * src2,nir_ssa_def * src3)1024 nir_vec4(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2, nir_ssa_def *src3)
1025 {
1026    return nir_build_alu(build, nir_op_vec4, src0, src1, src2, src3);
1027 }
1028 
1029 #endif /* _NIR_BUILDER_OPCODES_ */
1030