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_amul(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)29 nir_amul(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
30 {
31 return nir_build_alu(build, nir_op_amul, src0, src1, NULL, NULL);
32 }
33 static inline nir_ssa_def *
nir_b16all_fequal16(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)34 nir_b16all_fequal16(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
35 {
36 return nir_build_alu(build, nir_op_b16all_fequal16, src0, src1, NULL, NULL);
37 }
38 static inline nir_ssa_def *
nir_b16all_fequal2(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)39 nir_b16all_fequal2(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
40 {
41 return nir_build_alu(build, nir_op_b16all_fequal2, src0, src1, NULL, NULL);
42 }
43 static inline nir_ssa_def *
nir_b16all_fequal3(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)44 nir_b16all_fequal3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
45 {
46 return nir_build_alu(build, nir_op_b16all_fequal3, src0, src1, NULL, NULL);
47 }
48 static inline nir_ssa_def *
nir_b16all_fequal4(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)49 nir_b16all_fequal4(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
50 {
51 return nir_build_alu(build, nir_op_b16all_fequal4, src0, src1, NULL, NULL);
52 }
53 static inline nir_ssa_def *
nir_b16all_fequal8(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)54 nir_b16all_fequal8(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
55 {
56 return nir_build_alu(build, nir_op_b16all_fequal8, src0, src1, NULL, NULL);
57 }
58 static inline nir_ssa_def *
nir_b16all_iequal16(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)59 nir_b16all_iequal16(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
60 {
61 return nir_build_alu(build, nir_op_b16all_iequal16, src0, src1, NULL, NULL);
62 }
63 static inline nir_ssa_def *
nir_b16all_iequal2(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)64 nir_b16all_iequal2(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
65 {
66 return nir_build_alu(build, nir_op_b16all_iequal2, src0, src1, NULL, NULL);
67 }
68 static inline nir_ssa_def *
nir_b16all_iequal3(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)69 nir_b16all_iequal3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
70 {
71 return nir_build_alu(build, nir_op_b16all_iequal3, src0, src1, NULL, NULL);
72 }
73 static inline nir_ssa_def *
nir_b16all_iequal4(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)74 nir_b16all_iequal4(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
75 {
76 return nir_build_alu(build, nir_op_b16all_iequal4, src0, src1, NULL, NULL);
77 }
78 static inline nir_ssa_def *
nir_b16all_iequal8(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)79 nir_b16all_iequal8(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
80 {
81 return nir_build_alu(build, nir_op_b16all_iequal8, src0, src1, NULL, NULL);
82 }
83 static inline nir_ssa_def *
nir_b16any_fnequal16(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)84 nir_b16any_fnequal16(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
85 {
86 return nir_build_alu(build, nir_op_b16any_fnequal16, src0, src1, NULL, NULL);
87 }
88 static inline nir_ssa_def *
nir_b16any_fnequal2(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)89 nir_b16any_fnequal2(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
90 {
91 return nir_build_alu(build, nir_op_b16any_fnequal2, src0, src1, NULL, NULL);
92 }
93 static inline nir_ssa_def *
nir_b16any_fnequal3(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)94 nir_b16any_fnequal3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
95 {
96 return nir_build_alu(build, nir_op_b16any_fnequal3, src0, src1, NULL, NULL);
97 }
98 static inline nir_ssa_def *
nir_b16any_fnequal4(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)99 nir_b16any_fnequal4(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
100 {
101 return nir_build_alu(build, nir_op_b16any_fnequal4, src0, src1, NULL, NULL);
102 }
103 static inline nir_ssa_def *
nir_b16any_fnequal8(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)104 nir_b16any_fnequal8(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
105 {
106 return nir_build_alu(build, nir_op_b16any_fnequal8, src0, src1, NULL, NULL);
107 }
108 static inline nir_ssa_def *
nir_b16any_inequal16(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)109 nir_b16any_inequal16(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
110 {
111 return nir_build_alu(build, nir_op_b16any_inequal16, src0, src1, NULL, NULL);
112 }
113 static inline nir_ssa_def *
nir_b16any_inequal2(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)114 nir_b16any_inequal2(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
115 {
116 return nir_build_alu(build, nir_op_b16any_inequal2, src0, src1, NULL, NULL);
117 }
118 static inline nir_ssa_def *
nir_b16any_inequal3(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)119 nir_b16any_inequal3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
120 {
121 return nir_build_alu(build, nir_op_b16any_inequal3, src0, src1, NULL, NULL);
122 }
123 static inline nir_ssa_def *
nir_b16any_inequal4(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)124 nir_b16any_inequal4(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
125 {
126 return nir_build_alu(build, nir_op_b16any_inequal4, src0, src1, NULL, NULL);
127 }
128 static inline nir_ssa_def *
nir_b16any_inequal8(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)129 nir_b16any_inequal8(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
130 {
131 return nir_build_alu(build, nir_op_b16any_inequal8, src0, src1, NULL, NULL);
132 }
133 static inline nir_ssa_def *
nir_b16csel(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1,nir_ssa_def * src2)134 nir_b16csel(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
135 {
136 return nir_build_alu(build, nir_op_b16csel, src0, src1, src2, NULL);
137 }
138 static inline nir_ssa_def *
nir_b2b1(nir_builder * build,nir_ssa_def * src0)139 nir_b2b1(nir_builder *build, nir_ssa_def *src0)
140 {
141 return nir_build_alu(build, nir_op_b2b1, src0, NULL, NULL, NULL);
142 }
143 static inline nir_ssa_def *
nir_b2b16(nir_builder * build,nir_ssa_def * src0)144 nir_b2b16(nir_builder *build, nir_ssa_def *src0)
145 {
146 return nir_build_alu(build, nir_op_b2b16, src0, NULL, NULL, NULL);
147 }
148 static inline nir_ssa_def *
nir_b2b32(nir_builder * build,nir_ssa_def * src0)149 nir_b2b32(nir_builder *build, nir_ssa_def *src0)
150 {
151 return nir_build_alu(build, nir_op_b2b32, src0, NULL, NULL, NULL);
152 }
153 static inline nir_ssa_def *
nir_b2b8(nir_builder * build,nir_ssa_def * src0)154 nir_b2b8(nir_builder *build, nir_ssa_def *src0)
155 {
156 return nir_build_alu(build, nir_op_b2b8, src0, NULL, NULL, NULL);
157 }
158 static inline nir_ssa_def *
nir_b2f16(nir_builder * build,nir_ssa_def * src0)159 nir_b2f16(nir_builder *build, nir_ssa_def *src0)
160 {
161 return nir_build_alu(build, nir_op_b2f16, src0, NULL, NULL, NULL);
162 }
163 static inline nir_ssa_def *
nir_b2f32(nir_builder * build,nir_ssa_def * src0)164 nir_b2f32(nir_builder *build, nir_ssa_def *src0)
165 {
166 return nir_build_alu(build, nir_op_b2f32, src0, NULL, NULL, NULL);
167 }
168 static inline nir_ssa_def *
nir_b2f64(nir_builder * build,nir_ssa_def * src0)169 nir_b2f64(nir_builder *build, nir_ssa_def *src0)
170 {
171 return nir_build_alu(build, nir_op_b2f64, src0, NULL, NULL, NULL);
172 }
173 static inline nir_ssa_def *
nir_b2i1(nir_builder * build,nir_ssa_def * src0)174 nir_b2i1(nir_builder *build, nir_ssa_def *src0)
175 {
176 return nir_build_alu(build, nir_op_b2i1, src0, NULL, NULL, NULL);
177 }
178 static inline nir_ssa_def *
nir_b2i16(nir_builder * build,nir_ssa_def * src0)179 nir_b2i16(nir_builder *build, nir_ssa_def *src0)
180 {
181 return nir_build_alu(build, nir_op_b2i16, src0, NULL, NULL, NULL);
182 }
183 static inline nir_ssa_def *
nir_b2i32(nir_builder * build,nir_ssa_def * src0)184 nir_b2i32(nir_builder *build, nir_ssa_def *src0)
185 {
186 return nir_build_alu(build, nir_op_b2i32, src0, NULL, NULL, NULL);
187 }
188 static inline nir_ssa_def *
nir_b2i64(nir_builder * build,nir_ssa_def * src0)189 nir_b2i64(nir_builder *build, nir_ssa_def *src0)
190 {
191 return nir_build_alu(build, nir_op_b2i64, src0, NULL, NULL, NULL);
192 }
193 static inline nir_ssa_def *
nir_b2i8(nir_builder * build,nir_ssa_def * src0)194 nir_b2i8(nir_builder *build, nir_ssa_def *src0)
195 {
196 return nir_build_alu(build, nir_op_b2i8, src0, NULL, NULL, NULL);
197 }
198 static inline nir_ssa_def *
nir_b32all_fequal16(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)199 nir_b32all_fequal16(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
200 {
201 return nir_build_alu(build, nir_op_b32all_fequal16, src0, src1, NULL, NULL);
202 }
203 static inline nir_ssa_def *
nir_b32all_fequal2(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)204 nir_b32all_fequal2(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
205 {
206 return nir_build_alu(build, nir_op_b32all_fequal2, src0, src1, NULL, NULL);
207 }
208 static inline nir_ssa_def *
nir_b32all_fequal3(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)209 nir_b32all_fequal3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
210 {
211 return nir_build_alu(build, nir_op_b32all_fequal3, src0, src1, NULL, NULL);
212 }
213 static inline nir_ssa_def *
nir_b32all_fequal4(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)214 nir_b32all_fequal4(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
215 {
216 return nir_build_alu(build, nir_op_b32all_fequal4, src0, src1, NULL, NULL);
217 }
218 static inline nir_ssa_def *
nir_b32all_fequal8(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)219 nir_b32all_fequal8(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
220 {
221 return nir_build_alu(build, nir_op_b32all_fequal8, src0, src1, NULL, NULL);
222 }
223 static inline nir_ssa_def *
nir_b32all_iequal16(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)224 nir_b32all_iequal16(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
225 {
226 return nir_build_alu(build, nir_op_b32all_iequal16, src0, src1, NULL, NULL);
227 }
228 static inline nir_ssa_def *
nir_b32all_iequal2(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)229 nir_b32all_iequal2(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
230 {
231 return nir_build_alu(build, nir_op_b32all_iequal2, src0, src1, NULL, NULL);
232 }
233 static inline nir_ssa_def *
nir_b32all_iequal3(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)234 nir_b32all_iequal3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
235 {
236 return nir_build_alu(build, nir_op_b32all_iequal3, src0, src1, NULL, NULL);
237 }
238 static inline nir_ssa_def *
nir_b32all_iequal4(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)239 nir_b32all_iequal4(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
240 {
241 return nir_build_alu(build, nir_op_b32all_iequal4, src0, src1, NULL, NULL);
242 }
243 static inline nir_ssa_def *
nir_b32all_iequal8(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)244 nir_b32all_iequal8(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
245 {
246 return nir_build_alu(build, nir_op_b32all_iequal8, src0, src1, NULL, NULL);
247 }
248 static inline nir_ssa_def *
nir_b32any_fnequal16(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)249 nir_b32any_fnequal16(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
250 {
251 return nir_build_alu(build, nir_op_b32any_fnequal16, src0, src1, NULL, NULL);
252 }
253 static inline nir_ssa_def *
nir_b32any_fnequal2(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)254 nir_b32any_fnequal2(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
255 {
256 return nir_build_alu(build, nir_op_b32any_fnequal2, src0, src1, NULL, NULL);
257 }
258 static inline nir_ssa_def *
nir_b32any_fnequal3(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)259 nir_b32any_fnequal3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
260 {
261 return nir_build_alu(build, nir_op_b32any_fnequal3, src0, src1, NULL, NULL);
262 }
263 static inline nir_ssa_def *
nir_b32any_fnequal4(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)264 nir_b32any_fnequal4(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
265 {
266 return nir_build_alu(build, nir_op_b32any_fnequal4, src0, src1, NULL, NULL);
267 }
268 static inline nir_ssa_def *
nir_b32any_fnequal8(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)269 nir_b32any_fnequal8(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
270 {
271 return nir_build_alu(build, nir_op_b32any_fnequal8, src0, src1, NULL, NULL);
272 }
273 static inline nir_ssa_def *
nir_b32any_inequal16(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)274 nir_b32any_inequal16(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
275 {
276 return nir_build_alu(build, nir_op_b32any_inequal16, src0, src1, NULL, NULL);
277 }
278 static inline nir_ssa_def *
nir_b32any_inequal2(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)279 nir_b32any_inequal2(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
280 {
281 return nir_build_alu(build, nir_op_b32any_inequal2, src0, src1, NULL, NULL);
282 }
283 static inline nir_ssa_def *
nir_b32any_inequal3(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)284 nir_b32any_inequal3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
285 {
286 return nir_build_alu(build, nir_op_b32any_inequal3, src0, src1, NULL, NULL);
287 }
288 static inline nir_ssa_def *
nir_b32any_inequal4(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)289 nir_b32any_inequal4(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
290 {
291 return nir_build_alu(build, nir_op_b32any_inequal4, src0, src1, NULL, NULL);
292 }
293 static inline nir_ssa_def *
nir_b32any_inequal8(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)294 nir_b32any_inequal8(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
295 {
296 return nir_build_alu(build, nir_op_b32any_inequal8, src0, src1, NULL, NULL);
297 }
298 static inline nir_ssa_def *
nir_b32csel(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1,nir_ssa_def * src2)299 nir_b32csel(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
300 {
301 return nir_build_alu(build, nir_op_b32csel, src0, src1, src2, NULL);
302 }
303 static inline nir_ssa_def *
nir_b8all_fequal16(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)304 nir_b8all_fequal16(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
305 {
306 return nir_build_alu(build, nir_op_b8all_fequal16, src0, src1, NULL, NULL);
307 }
308 static inline nir_ssa_def *
nir_b8all_fequal2(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)309 nir_b8all_fequal2(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
310 {
311 return nir_build_alu(build, nir_op_b8all_fequal2, src0, src1, NULL, NULL);
312 }
313 static inline nir_ssa_def *
nir_b8all_fequal3(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)314 nir_b8all_fequal3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
315 {
316 return nir_build_alu(build, nir_op_b8all_fequal3, src0, src1, NULL, NULL);
317 }
318 static inline nir_ssa_def *
nir_b8all_fequal4(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)319 nir_b8all_fequal4(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
320 {
321 return nir_build_alu(build, nir_op_b8all_fequal4, src0, src1, NULL, NULL);
322 }
323 static inline nir_ssa_def *
nir_b8all_fequal8(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)324 nir_b8all_fequal8(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
325 {
326 return nir_build_alu(build, nir_op_b8all_fequal8, src0, src1, NULL, NULL);
327 }
328 static inline nir_ssa_def *
nir_b8all_iequal16(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)329 nir_b8all_iequal16(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
330 {
331 return nir_build_alu(build, nir_op_b8all_iequal16, src0, src1, NULL, NULL);
332 }
333 static inline nir_ssa_def *
nir_b8all_iequal2(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)334 nir_b8all_iequal2(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
335 {
336 return nir_build_alu(build, nir_op_b8all_iequal2, src0, src1, NULL, NULL);
337 }
338 static inline nir_ssa_def *
nir_b8all_iequal3(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)339 nir_b8all_iequal3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
340 {
341 return nir_build_alu(build, nir_op_b8all_iequal3, src0, src1, NULL, NULL);
342 }
343 static inline nir_ssa_def *
nir_b8all_iequal4(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)344 nir_b8all_iequal4(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
345 {
346 return nir_build_alu(build, nir_op_b8all_iequal4, src0, src1, NULL, NULL);
347 }
348 static inline nir_ssa_def *
nir_b8all_iequal8(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)349 nir_b8all_iequal8(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
350 {
351 return nir_build_alu(build, nir_op_b8all_iequal8, src0, src1, NULL, NULL);
352 }
353 static inline nir_ssa_def *
nir_b8any_fnequal16(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)354 nir_b8any_fnequal16(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
355 {
356 return nir_build_alu(build, nir_op_b8any_fnequal16, src0, src1, NULL, NULL);
357 }
358 static inline nir_ssa_def *
nir_b8any_fnequal2(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)359 nir_b8any_fnequal2(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
360 {
361 return nir_build_alu(build, nir_op_b8any_fnequal2, src0, src1, NULL, NULL);
362 }
363 static inline nir_ssa_def *
nir_b8any_fnequal3(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)364 nir_b8any_fnequal3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
365 {
366 return nir_build_alu(build, nir_op_b8any_fnequal3, src0, src1, NULL, NULL);
367 }
368 static inline nir_ssa_def *
nir_b8any_fnequal4(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)369 nir_b8any_fnequal4(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
370 {
371 return nir_build_alu(build, nir_op_b8any_fnequal4, src0, src1, NULL, NULL);
372 }
373 static inline nir_ssa_def *
nir_b8any_fnequal8(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)374 nir_b8any_fnequal8(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
375 {
376 return nir_build_alu(build, nir_op_b8any_fnequal8, src0, src1, NULL, NULL);
377 }
378 static inline nir_ssa_def *
nir_b8any_inequal16(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)379 nir_b8any_inequal16(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
380 {
381 return nir_build_alu(build, nir_op_b8any_inequal16, src0, src1, NULL, NULL);
382 }
383 static inline nir_ssa_def *
nir_b8any_inequal2(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)384 nir_b8any_inequal2(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
385 {
386 return nir_build_alu(build, nir_op_b8any_inequal2, src0, src1, NULL, NULL);
387 }
388 static inline nir_ssa_def *
nir_b8any_inequal3(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)389 nir_b8any_inequal3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
390 {
391 return nir_build_alu(build, nir_op_b8any_inequal3, src0, src1, NULL, NULL);
392 }
393 static inline nir_ssa_def *
nir_b8any_inequal4(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)394 nir_b8any_inequal4(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
395 {
396 return nir_build_alu(build, nir_op_b8any_inequal4, src0, src1, NULL, NULL);
397 }
398 static inline nir_ssa_def *
nir_b8any_inequal8(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)399 nir_b8any_inequal8(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
400 {
401 return nir_build_alu(build, nir_op_b8any_inequal8, src0, src1, NULL, NULL);
402 }
403 static inline nir_ssa_def *
nir_b8csel(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1,nir_ssa_def * src2)404 nir_b8csel(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
405 {
406 return nir_build_alu(build, nir_op_b8csel, src0, src1, src2, NULL);
407 }
408 static inline nir_ssa_def *
nir_ball_fequal16(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)409 nir_ball_fequal16(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
410 {
411 return nir_build_alu(build, nir_op_ball_fequal16, src0, src1, NULL, NULL);
412 }
413 static inline nir_ssa_def *
nir_ball_fequal2(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)414 nir_ball_fequal2(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
415 {
416 return nir_build_alu(build, nir_op_ball_fequal2, src0, src1, NULL, NULL);
417 }
418 static inline nir_ssa_def *
nir_ball_fequal3(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)419 nir_ball_fequal3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
420 {
421 return nir_build_alu(build, nir_op_ball_fequal3, src0, src1, NULL, NULL);
422 }
423 static inline nir_ssa_def *
nir_ball_fequal4(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)424 nir_ball_fequal4(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
425 {
426 return nir_build_alu(build, nir_op_ball_fequal4, src0, src1, NULL, NULL);
427 }
428 static inline nir_ssa_def *
nir_ball_fequal8(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)429 nir_ball_fequal8(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
430 {
431 return nir_build_alu(build, nir_op_ball_fequal8, src0, src1, NULL, NULL);
432 }
433 static inline nir_ssa_def *
nir_ball_iequal16(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)434 nir_ball_iequal16(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
435 {
436 return nir_build_alu(build, nir_op_ball_iequal16, src0, src1, NULL, NULL);
437 }
438 static inline nir_ssa_def *
nir_ball_iequal2(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)439 nir_ball_iequal2(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
440 {
441 return nir_build_alu(build, nir_op_ball_iequal2, src0, src1, NULL, NULL);
442 }
443 static inline nir_ssa_def *
nir_ball_iequal3(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)444 nir_ball_iequal3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
445 {
446 return nir_build_alu(build, nir_op_ball_iequal3, src0, src1, NULL, NULL);
447 }
448 static inline nir_ssa_def *
nir_ball_iequal4(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)449 nir_ball_iequal4(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
450 {
451 return nir_build_alu(build, nir_op_ball_iequal4, src0, src1, NULL, NULL);
452 }
453 static inline nir_ssa_def *
nir_ball_iequal8(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)454 nir_ball_iequal8(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
455 {
456 return nir_build_alu(build, nir_op_ball_iequal8, src0, src1, NULL, NULL);
457 }
458 static inline nir_ssa_def *
nir_bany_fnequal16(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)459 nir_bany_fnequal16(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
460 {
461 return nir_build_alu(build, nir_op_bany_fnequal16, src0, src1, NULL, NULL);
462 }
463 static inline nir_ssa_def *
nir_bany_fnequal2(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)464 nir_bany_fnequal2(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
465 {
466 return nir_build_alu(build, nir_op_bany_fnequal2, src0, src1, NULL, NULL);
467 }
468 static inline nir_ssa_def *
nir_bany_fnequal3(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)469 nir_bany_fnequal3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
470 {
471 return nir_build_alu(build, nir_op_bany_fnequal3, src0, src1, NULL, NULL);
472 }
473 static inline nir_ssa_def *
nir_bany_fnequal4(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)474 nir_bany_fnequal4(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
475 {
476 return nir_build_alu(build, nir_op_bany_fnequal4, src0, src1, NULL, NULL);
477 }
478 static inline nir_ssa_def *
nir_bany_fnequal8(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)479 nir_bany_fnequal8(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
480 {
481 return nir_build_alu(build, nir_op_bany_fnequal8, src0, src1, NULL, NULL);
482 }
483 static inline nir_ssa_def *
nir_bany_inequal16(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)484 nir_bany_inequal16(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
485 {
486 return nir_build_alu(build, nir_op_bany_inequal16, src0, src1, NULL, NULL);
487 }
488 static inline nir_ssa_def *
nir_bany_inequal2(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)489 nir_bany_inequal2(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
490 {
491 return nir_build_alu(build, nir_op_bany_inequal2, src0, src1, NULL, NULL);
492 }
493 static inline nir_ssa_def *
nir_bany_inequal3(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)494 nir_bany_inequal3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
495 {
496 return nir_build_alu(build, nir_op_bany_inequal3, src0, src1, NULL, NULL);
497 }
498 static inline nir_ssa_def *
nir_bany_inequal4(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)499 nir_bany_inequal4(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
500 {
501 return nir_build_alu(build, nir_op_bany_inequal4, src0, src1, NULL, NULL);
502 }
503 static inline nir_ssa_def *
nir_bany_inequal8(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)504 nir_bany_inequal8(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
505 {
506 return nir_build_alu(build, nir_op_bany_inequal8, src0, src1, NULL, NULL);
507 }
508 static inline nir_ssa_def *
nir_bcsel(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1,nir_ssa_def * src2)509 nir_bcsel(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
510 {
511 return nir_build_alu(build, nir_op_bcsel, src0, src1, src2, NULL);
512 }
513 static inline nir_ssa_def *
nir_bfi(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1,nir_ssa_def * src2)514 nir_bfi(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
515 {
516 return nir_build_alu(build, nir_op_bfi, src0, src1, src2, NULL);
517 }
518 static inline nir_ssa_def *
nir_bfm(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)519 nir_bfm(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
520 {
521 return nir_build_alu(build, nir_op_bfm, src0, src1, NULL, NULL);
522 }
523 static inline nir_ssa_def *
nir_bit_count(nir_builder * build,nir_ssa_def * src0)524 nir_bit_count(nir_builder *build, nir_ssa_def *src0)
525 {
526 return nir_build_alu(build, nir_op_bit_count, src0, NULL, NULL, NULL);
527 }
528 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)529 nir_bitfield_insert(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2, nir_ssa_def *src3)
530 {
531 return nir_build_alu(build, nir_op_bitfield_insert, src0, src1, src2, src3);
532 }
533 static inline nir_ssa_def *
nir_bitfield_reverse(nir_builder * build,nir_ssa_def * src0)534 nir_bitfield_reverse(nir_builder *build, nir_ssa_def *src0)
535 {
536 return nir_build_alu(build, nir_op_bitfield_reverse, src0, NULL, NULL, NULL);
537 }
538 static inline nir_ssa_def *
nir_bitfield_select(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1,nir_ssa_def * src2)539 nir_bitfield_select(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
540 {
541 return nir_build_alu(build, nir_op_bitfield_select, src0, src1, src2, NULL);
542 }
543 static inline nir_ssa_def *
nir_cube_face_coord(nir_builder * build,nir_ssa_def * src0)544 nir_cube_face_coord(nir_builder *build, nir_ssa_def *src0)
545 {
546 return nir_build_alu(build, nir_op_cube_face_coord, src0, NULL, NULL, NULL);
547 }
548 static inline nir_ssa_def *
nir_cube_face_index(nir_builder * build,nir_ssa_def * src0)549 nir_cube_face_index(nir_builder *build, nir_ssa_def *src0)
550 {
551 return nir_build_alu(build, nir_op_cube_face_index, src0, NULL, NULL, NULL);
552 }
553 static inline nir_ssa_def *
nir_extract_i16(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)554 nir_extract_i16(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
555 {
556 return nir_build_alu(build, nir_op_extract_i16, src0, src1, NULL, NULL);
557 }
558 static inline nir_ssa_def *
nir_extract_i8(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)559 nir_extract_i8(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
560 {
561 return nir_build_alu(build, nir_op_extract_i8, src0, src1, NULL, NULL);
562 }
563 static inline nir_ssa_def *
nir_extract_u16(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)564 nir_extract_u16(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
565 {
566 return nir_build_alu(build, nir_op_extract_u16, src0, src1, NULL, NULL);
567 }
568 static inline nir_ssa_def *
nir_extract_u8(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)569 nir_extract_u8(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
570 {
571 return nir_build_alu(build, nir_op_extract_u8, src0, src1, NULL, NULL);
572 }
573 static inline nir_ssa_def *
nir_f2b1(nir_builder * build,nir_ssa_def * src0)574 nir_f2b1(nir_builder *build, nir_ssa_def *src0)
575 {
576 return nir_build_alu(build, nir_op_f2b1, src0, NULL, NULL, NULL);
577 }
578 static inline nir_ssa_def *
nir_f2b16(nir_builder * build,nir_ssa_def * src0)579 nir_f2b16(nir_builder *build, nir_ssa_def *src0)
580 {
581 return nir_build_alu(build, nir_op_f2b16, src0, NULL, NULL, NULL);
582 }
583 static inline nir_ssa_def *
nir_f2b32(nir_builder * build,nir_ssa_def * src0)584 nir_f2b32(nir_builder *build, nir_ssa_def *src0)
585 {
586 return nir_build_alu(build, nir_op_f2b32, src0, NULL, NULL, NULL);
587 }
588 static inline nir_ssa_def *
nir_f2b8(nir_builder * build,nir_ssa_def * src0)589 nir_f2b8(nir_builder *build, nir_ssa_def *src0)
590 {
591 return nir_build_alu(build, nir_op_f2b8, src0, NULL, NULL, NULL);
592 }
593 static inline nir_ssa_def *
nir_f2f16(nir_builder * build,nir_ssa_def * src0)594 nir_f2f16(nir_builder *build, nir_ssa_def *src0)
595 {
596 return nir_build_alu(build, nir_op_f2f16, src0, NULL, NULL, NULL);
597 }
598 static inline nir_ssa_def *
nir_f2f16_rtne(nir_builder * build,nir_ssa_def * src0)599 nir_f2f16_rtne(nir_builder *build, nir_ssa_def *src0)
600 {
601 return nir_build_alu(build, nir_op_f2f16_rtne, src0, NULL, NULL, NULL);
602 }
603 static inline nir_ssa_def *
nir_f2f16_rtz(nir_builder * build,nir_ssa_def * src0)604 nir_f2f16_rtz(nir_builder *build, nir_ssa_def *src0)
605 {
606 return nir_build_alu(build, nir_op_f2f16_rtz, src0, NULL, NULL, NULL);
607 }
608 static inline nir_ssa_def *
nir_f2f32(nir_builder * build,nir_ssa_def * src0)609 nir_f2f32(nir_builder *build, nir_ssa_def *src0)
610 {
611 return nir_build_alu(build, nir_op_f2f32, src0, NULL, NULL, NULL);
612 }
613 static inline nir_ssa_def *
nir_f2f64(nir_builder * build,nir_ssa_def * src0)614 nir_f2f64(nir_builder *build, nir_ssa_def *src0)
615 {
616 return nir_build_alu(build, nir_op_f2f64, src0, NULL, NULL, NULL);
617 }
618 static inline nir_ssa_def *
nir_f2fmp(nir_builder * build,nir_ssa_def * src0)619 nir_f2fmp(nir_builder *build, nir_ssa_def *src0)
620 {
621 return nir_build_alu(build, nir_op_f2fmp, src0, NULL, NULL, NULL);
622 }
623 static inline nir_ssa_def *
nir_f2i1(nir_builder * build,nir_ssa_def * src0)624 nir_f2i1(nir_builder *build, nir_ssa_def *src0)
625 {
626 return nir_build_alu(build, nir_op_f2i1, src0, NULL, NULL, NULL);
627 }
628 static inline nir_ssa_def *
nir_f2i16(nir_builder * build,nir_ssa_def * src0)629 nir_f2i16(nir_builder *build, nir_ssa_def *src0)
630 {
631 return nir_build_alu(build, nir_op_f2i16, src0, NULL, NULL, NULL);
632 }
633 static inline nir_ssa_def *
nir_f2i32(nir_builder * build,nir_ssa_def * src0)634 nir_f2i32(nir_builder *build, nir_ssa_def *src0)
635 {
636 return nir_build_alu(build, nir_op_f2i32, src0, NULL, NULL, NULL);
637 }
638 static inline nir_ssa_def *
nir_f2i64(nir_builder * build,nir_ssa_def * src0)639 nir_f2i64(nir_builder *build, nir_ssa_def *src0)
640 {
641 return nir_build_alu(build, nir_op_f2i64, src0, NULL, NULL, NULL);
642 }
643 static inline nir_ssa_def *
nir_f2i8(nir_builder * build,nir_ssa_def * src0)644 nir_f2i8(nir_builder *build, nir_ssa_def *src0)
645 {
646 return nir_build_alu(build, nir_op_f2i8, src0, NULL, NULL, NULL);
647 }
648 static inline nir_ssa_def *
nir_f2imp(nir_builder * build,nir_ssa_def * src0)649 nir_f2imp(nir_builder *build, nir_ssa_def *src0)
650 {
651 return nir_build_alu(build, nir_op_f2imp, src0, NULL, NULL, NULL);
652 }
653 static inline nir_ssa_def *
nir_f2u1(nir_builder * build,nir_ssa_def * src0)654 nir_f2u1(nir_builder *build, nir_ssa_def *src0)
655 {
656 return nir_build_alu(build, nir_op_f2u1, src0, NULL, NULL, NULL);
657 }
658 static inline nir_ssa_def *
nir_f2u16(nir_builder * build,nir_ssa_def * src0)659 nir_f2u16(nir_builder *build, nir_ssa_def *src0)
660 {
661 return nir_build_alu(build, nir_op_f2u16, src0, NULL, NULL, NULL);
662 }
663 static inline nir_ssa_def *
nir_f2u32(nir_builder * build,nir_ssa_def * src0)664 nir_f2u32(nir_builder *build, nir_ssa_def *src0)
665 {
666 return nir_build_alu(build, nir_op_f2u32, src0, NULL, NULL, NULL);
667 }
668 static inline nir_ssa_def *
nir_f2u64(nir_builder * build,nir_ssa_def * src0)669 nir_f2u64(nir_builder *build, nir_ssa_def *src0)
670 {
671 return nir_build_alu(build, nir_op_f2u64, src0, NULL, NULL, NULL);
672 }
673 static inline nir_ssa_def *
nir_f2u8(nir_builder * build,nir_ssa_def * src0)674 nir_f2u8(nir_builder *build, nir_ssa_def *src0)
675 {
676 return nir_build_alu(build, nir_op_f2u8, src0, NULL, NULL, NULL);
677 }
678 static inline nir_ssa_def *
nir_f2ump(nir_builder * build,nir_ssa_def * src0)679 nir_f2ump(nir_builder *build, nir_ssa_def *src0)
680 {
681 return nir_build_alu(build, nir_op_f2ump, src0, NULL, NULL, NULL);
682 }
683 static inline nir_ssa_def *
nir_fabs(nir_builder * build,nir_ssa_def * src0)684 nir_fabs(nir_builder *build, nir_ssa_def *src0)
685 {
686 return nir_build_alu(build, nir_op_fabs, src0, NULL, NULL, NULL);
687 }
688 static inline nir_ssa_def *
nir_fadd(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)689 nir_fadd(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
690 {
691 return nir_build_alu(build, nir_op_fadd, src0, src1, NULL, NULL);
692 }
693 static inline nir_ssa_def *
nir_fall_equal16(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)694 nir_fall_equal16(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
695 {
696 return nir_build_alu(build, nir_op_fall_equal16, src0, src1, NULL, NULL);
697 }
698 static inline nir_ssa_def *
nir_fall_equal2(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)699 nir_fall_equal2(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
700 {
701 return nir_build_alu(build, nir_op_fall_equal2, src0, src1, NULL, NULL);
702 }
703 static inline nir_ssa_def *
nir_fall_equal3(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)704 nir_fall_equal3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
705 {
706 return nir_build_alu(build, nir_op_fall_equal3, src0, src1, NULL, NULL);
707 }
708 static inline nir_ssa_def *
nir_fall_equal4(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)709 nir_fall_equal4(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
710 {
711 return nir_build_alu(build, nir_op_fall_equal4, src0, src1, NULL, NULL);
712 }
713 static inline nir_ssa_def *
nir_fall_equal8(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)714 nir_fall_equal8(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
715 {
716 return nir_build_alu(build, nir_op_fall_equal8, src0, src1, NULL, NULL);
717 }
718 static inline nir_ssa_def *
nir_fany_nequal16(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)719 nir_fany_nequal16(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
720 {
721 return nir_build_alu(build, nir_op_fany_nequal16, src0, src1, NULL, NULL);
722 }
723 static inline nir_ssa_def *
nir_fany_nequal2(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)724 nir_fany_nequal2(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
725 {
726 return nir_build_alu(build, nir_op_fany_nequal2, src0, src1, NULL, NULL);
727 }
728 static inline nir_ssa_def *
nir_fany_nequal3(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)729 nir_fany_nequal3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
730 {
731 return nir_build_alu(build, nir_op_fany_nequal3, src0, src1, NULL, NULL);
732 }
733 static inline nir_ssa_def *
nir_fany_nequal4(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)734 nir_fany_nequal4(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
735 {
736 return nir_build_alu(build, nir_op_fany_nequal4, src0, src1, NULL, NULL);
737 }
738 static inline nir_ssa_def *
nir_fany_nequal8(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)739 nir_fany_nequal8(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
740 {
741 return nir_build_alu(build, nir_op_fany_nequal8, src0, src1, NULL, NULL);
742 }
743 static inline nir_ssa_def *
nir_fceil(nir_builder * build,nir_ssa_def * src0)744 nir_fceil(nir_builder *build, nir_ssa_def *src0)
745 {
746 return nir_build_alu(build, nir_op_fceil, src0, NULL, NULL, NULL);
747 }
748 static inline nir_ssa_def *
nir_fclamp_pos(nir_builder * build,nir_ssa_def * src0)749 nir_fclamp_pos(nir_builder *build, nir_ssa_def *src0)
750 {
751 return nir_build_alu(build, nir_op_fclamp_pos, src0, NULL, NULL, NULL);
752 }
753 static inline nir_ssa_def *
nir_fcos(nir_builder * build,nir_ssa_def * src0)754 nir_fcos(nir_builder *build, nir_ssa_def *src0)
755 {
756 return nir_build_alu(build, nir_op_fcos, src0, NULL, NULL, NULL);
757 }
758 static inline nir_ssa_def *
nir_fcsel(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1,nir_ssa_def * src2)759 nir_fcsel(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
760 {
761 return nir_build_alu(build, nir_op_fcsel, src0, src1, src2, NULL);
762 }
763 static inline nir_ssa_def *
nir_fddx(nir_builder * build,nir_ssa_def * src0)764 nir_fddx(nir_builder *build, nir_ssa_def *src0)
765 {
766 return nir_build_alu(build, nir_op_fddx, src0, NULL, NULL, NULL);
767 }
768 static inline nir_ssa_def *
nir_fddx_coarse(nir_builder * build,nir_ssa_def * src0)769 nir_fddx_coarse(nir_builder *build, nir_ssa_def *src0)
770 {
771 return nir_build_alu(build, nir_op_fddx_coarse, src0, NULL, NULL, NULL);
772 }
773 static inline nir_ssa_def *
nir_fddx_fine(nir_builder * build,nir_ssa_def * src0)774 nir_fddx_fine(nir_builder *build, nir_ssa_def *src0)
775 {
776 return nir_build_alu(build, nir_op_fddx_fine, src0, NULL, NULL, NULL);
777 }
778 static inline nir_ssa_def *
nir_fddy(nir_builder * build,nir_ssa_def * src0)779 nir_fddy(nir_builder *build, nir_ssa_def *src0)
780 {
781 return nir_build_alu(build, nir_op_fddy, src0, NULL, NULL, NULL);
782 }
783 static inline nir_ssa_def *
nir_fddy_coarse(nir_builder * build,nir_ssa_def * src0)784 nir_fddy_coarse(nir_builder *build, nir_ssa_def *src0)
785 {
786 return nir_build_alu(build, nir_op_fddy_coarse, src0, NULL, NULL, NULL);
787 }
788 static inline nir_ssa_def *
nir_fddy_fine(nir_builder * build,nir_ssa_def * src0)789 nir_fddy_fine(nir_builder *build, nir_ssa_def *src0)
790 {
791 return nir_build_alu(build, nir_op_fddy_fine, src0, NULL, NULL, NULL);
792 }
793 static inline nir_ssa_def *
nir_fdiv(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)794 nir_fdiv(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
795 {
796 return nir_build_alu(build, nir_op_fdiv, src0, src1, NULL, NULL);
797 }
798 static inline nir_ssa_def *
nir_fdot16(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)799 nir_fdot16(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
800 {
801 return nir_build_alu(build, nir_op_fdot16, src0, src1, NULL, NULL);
802 }
803 static inline nir_ssa_def *
nir_fdot16_replicated(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)804 nir_fdot16_replicated(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
805 {
806 return nir_build_alu(build, nir_op_fdot16_replicated, src0, src1, NULL, NULL);
807 }
808 static inline nir_ssa_def *
nir_fdot2(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)809 nir_fdot2(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
810 {
811 return nir_build_alu(build, nir_op_fdot2, src0, src1, NULL, NULL);
812 }
813 static inline nir_ssa_def *
nir_fdot2_replicated(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)814 nir_fdot2_replicated(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
815 {
816 return nir_build_alu(build, nir_op_fdot2_replicated, src0, src1, NULL, NULL);
817 }
818 static inline nir_ssa_def *
nir_fdot3(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)819 nir_fdot3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
820 {
821 return nir_build_alu(build, nir_op_fdot3, src0, src1, NULL, NULL);
822 }
823 static inline nir_ssa_def *
nir_fdot3_replicated(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)824 nir_fdot3_replicated(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
825 {
826 return nir_build_alu(build, nir_op_fdot3_replicated, src0, src1, NULL, NULL);
827 }
828 static inline nir_ssa_def *
nir_fdot4(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)829 nir_fdot4(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
830 {
831 return nir_build_alu(build, nir_op_fdot4, src0, src1, NULL, NULL);
832 }
833 static inline nir_ssa_def *
nir_fdot4_replicated(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)834 nir_fdot4_replicated(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
835 {
836 return nir_build_alu(build, nir_op_fdot4_replicated, src0, src1, NULL, NULL);
837 }
838 static inline nir_ssa_def *
nir_fdot8(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)839 nir_fdot8(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
840 {
841 return nir_build_alu(build, nir_op_fdot8, src0, src1, NULL, NULL);
842 }
843 static inline nir_ssa_def *
nir_fdot8_replicated(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)844 nir_fdot8_replicated(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
845 {
846 return nir_build_alu(build, nir_op_fdot8_replicated, src0, src1, NULL, NULL);
847 }
848 static inline nir_ssa_def *
nir_fdph(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)849 nir_fdph(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
850 {
851 return nir_build_alu(build, nir_op_fdph, src0, src1, NULL, NULL);
852 }
853 static inline nir_ssa_def *
nir_fdph_replicated(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)854 nir_fdph_replicated(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
855 {
856 return nir_build_alu(build, nir_op_fdph_replicated, src0, src1, NULL, NULL);
857 }
858 static inline nir_ssa_def *
nir_feq(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)859 nir_feq(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
860 {
861 return nir_build_alu(build, nir_op_feq, src0, src1, NULL, NULL);
862 }
863 static inline nir_ssa_def *
nir_feq16(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)864 nir_feq16(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
865 {
866 return nir_build_alu(build, nir_op_feq16, src0, src1, NULL, NULL);
867 }
868 static inline nir_ssa_def *
nir_feq32(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)869 nir_feq32(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
870 {
871 return nir_build_alu(build, nir_op_feq32, src0, src1, NULL, NULL);
872 }
873 static inline nir_ssa_def *
nir_feq8(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)874 nir_feq8(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
875 {
876 return nir_build_alu(build, nir_op_feq8, src0, src1, NULL, NULL);
877 }
878 static inline nir_ssa_def *
nir_fexp2(nir_builder * build,nir_ssa_def * src0)879 nir_fexp2(nir_builder *build, nir_ssa_def *src0)
880 {
881 return nir_build_alu(build, nir_op_fexp2, src0, NULL, NULL, NULL);
882 }
883 static inline nir_ssa_def *
nir_ffloor(nir_builder * build,nir_ssa_def * src0)884 nir_ffloor(nir_builder *build, nir_ssa_def *src0)
885 {
886 return nir_build_alu(build, nir_op_ffloor, src0, NULL, NULL, NULL);
887 }
888 static inline nir_ssa_def *
nir_ffma(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1,nir_ssa_def * src2)889 nir_ffma(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
890 {
891 return nir_build_alu(build, nir_op_ffma, src0, src1, src2, NULL);
892 }
893 static inline nir_ssa_def *
nir_ffract(nir_builder * build,nir_ssa_def * src0)894 nir_ffract(nir_builder *build, nir_ssa_def *src0)
895 {
896 return nir_build_alu(build, nir_op_ffract, src0, NULL, NULL, NULL);
897 }
898 static inline nir_ssa_def *
nir_fge(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)899 nir_fge(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
900 {
901 return nir_build_alu(build, nir_op_fge, src0, src1, NULL, NULL);
902 }
903 static inline nir_ssa_def *
nir_fge16(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)904 nir_fge16(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
905 {
906 return nir_build_alu(build, nir_op_fge16, src0, src1, NULL, NULL);
907 }
908 static inline nir_ssa_def *
nir_fge32(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)909 nir_fge32(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
910 {
911 return nir_build_alu(build, nir_op_fge32, src0, src1, NULL, NULL);
912 }
913 static inline nir_ssa_def *
nir_fge8(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)914 nir_fge8(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
915 {
916 return nir_build_alu(build, nir_op_fge8, src0, src1, NULL, NULL);
917 }
918 static inline nir_ssa_def *
nir_find_lsb(nir_builder * build,nir_ssa_def * src0)919 nir_find_lsb(nir_builder *build, nir_ssa_def *src0)
920 {
921 return nir_build_alu(build, nir_op_find_lsb, src0, NULL, NULL, NULL);
922 }
923 static inline nir_ssa_def *
nir_fisfinite(nir_builder * build,nir_ssa_def * src0)924 nir_fisfinite(nir_builder *build, nir_ssa_def *src0)
925 {
926 return nir_build_alu(build, nir_op_fisfinite, src0, NULL, NULL, NULL);
927 }
928 static inline nir_ssa_def *
nir_fisnormal(nir_builder * build,nir_ssa_def * src0)929 nir_fisnormal(nir_builder *build, nir_ssa_def *src0)
930 {
931 return nir_build_alu(build, nir_op_fisnormal, src0, NULL, NULL, NULL);
932 }
933 static inline nir_ssa_def *
nir_flog2(nir_builder * build,nir_ssa_def * src0)934 nir_flog2(nir_builder *build, nir_ssa_def *src0)
935 {
936 return nir_build_alu(build, nir_op_flog2, src0, NULL, NULL, NULL);
937 }
938 static inline nir_ssa_def *
nir_flrp(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1,nir_ssa_def * src2)939 nir_flrp(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
940 {
941 return nir_build_alu(build, nir_op_flrp, src0, src1, src2, NULL);
942 }
943 static inline nir_ssa_def *
nir_flt(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)944 nir_flt(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
945 {
946 return nir_build_alu(build, nir_op_flt, src0, src1, NULL, NULL);
947 }
948 static inline nir_ssa_def *
nir_flt16(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)949 nir_flt16(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
950 {
951 return nir_build_alu(build, nir_op_flt16, src0, src1, NULL, NULL);
952 }
953 static inline nir_ssa_def *
nir_flt32(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)954 nir_flt32(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
955 {
956 return nir_build_alu(build, nir_op_flt32, src0, src1, NULL, NULL);
957 }
958 static inline nir_ssa_def *
nir_flt8(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)959 nir_flt8(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
960 {
961 return nir_build_alu(build, nir_op_flt8, src0, src1, NULL, NULL);
962 }
963 static inline nir_ssa_def *
nir_fmax(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)964 nir_fmax(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
965 {
966 return nir_build_alu(build, nir_op_fmax, src0, src1, NULL, NULL);
967 }
968 static inline nir_ssa_def *
nir_fmin(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)969 nir_fmin(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
970 {
971 return nir_build_alu(build, nir_op_fmin, src0, src1, NULL, NULL);
972 }
973 static inline nir_ssa_def *
nir_fmod(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)974 nir_fmod(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
975 {
976 return nir_build_alu(build, nir_op_fmod, src0, src1, NULL, NULL);
977 }
978 static inline nir_ssa_def *
nir_fmul(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)979 nir_fmul(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
980 {
981 return nir_build_alu(build, nir_op_fmul, src0, src1, NULL, NULL);
982 }
983 static inline nir_ssa_def *
nir_fneg(nir_builder * build,nir_ssa_def * src0)984 nir_fneg(nir_builder *build, nir_ssa_def *src0)
985 {
986 return nir_build_alu(build, nir_op_fneg, src0, NULL, NULL, NULL);
987 }
988 static inline nir_ssa_def *
nir_fneu(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)989 nir_fneu(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
990 {
991 return nir_build_alu(build, nir_op_fneu, src0, src1, NULL, NULL);
992 }
993 static inline nir_ssa_def *
nir_fneu16(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)994 nir_fneu16(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
995 {
996 return nir_build_alu(build, nir_op_fneu16, src0, src1, NULL, NULL);
997 }
998 static inline nir_ssa_def *
nir_fneu32(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)999 nir_fneu32(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1000 {
1001 return nir_build_alu(build, nir_op_fneu32, src0, src1, NULL, NULL);
1002 }
1003 static inline nir_ssa_def *
nir_fneu8(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1004 nir_fneu8(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1005 {
1006 return nir_build_alu(build, nir_op_fneu8, src0, src1, NULL, NULL);
1007 }
1008 static inline nir_ssa_def *
nir_fpow(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1009 nir_fpow(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1010 {
1011 return nir_build_alu(build, nir_op_fpow, src0, src1, NULL, NULL);
1012 }
1013 static inline nir_ssa_def *
nir_fquantize2f16(nir_builder * build,nir_ssa_def * src0)1014 nir_fquantize2f16(nir_builder *build, nir_ssa_def *src0)
1015 {
1016 return nir_build_alu(build, nir_op_fquantize2f16, src0, NULL, NULL, NULL);
1017 }
1018 static inline nir_ssa_def *
nir_frcp(nir_builder * build,nir_ssa_def * src0)1019 nir_frcp(nir_builder *build, nir_ssa_def *src0)
1020 {
1021 return nir_build_alu(build, nir_op_frcp, src0, NULL, NULL, NULL);
1022 }
1023 static inline nir_ssa_def *
nir_frem(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1024 nir_frem(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1025 {
1026 return nir_build_alu(build, nir_op_frem, src0, src1, NULL, NULL);
1027 }
1028 static inline nir_ssa_def *
nir_frexp_exp(nir_builder * build,nir_ssa_def * src0)1029 nir_frexp_exp(nir_builder *build, nir_ssa_def *src0)
1030 {
1031 return nir_build_alu(build, nir_op_frexp_exp, src0, NULL, NULL, NULL);
1032 }
1033 static inline nir_ssa_def *
nir_frexp_sig(nir_builder * build,nir_ssa_def * src0)1034 nir_frexp_sig(nir_builder *build, nir_ssa_def *src0)
1035 {
1036 return nir_build_alu(build, nir_op_frexp_sig, src0, NULL, NULL, NULL);
1037 }
1038 static inline nir_ssa_def *
nir_fround_even(nir_builder * build,nir_ssa_def * src0)1039 nir_fround_even(nir_builder *build, nir_ssa_def *src0)
1040 {
1041 return nir_build_alu(build, nir_op_fround_even, src0, NULL, NULL, NULL);
1042 }
1043 static inline nir_ssa_def *
nir_frsq(nir_builder * build,nir_ssa_def * src0)1044 nir_frsq(nir_builder *build, nir_ssa_def *src0)
1045 {
1046 return nir_build_alu(build, nir_op_frsq, src0, NULL, NULL, NULL);
1047 }
1048 static inline nir_ssa_def *
nir_fsat(nir_builder * build,nir_ssa_def * src0)1049 nir_fsat(nir_builder *build, nir_ssa_def *src0)
1050 {
1051 return nir_build_alu(build, nir_op_fsat, src0, NULL, NULL, NULL);
1052 }
1053 static inline nir_ssa_def *
nir_fsat_signed(nir_builder * build,nir_ssa_def * src0)1054 nir_fsat_signed(nir_builder *build, nir_ssa_def *src0)
1055 {
1056 return nir_build_alu(build, nir_op_fsat_signed, src0, NULL, NULL, NULL);
1057 }
1058 static inline nir_ssa_def *
nir_fsign(nir_builder * build,nir_ssa_def * src0)1059 nir_fsign(nir_builder *build, nir_ssa_def *src0)
1060 {
1061 return nir_build_alu(build, nir_op_fsign, src0, NULL, NULL, NULL);
1062 }
1063 static inline nir_ssa_def *
nir_fsin(nir_builder * build,nir_ssa_def * src0)1064 nir_fsin(nir_builder *build, nir_ssa_def *src0)
1065 {
1066 return nir_build_alu(build, nir_op_fsin, src0, NULL, NULL, NULL);
1067 }
1068 static inline nir_ssa_def *
nir_fsqrt(nir_builder * build,nir_ssa_def * src0)1069 nir_fsqrt(nir_builder *build, nir_ssa_def *src0)
1070 {
1071 return nir_build_alu(build, nir_op_fsqrt, src0, NULL, NULL, NULL);
1072 }
1073 static inline nir_ssa_def *
nir_fsub(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1074 nir_fsub(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1075 {
1076 return nir_build_alu(build, nir_op_fsub, src0, src1, NULL, NULL);
1077 }
1078 static inline nir_ssa_def *
nir_fsum2(nir_builder * build,nir_ssa_def * src0)1079 nir_fsum2(nir_builder *build, nir_ssa_def *src0)
1080 {
1081 return nir_build_alu(build, nir_op_fsum2, src0, NULL, NULL, NULL);
1082 }
1083 static inline nir_ssa_def *
nir_fsum3(nir_builder * build,nir_ssa_def * src0)1084 nir_fsum3(nir_builder *build, nir_ssa_def *src0)
1085 {
1086 return nir_build_alu(build, nir_op_fsum3, src0, NULL, NULL, NULL);
1087 }
1088 static inline nir_ssa_def *
nir_fsum4(nir_builder * build,nir_ssa_def * src0)1089 nir_fsum4(nir_builder *build, nir_ssa_def *src0)
1090 {
1091 return nir_build_alu(build, nir_op_fsum4, src0, NULL, NULL, NULL);
1092 }
1093 static inline nir_ssa_def *
nir_ftrunc(nir_builder * build,nir_ssa_def * src0)1094 nir_ftrunc(nir_builder *build, nir_ssa_def *src0)
1095 {
1096 return nir_build_alu(build, nir_op_ftrunc, src0, NULL, NULL, NULL);
1097 }
1098 static inline nir_ssa_def *
nir_i2b1(nir_builder * build,nir_ssa_def * src0)1099 nir_i2b1(nir_builder *build, nir_ssa_def *src0)
1100 {
1101 return nir_build_alu(build, nir_op_i2b1, src0, NULL, NULL, NULL);
1102 }
1103 static inline nir_ssa_def *
nir_i2b16(nir_builder * build,nir_ssa_def * src0)1104 nir_i2b16(nir_builder *build, nir_ssa_def *src0)
1105 {
1106 return nir_build_alu(build, nir_op_i2b16, src0, NULL, NULL, NULL);
1107 }
1108 static inline nir_ssa_def *
nir_i2b32(nir_builder * build,nir_ssa_def * src0)1109 nir_i2b32(nir_builder *build, nir_ssa_def *src0)
1110 {
1111 return nir_build_alu(build, nir_op_i2b32, src0, NULL, NULL, NULL);
1112 }
1113 static inline nir_ssa_def *
nir_i2b8(nir_builder * build,nir_ssa_def * src0)1114 nir_i2b8(nir_builder *build, nir_ssa_def *src0)
1115 {
1116 return nir_build_alu(build, nir_op_i2b8, src0, NULL, NULL, NULL);
1117 }
1118 static inline nir_ssa_def *
nir_i2f16(nir_builder * build,nir_ssa_def * src0)1119 nir_i2f16(nir_builder *build, nir_ssa_def *src0)
1120 {
1121 return nir_build_alu(build, nir_op_i2f16, src0, NULL, NULL, NULL);
1122 }
1123 static inline nir_ssa_def *
nir_i2f32(nir_builder * build,nir_ssa_def * src0)1124 nir_i2f32(nir_builder *build, nir_ssa_def *src0)
1125 {
1126 return nir_build_alu(build, nir_op_i2f32, src0, NULL, NULL, NULL);
1127 }
1128 static inline nir_ssa_def *
nir_i2f64(nir_builder * build,nir_ssa_def * src0)1129 nir_i2f64(nir_builder *build, nir_ssa_def *src0)
1130 {
1131 return nir_build_alu(build, nir_op_i2f64, src0, NULL, NULL, NULL);
1132 }
1133 static inline nir_ssa_def *
nir_i2fmp(nir_builder * build,nir_ssa_def * src0)1134 nir_i2fmp(nir_builder *build, nir_ssa_def *src0)
1135 {
1136 return nir_build_alu(build, nir_op_i2fmp, src0, NULL, NULL, NULL);
1137 }
1138 static inline nir_ssa_def *
nir_i2i1(nir_builder * build,nir_ssa_def * src0)1139 nir_i2i1(nir_builder *build, nir_ssa_def *src0)
1140 {
1141 return nir_build_alu(build, nir_op_i2i1, src0, NULL, NULL, NULL);
1142 }
1143 static inline nir_ssa_def *
nir_i2i16(nir_builder * build,nir_ssa_def * src0)1144 nir_i2i16(nir_builder *build, nir_ssa_def *src0)
1145 {
1146 return nir_build_alu(build, nir_op_i2i16, src0, NULL, NULL, NULL);
1147 }
1148 static inline nir_ssa_def *
nir_i2i32(nir_builder * build,nir_ssa_def * src0)1149 nir_i2i32(nir_builder *build, nir_ssa_def *src0)
1150 {
1151 return nir_build_alu(build, nir_op_i2i32, src0, NULL, NULL, NULL);
1152 }
1153 static inline nir_ssa_def *
nir_i2i64(nir_builder * build,nir_ssa_def * src0)1154 nir_i2i64(nir_builder *build, nir_ssa_def *src0)
1155 {
1156 return nir_build_alu(build, nir_op_i2i64, src0, NULL, NULL, NULL);
1157 }
1158 static inline nir_ssa_def *
nir_i2i8(nir_builder * build,nir_ssa_def * src0)1159 nir_i2i8(nir_builder *build, nir_ssa_def *src0)
1160 {
1161 return nir_build_alu(build, nir_op_i2i8, src0, NULL, NULL, NULL);
1162 }
1163 static inline nir_ssa_def *
nir_i2imp(nir_builder * build,nir_ssa_def * src0)1164 nir_i2imp(nir_builder *build, nir_ssa_def *src0)
1165 {
1166 return nir_build_alu(build, nir_op_i2imp, src0, NULL, NULL, NULL);
1167 }
1168 static inline nir_ssa_def *
nir_iabs(nir_builder * build,nir_ssa_def * src0)1169 nir_iabs(nir_builder *build, nir_ssa_def *src0)
1170 {
1171 return nir_build_alu(build, nir_op_iabs, src0, NULL, NULL, NULL);
1172 }
1173 static inline nir_ssa_def *
nir_iadd(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1174 nir_iadd(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1175 {
1176 return nir_build_alu(build, nir_op_iadd, src0, src1, NULL, NULL);
1177 }
1178 static inline nir_ssa_def *
nir_iadd_sat(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1179 nir_iadd_sat(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1180 {
1181 return nir_build_alu(build, nir_op_iadd_sat, src0, src1, NULL, NULL);
1182 }
1183 static inline nir_ssa_def *
nir_iand(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1184 nir_iand(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1185 {
1186 return nir_build_alu(build, nir_op_iand, src0, src1, NULL, NULL);
1187 }
1188 static inline nir_ssa_def *
nir_ibfe(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1,nir_ssa_def * src2)1189 nir_ibfe(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
1190 {
1191 return nir_build_alu(build, nir_op_ibfe, src0, src1, src2, NULL);
1192 }
1193 static inline nir_ssa_def *
nir_ibitfield_extract(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1,nir_ssa_def * src2)1194 nir_ibitfield_extract(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
1195 {
1196 return nir_build_alu(build, nir_op_ibitfield_extract, src0, src1, src2, NULL);
1197 }
1198 static inline nir_ssa_def *
nir_idiv(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1199 nir_idiv(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1200 {
1201 return nir_build_alu(build, nir_op_idiv, src0, src1, NULL, NULL);
1202 }
1203 static inline nir_ssa_def *
nir_ieq(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1204 nir_ieq(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1205 {
1206 return nir_build_alu(build, nir_op_ieq, src0, src1, NULL, NULL);
1207 }
1208 static inline nir_ssa_def *
nir_ieq16(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1209 nir_ieq16(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1210 {
1211 return nir_build_alu(build, nir_op_ieq16, src0, src1, NULL, NULL);
1212 }
1213 static inline nir_ssa_def *
nir_ieq32(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1214 nir_ieq32(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1215 {
1216 return nir_build_alu(build, nir_op_ieq32, src0, src1, NULL, NULL);
1217 }
1218 static inline nir_ssa_def *
nir_ieq8(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1219 nir_ieq8(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1220 {
1221 return nir_build_alu(build, nir_op_ieq8, src0, src1, NULL, NULL);
1222 }
1223 static inline nir_ssa_def *
nir_ifind_msb(nir_builder * build,nir_ssa_def * src0)1224 nir_ifind_msb(nir_builder *build, nir_ssa_def *src0)
1225 {
1226 return nir_build_alu(build, nir_op_ifind_msb, src0, NULL, NULL, NULL);
1227 }
1228 static inline nir_ssa_def *
nir_ige(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1229 nir_ige(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1230 {
1231 return nir_build_alu(build, nir_op_ige, src0, src1, NULL, NULL);
1232 }
1233 static inline nir_ssa_def *
nir_ige16(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1234 nir_ige16(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1235 {
1236 return nir_build_alu(build, nir_op_ige16, src0, src1, NULL, NULL);
1237 }
1238 static inline nir_ssa_def *
nir_ige32(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1239 nir_ige32(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1240 {
1241 return nir_build_alu(build, nir_op_ige32, src0, src1, NULL, NULL);
1242 }
1243 static inline nir_ssa_def *
nir_ige8(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1244 nir_ige8(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1245 {
1246 return nir_build_alu(build, nir_op_ige8, src0, src1, NULL, NULL);
1247 }
1248 static inline nir_ssa_def *
nir_ihadd(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1249 nir_ihadd(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1250 {
1251 return nir_build_alu(build, nir_op_ihadd, src0, src1, NULL, NULL);
1252 }
1253 static inline nir_ssa_def *
nir_ilt(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1254 nir_ilt(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1255 {
1256 return nir_build_alu(build, nir_op_ilt, src0, src1, NULL, NULL);
1257 }
1258 static inline nir_ssa_def *
nir_ilt16(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1259 nir_ilt16(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1260 {
1261 return nir_build_alu(build, nir_op_ilt16, src0, src1, NULL, NULL);
1262 }
1263 static inline nir_ssa_def *
nir_ilt32(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1264 nir_ilt32(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1265 {
1266 return nir_build_alu(build, nir_op_ilt32, src0, src1, NULL, NULL);
1267 }
1268 static inline nir_ssa_def *
nir_ilt8(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1269 nir_ilt8(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1270 {
1271 return nir_build_alu(build, nir_op_ilt8, src0, src1, NULL, NULL);
1272 }
1273 static inline nir_ssa_def *
nir_imad24_ir3(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1,nir_ssa_def * src2)1274 nir_imad24_ir3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
1275 {
1276 return nir_build_alu(build, nir_op_imad24_ir3, src0, src1, src2, NULL);
1277 }
1278 static inline nir_ssa_def *
nir_imadsh_mix16(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1,nir_ssa_def * src2)1279 nir_imadsh_mix16(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
1280 {
1281 return nir_build_alu(build, nir_op_imadsh_mix16, src0, src1, src2, NULL);
1282 }
1283 static inline nir_ssa_def *
nir_imax(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1284 nir_imax(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1285 {
1286 return nir_build_alu(build, nir_op_imax, src0, src1, NULL, NULL);
1287 }
1288 static inline nir_ssa_def *
nir_imin(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1289 nir_imin(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1290 {
1291 return nir_build_alu(build, nir_op_imin, src0, src1, NULL, NULL);
1292 }
1293 static inline nir_ssa_def *
nir_imod(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1294 nir_imod(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1295 {
1296 return nir_build_alu(build, nir_op_imod, src0, src1, NULL, NULL);
1297 }
1298 static inline nir_ssa_def *
nir_imul(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1299 nir_imul(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1300 {
1301 return nir_build_alu(build, nir_op_imul, src0, src1, NULL, NULL);
1302 }
1303 static inline nir_ssa_def *
nir_imul24(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1304 nir_imul24(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1305 {
1306 return nir_build_alu(build, nir_op_imul24, src0, src1, NULL, NULL);
1307 }
1308 static inline nir_ssa_def *
nir_imul_2x32_64(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1309 nir_imul_2x32_64(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1310 {
1311 return nir_build_alu(build, nir_op_imul_2x32_64, src0, src1, NULL, NULL);
1312 }
1313 static inline nir_ssa_def *
nir_imul_32x16(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1314 nir_imul_32x16(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1315 {
1316 return nir_build_alu(build, nir_op_imul_32x16, src0, src1, NULL, NULL);
1317 }
1318 static inline nir_ssa_def *
nir_imul_high(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1319 nir_imul_high(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1320 {
1321 return nir_build_alu(build, nir_op_imul_high, src0, src1, NULL, NULL);
1322 }
1323 static inline nir_ssa_def *
nir_ine(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1324 nir_ine(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1325 {
1326 return nir_build_alu(build, nir_op_ine, src0, src1, NULL, NULL);
1327 }
1328 static inline nir_ssa_def *
nir_ine16(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1329 nir_ine16(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1330 {
1331 return nir_build_alu(build, nir_op_ine16, src0, src1, NULL, NULL);
1332 }
1333 static inline nir_ssa_def *
nir_ine32(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1334 nir_ine32(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1335 {
1336 return nir_build_alu(build, nir_op_ine32, src0, src1, NULL, NULL);
1337 }
1338 static inline nir_ssa_def *
nir_ine8(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1339 nir_ine8(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1340 {
1341 return nir_build_alu(build, nir_op_ine8, src0, src1, NULL, NULL);
1342 }
1343 static inline nir_ssa_def *
nir_ineg(nir_builder * build,nir_ssa_def * src0)1344 nir_ineg(nir_builder *build, nir_ssa_def *src0)
1345 {
1346 return nir_build_alu(build, nir_op_ineg, src0, NULL, NULL, NULL);
1347 }
1348 static inline nir_ssa_def *
nir_inot(nir_builder * build,nir_ssa_def * src0)1349 nir_inot(nir_builder *build, nir_ssa_def *src0)
1350 {
1351 return nir_build_alu(build, nir_op_inot, src0, NULL, NULL, NULL);
1352 }
1353 static inline nir_ssa_def *
nir_ior(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1354 nir_ior(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1355 {
1356 return nir_build_alu(build, nir_op_ior, src0, src1, NULL, NULL);
1357 }
1358 static inline nir_ssa_def *
nir_irem(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1359 nir_irem(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1360 {
1361 return nir_build_alu(build, nir_op_irem, src0, src1, NULL, NULL);
1362 }
1363 static inline nir_ssa_def *
nir_irhadd(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1364 nir_irhadd(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1365 {
1366 return nir_build_alu(build, nir_op_irhadd, src0, src1, NULL, NULL);
1367 }
1368 static inline nir_ssa_def *
nir_ishl(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1369 nir_ishl(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1370 {
1371 return nir_build_alu(build, nir_op_ishl, src0, src1, NULL, NULL);
1372 }
1373 static inline nir_ssa_def *
nir_ishr(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1374 nir_ishr(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1375 {
1376 return nir_build_alu(build, nir_op_ishr, src0, src1, NULL, NULL);
1377 }
1378 static inline nir_ssa_def *
nir_isign(nir_builder * build,nir_ssa_def * src0)1379 nir_isign(nir_builder *build, nir_ssa_def *src0)
1380 {
1381 return nir_build_alu(build, nir_op_isign, src0, NULL, NULL, NULL);
1382 }
1383 static inline nir_ssa_def *
nir_isub(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1384 nir_isub(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1385 {
1386 return nir_build_alu(build, nir_op_isub, src0, src1, NULL, NULL);
1387 }
1388 static inline nir_ssa_def *
nir_isub_sat(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1389 nir_isub_sat(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1390 {
1391 return nir_build_alu(build, nir_op_isub_sat, src0, src1, NULL, NULL);
1392 }
1393 static inline nir_ssa_def *
nir_ixor(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1394 nir_ixor(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1395 {
1396 return nir_build_alu(build, nir_op_ixor, src0, src1, NULL, NULL);
1397 }
1398 static inline nir_ssa_def *
nir_ldexp(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1399 nir_ldexp(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1400 {
1401 return nir_build_alu(build, nir_op_ldexp, src0, src1, NULL, NULL);
1402 }
1403 static inline nir_ssa_def *
nir_mov(nir_builder * build,nir_ssa_def * src0)1404 nir_mov(nir_builder *build, nir_ssa_def *src0)
1405 {
1406 return nir_build_alu(build, nir_op_mov, src0, NULL, NULL, NULL);
1407 }
1408 static inline nir_ssa_def *
nir_pack_32_2x16(nir_builder * build,nir_ssa_def * src0)1409 nir_pack_32_2x16(nir_builder *build, nir_ssa_def *src0)
1410 {
1411 return nir_build_alu(build, nir_op_pack_32_2x16, src0, NULL, NULL, NULL);
1412 }
1413 static inline nir_ssa_def *
nir_pack_32_2x16_split(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1414 nir_pack_32_2x16_split(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1415 {
1416 return nir_build_alu(build, nir_op_pack_32_2x16_split, src0, src1, NULL, NULL);
1417 }
1418 static inline nir_ssa_def *
nir_pack_32_4x8(nir_builder * build,nir_ssa_def * src0)1419 nir_pack_32_4x8(nir_builder *build, nir_ssa_def *src0)
1420 {
1421 return nir_build_alu(build, nir_op_pack_32_4x8, src0, NULL, NULL, NULL);
1422 }
1423 static inline nir_ssa_def *
nir_pack_64_2x32(nir_builder * build,nir_ssa_def * src0)1424 nir_pack_64_2x32(nir_builder *build, nir_ssa_def *src0)
1425 {
1426 return nir_build_alu(build, nir_op_pack_64_2x32, src0, NULL, NULL, NULL);
1427 }
1428 static inline nir_ssa_def *
nir_pack_64_2x32_split(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1429 nir_pack_64_2x32_split(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1430 {
1431 return nir_build_alu(build, nir_op_pack_64_2x32_split, src0, src1, NULL, NULL);
1432 }
1433 static inline nir_ssa_def *
nir_pack_64_4x16(nir_builder * build,nir_ssa_def * src0)1434 nir_pack_64_4x16(nir_builder *build, nir_ssa_def *src0)
1435 {
1436 return nir_build_alu(build, nir_op_pack_64_4x16, src0, NULL, NULL, NULL);
1437 }
1438 static inline nir_ssa_def *
nir_pack_half_2x16(nir_builder * build,nir_ssa_def * src0)1439 nir_pack_half_2x16(nir_builder *build, nir_ssa_def *src0)
1440 {
1441 return nir_build_alu(build, nir_op_pack_half_2x16, src0, NULL, NULL, NULL);
1442 }
1443 static inline nir_ssa_def *
nir_pack_half_2x16_split(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1444 nir_pack_half_2x16_split(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1445 {
1446 return nir_build_alu(build, nir_op_pack_half_2x16_split, src0, src1, NULL, NULL);
1447 }
1448 static inline nir_ssa_def *
nir_pack_snorm_2x16(nir_builder * build,nir_ssa_def * src0)1449 nir_pack_snorm_2x16(nir_builder *build, nir_ssa_def *src0)
1450 {
1451 return nir_build_alu(build, nir_op_pack_snorm_2x16, src0, NULL, NULL, NULL);
1452 }
1453 static inline nir_ssa_def *
nir_pack_snorm_4x8(nir_builder * build,nir_ssa_def * src0)1454 nir_pack_snorm_4x8(nir_builder *build, nir_ssa_def *src0)
1455 {
1456 return nir_build_alu(build, nir_op_pack_snorm_4x8, src0, NULL, NULL, NULL);
1457 }
1458 static inline nir_ssa_def *
nir_pack_unorm_2x16(nir_builder * build,nir_ssa_def * src0)1459 nir_pack_unorm_2x16(nir_builder *build, nir_ssa_def *src0)
1460 {
1461 return nir_build_alu(build, nir_op_pack_unorm_2x16, src0, NULL, NULL, NULL);
1462 }
1463 static inline nir_ssa_def *
nir_pack_unorm_4x8(nir_builder * build,nir_ssa_def * src0)1464 nir_pack_unorm_4x8(nir_builder *build, nir_ssa_def *src0)
1465 {
1466 return nir_build_alu(build, nir_op_pack_unorm_4x8, src0, NULL, NULL, NULL);
1467 }
1468 static inline nir_ssa_def *
nir_pack_uvec2_to_uint(nir_builder * build,nir_ssa_def * src0)1469 nir_pack_uvec2_to_uint(nir_builder *build, nir_ssa_def *src0)
1470 {
1471 return nir_build_alu(build, nir_op_pack_uvec2_to_uint, src0, NULL, NULL, NULL);
1472 }
1473 static inline nir_ssa_def *
nir_pack_uvec4_to_uint(nir_builder * build,nir_ssa_def * src0)1474 nir_pack_uvec4_to_uint(nir_builder *build, nir_ssa_def *src0)
1475 {
1476 return nir_build_alu(build, nir_op_pack_uvec4_to_uint, src0, NULL, NULL, NULL);
1477 }
1478 static inline nir_ssa_def *
nir_seq(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1479 nir_seq(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1480 {
1481 return nir_build_alu(build, nir_op_seq, src0, src1, NULL, NULL);
1482 }
1483 static inline nir_ssa_def *
nir_sge(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1484 nir_sge(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1485 {
1486 return nir_build_alu(build, nir_op_sge, src0, src1, NULL, NULL);
1487 }
1488 static inline nir_ssa_def *
nir_slt(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1489 nir_slt(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1490 {
1491 return nir_build_alu(build, nir_op_slt, src0, src1, NULL, NULL);
1492 }
1493 static inline nir_ssa_def *
nir_sne(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1494 nir_sne(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1495 {
1496 return nir_build_alu(build, nir_op_sne, src0, src1, NULL, NULL);
1497 }
1498 static inline nir_ssa_def *
nir_u2f16(nir_builder * build,nir_ssa_def * src0)1499 nir_u2f16(nir_builder *build, nir_ssa_def *src0)
1500 {
1501 return nir_build_alu(build, nir_op_u2f16, src0, NULL, NULL, NULL);
1502 }
1503 static inline nir_ssa_def *
nir_u2f32(nir_builder * build,nir_ssa_def * src0)1504 nir_u2f32(nir_builder *build, nir_ssa_def *src0)
1505 {
1506 return nir_build_alu(build, nir_op_u2f32, src0, NULL, NULL, NULL);
1507 }
1508 static inline nir_ssa_def *
nir_u2f64(nir_builder * build,nir_ssa_def * src0)1509 nir_u2f64(nir_builder *build, nir_ssa_def *src0)
1510 {
1511 return nir_build_alu(build, nir_op_u2f64, src0, NULL, NULL, NULL);
1512 }
1513 static inline nir_ssa_def *
nir_u2fmp(nir_builder * build,nir_ssa_def * src0)1514 nir_u2fmp(nir_builder *build, nir_ssa_def *src0)
1515 {
1516 return nir_build_alu(build, nir_op_u2fmp, src0, NULL, NULL, NULL);
1517 }
1518 static inline nir_ssa_def *
nir_u2u1(nir_builder * build,nir_ssa_def * src0)1519 nir_u2u1(nir_builder *build, nir_ssa_def *src0)
1520 {
1521 return nir_build_alu(build, nir_op_u2u1, src0, NULL, NULL, NULL);
1522 }
1523 static inline nir_ssa_def *
nir_u2u16(nir_builder * build,nir_ssa_def * src0)1524 nir_u2u16(nir_builder *build, nir_ssa_def *src0)
1525 {
1526 return nir_build_alu(build, nir_op_u2u16, src0, NULL, NULL, NULL);
1527 }
1528 static inline nir_ssa_def *
nir_u2u32(nir_builder * build,nir_ssa_def * src0)1529 nir_u2u32(nir_builder *build, nir_ssa_def *src0)
1530 {
1531 return nir_build_alu(build, nir_op_u2u32, src0, NULL, NULL, NULL);
1532 }
1533 static inline nir_ssa_def *
nir_u2u64(nir_builder * build,nir_ssa_def * src0)1534 nir_u2u64(nir_builder *build, nir_ssa_def *src0)
1535 {
1536 return nir_build_alu(build, nir_op_u2u64, src0, NULL, NULL, NULL);
1537 }
1538 static inline nir_ssa_def *
nir_u2u8(nir_builder * build,nir_ssa_def * src0)1539 nir_u2u8(nir_builder *build, nir_ssa_def *src0)
1540 {
1541 return nir_build_alu(build, nir_op_u2u8, src0, NULL, NULL, NULL);
1542 }
1543 static inline nir_ssa_def *
nir_uabs_isub(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1544 nir_uabs_isub(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1545 {
1546 return nir_build_alu(build, nir_op_uabs_isub, src0, src1, NULL, NULL);
1547 }
1548 static inline nir_ssa_def *
nir_uabs_usub(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1549 nir_uabs_usub(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1550 {
1551 return nir_build_alu(build, nir_op_uabs_usub, src0, src1, NULL, NULL);
1552 }
1553 static inline nir_ssa_def *
nir_uadd_carry(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1554 nir_uadd_carry(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1555 {
1556 return nir_build_alu(build, nir_op_uadd_carry, src0, src1, NULL, NULL);
1557 }
1558 static inline nir_ssa_def *
nir_uadd_sat(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1559 nir_uadd_sat(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1560 {
1561 return nir_build_alu(build, nir_op_uadd_sat, src0, src1, NULL, NULL);
1562 }
1563 static inline nir_ssa_def *
nir_ubfe(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1,nir_ssa_def * src2)1564 nir_ubfe(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
1565 {
1566 return nir_build_alu(build, nir_op_ubfe, src0, src1, src2, NULL);
1567 }
1568 static inline nir_ssa_def *
nir_ubitfield_extract(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1,nir_ssa_def * src2)1569 nir_ubitfield_extract(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
1570 {
1571 return nir_build_alu(build, nir_op_ubitfield_extract, src0, src1, src2, NULL);
1572 }
1573 static inline nir_ssa_def *
nir_uclz(nir_builder * build,nir_ssa_def * src0)1574 nir_uclz(nir_builder *build, nir_ssa_def *src0)
1575 {
1576 return nir_build_alu(build, nir_op_uclz, src0, NULL, NULL, NULL);
1577 }
1578 static inline nir_ssa_def *
nir_udiv(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1579 nir_udiv(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1580 {
1581 return nir_build_alu(build, nir_op_udiv, src0, src1, NULL, NULL);
1582 }
1583 static inline nir_ssa_def *
nir_ufind_msb(nir_builder * build,nir_ssa_def * src0)1584 nir_ufind_msb(nir_builder *build, nir_ssa_def *src0)
1585 {
1586 return nir_build_alu(build, nir_op_ufind_msb, src0, NULL, NULL, NULL);
1587 }
1588 static inline nir_ssa_def *
nir_uge(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1589 nir_uge(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1590 {
1591 return nir_build_alu(build, nir_op_uge, src0, src1, NULL, NULL);
1592 }
1593 static inline nir_ssa_def *
nir_uge16(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1594 nir_uge16(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1595 {
1596 return nir_build_alu(build, nir_op_uge16, src0, src1, NULL, NULL);
1597 }
1598 static inline nir_ssa_def *
nir_uge32(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1599 nir_uge32(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1600 {
1601 return nir_build_alu(build, nir_op_uge32, src0, src1, NULL, NULL);
1602 }
1603 static inline nir_ssa_def *
nir_uge8(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1604 nir_uge8(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1605 {
1606 return nir_build_alu(build, nir_op_uge8, src0, src1, NULL, NULL);
1607 }
1608 static inline nir_ssa_def *
nir_uhadd(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1609 nir_uhadd(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1610 {
1611 return nir_build_alu(build, nir_op_uhadd, src0, src1, NULL, NULL);
1612 }
1613 static inline nir_ssa_def *
nir_ult(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1614 nir_ult(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1615 {
1616 return nir_build_alu(build, nir_op_ult, src0, src1, NULL, NULL);
1617 }
1618 static inline nir_ssa_def *
nir_ult16(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1619 nir_ult16(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1620 {
1621 return nir_build_alu(build, nir_op_ult16, src0, src1, NULL, NULL);
1622 }
1623 static inline nir_ssa_def *
nir_ult32(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1624 nir_ult32(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1625 {
1626 return nir_build_alu(build, nir_op_ult32, src0, src1, NULL, NULL);
1627 }
1628 static inline nir_ssa_def *
nir_ult8(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1629 nir_ult8(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1630 {
1631 return nir_build_alu(build, nir_op_ult8, src0, src1, NULL, NULL);
1632 }
1633 static inline nir_ssa_def *
nir_umad24(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1,nir_ssa_def * src2)1634 nir_umad24(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
1635 {
1636 return nir_build_alu(build, nir_op_umad24, src0, src1, src2, NULL);
1637 }
1638 static inline nir_ssa_def *
nir_umax(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1639 nir_umax(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1640 {
1641 return nir_build_alu(build, nir_op_umax, src0, src1, NULL, NULL);
1642 }
1643 static inline nir_ssa_def *
nir_umax_4x8(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1644 nir_umax_4x8(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1645 {
1646 return nir_build_alu(build, nir_op_umax_4x8, src0, src1, NULL, NULL);
1647 }
1648 static inline nir_ssa_def *
nir_umin(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1649 nir_umin(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1650 {
1651 return nir_build_alu(build, nir_op_umin, src0, src1, NULL, NULL);
1652 }
1653 static inline nir_ssa_def *
nir_umin_4x8(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1654 nir_umin_4x8(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1655 {
1656 return nir_build_alu(build, nir_op_umin_4x8, src0, src1, NULL, NULL);
1657 }
1658 static inline nir_ssa_def *
nir_umod(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1659 nir_umod(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1660 {
1661 return nir_build_alu(build, nir_op_umod, src0, src1, NULL, NULL);
1662 }
1663 static inline nir_ssa_def *
nir_umul24(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1664 nir_umul24(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1665 {
1666 return nir_build_alu(build, nir_op_umul24, src0, src1, NULL, NULL);
1667 }
1668 static inline nir_ssa_def *
nir_umul_2x32_64(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1669 nir_umul_2x32_64(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1670 {
1671 return nir_build_alu(build, nir_op_umul_2x32_64, src0, src1, NULL, NULL);
1672 }
1673 static inline nir_ssa_def *
nir_umul_32x16(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1674 nir_umul_32x16(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1675 {
1676 return nir_build_alu(build, nir_op_umul_32x16, src0, src1, NULL, NULL);
1677 }
1678 static inline nir_ssa_def *
nir_umul_high(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1679 nir_umul_high(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1680 {
1681 return nir_build_alu(build, nir_op_umul_high, src0, src1, NULL, NULL);
1682 }
1683 static inline nir_ssa_def *
nir_umul_low(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1684 nir_umul_low(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1685 {
1686 return nir_build_alu(build, nir_op_umul_low, src0, src1, NULL, NULL);
1687 }
1688 static inline nir_ssa_def *
nir_umul_unorm_4x8(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1689 nir_umul_unorm_4x8(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1690 {
1691 return nir_build_alu(build, nir_op_umul_unorm_4x8, src0, src1, NULL, NULL);
1692 }
1693 static inline nir_ssa_def *
nir_unpack_32_2x16(nir_builder * build,nir_ssa_def * src0)1694 nir_unpack_32_2x16(nir_builder *build, nir_ssa_def *src0)
1695 {
1696 return nir_build_alu(build, nir_op_unpack_32_2x16, src0, NULL, NULL, NULL);
1697 }
1698 static inline nir_ssa_def *
nir_unpack_32_2x16_split_x(nir_builder * build,nir_ssa_def * src0)1699 nir_unpack_32_2x16_split_x(nir_builder *build, nir_ssa_def *src0)
1700 {
1701 return nir_build_alu(build, nir_op_unpack_32_2x16_split_x, src0, NULL, NULL, NULL);
1702 }
1703 static inline nir_ssa_def *
nir_unpack_32_2x16_split_y(nir_builder * build,nir_ssa_def * src0)1704 nir_unpack_32_2x16_split_y(nir_builder *build, nir_ssa_def *src0)
1705 {
1706 return nir_build_alu(build, nir_op_unpack_32_2x16_split_y, src0, NULL, NULL, NULL);
1707 }
1708 static inline nir_ssa_def *
nir_unpack_32_4x8(nir_builder * build,nir_ssa_def * src0)1709 nir_unpack_32_4x8(nir_builder *build, nir_ssa_def *src0)
1710 {
1711 return nir_build_alu(build, nir_op_unpack_32_4x8, src0, NULL, NULL, NULL);
1712 }
1713 static inline nir_ssa_def *
nir_unpack_64_2x32(nir_builder * build,nir_ssa_def * src0)1714 nir_unpack_64_2x32(nir_builder *build, nir_ssa_def *src0)
1715 {
1716 return nir_build_alu(build, nir_op_unpack_64_2x32, src0, NULL, NULL, NULL);
1717 }
1718 static inline nir_ssa_def *
nir_unpack_64_2x32_split_x(nir_builder * build,nir_ssa_def * src0)1719 nir_unpack_64_2x32_split_x(nir_builder *build, nir_ssa_def *src0)
1720 {
1721 return nir_build_alu(build, nir_op_unpack_64_2x32_split_x, src0, NULL, NULL, NULL);
1722 }
1723 static inline nir_ssa_def *
nir_unpack_64_2x32_split_y(nir_builder * build,nir_ssa_def * src0)1724 nir_unpack_64_2x32_split_y(nir_builder *build, nir_ssa_def *src0)
1725 {
1726 return nir_build_alu(build, nir_op_unpack_64_2x32_split_y, src0, NULL, NULL, NULL);
1727 }
1728 static inline nir_ssa_def *
nir_unpack_64_4x16(nir_builder * build,nir_ssa_def * src0)1729 nir_unpack_64_4x16(nir_builder *build, nir_ssa_def *src0)
1730 {
1731 return nir_build_alu(build, nir_op_unpack_64_4x16, src0, NULL, NULL, NULL);
1732 }
1733 static inline nir_ssa_def *
nir_unpack_half_2x16(nir_builder * build,nir_ssa_def * src0)1734 nir_unpack_half_2x16(nir_builder *build, nir_ssa_def *src0)
1735 {
1736 return nir_build_alu(build, nir_op_unpack_half_2x16, src0, NULL, NULL, NULL);
1737 }
1738 static inline nir_ssa_def *
nir_unpack_half_2x16_flush_to_zero(nir_builder * build,nir_ssa_def * src0)1739 nir_unpack_half_2x16_flush_to_zero(nir_builder *build, nir_ssa_def *src0)
1740 {
1741 return nir_build_alu(build, nir_op_unpack_half_2x16_flush_to_zero, src0, NULL, NULL, NULL);
1742 }
1743 static inline nir_ssa_def *
nir_unpack_half_2x16_split_x(nir_builder * build,nir_ssa_def * src0)1744 nir_unpack_half_2x16_split_x(nir_builder *build, nir_ssa_def *src0)
1745 {
1746 return nir_build_alu(build, nir_op_unpack_half_2x16_split_x, src0, NULL, NULL, NULL);
1747 }
1748 static inline nir_ssa_def *
nir_unpack_half_2x16_split_x_flush_to_zero(nir_builder * build,nir_ssa_def * src0)1749 nir_unpack_half_2x16_split_x_flush_to_zero(nir_builder *build, nir_ssa_def *src0)
1750 {
1751 return nir_build_alu(build, nir_op_unpack_half_2x16_split_x_flush_to_zero, src0, NULL, NULL, NULL);
1752 }
1753 static inline nir_ssa_def *
nir_unpack_half_2x16_split_y(nir_builder * build,nir_ssa_def * src0)1754 nir_unpack_half_2x16_split_y(nir_builder *build, nir_ssa_def *src0)
1755 {
1756 return nir_build_alu(build, nir_op_unpack_half_2x16_split_y, src0, NULL, NULL, NULL);
1757 }
1758 static inline nir_ssa_def *
nir_unpack_half_2x16_split_y_flush_to_zero(nir_builder * build,nir_ssa_def * src0)1759 nir_unpack_half_2x16_split_y_flush_to_zero(nir_builder *build, nir_ssa_def *src0)
1760 {
1761 return nir_build_alu(build, nir_op_unpack_half_2x16_split_y_flush_to_zero, src0, NULL, NULL, NULL);
1762 }
1763 static inline nir_ssa_def *
nir_unpack_snorm_2x16(nir_builder * build,nir_ssa_def * src0)1764 nir_unpack_snorm_2x16(nir_builder *build, nir_ssa_def *src0)
1765 {
1766 return nir_build_alu(build, nir_op_unpack_snorm_2x16, src0, NULL, NULL, NULL);
1767 }
1768 static inline nir_ssa_def *
nir_unpack_snorm_4x8(nir_builder * build,nir_ssa_def * src0)1769 nir_unpack_snorm_4x8(nir_builder *build, nir_ssa_def *src0)
1770 {
1771 return nir_build_alu(build, nir_op_unpack_snorm_4x8, src0, NULL, NULL, NULL);
1772 }
1773 static inline nir_ssa_def *
nir_unpack_unorm_2x16(nir_builder * build,nir_ssa_def * src0)1774 nir_unpack_unorm_2x16(nir_builder *build, nir_ssa_def *src0)
1775 {
1776 return nir_build_alu(build, nir_op_unpack_unorm_2x16, src0, NULL, NULL, NULL);
1777 }
1778 static inline nir_ssa_def *
nir_unpack_unorm_4x8(nir_builder * build,nir_ssa_def * src0)1779 nir_unpack_unorm_4x8(nir_builder *build, nir_ssa_def *src0)
1780 {
1781 return nir_build_alu(build, nir_op_unpack_unorm_4x8, src0, NULL, NULL, NULL);
1782 }
1783 static inline nir_ssa_def *
nir_urhadd(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1784 nir_urhadd(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1785 {
1786 return nir_build_alu(build, nir_op_urhadd, src0, src1, NULL, NULL);
1787 }
1788 static inline nir_ssa_def *
nir_urol(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1789 nir_urol(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1790 {
1791 return nir_build_alu(build, nir_op_urol, src0, src1, NULL, NULL);
1792 }
1793 static inline nir_ssa_def *
nir_uror(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1794 nir_uror(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1795 {
1796 return nir_build_alu(build, nir_op_uror, src0, src1, NULL, NULL);
1797 }
1798 static inline nir_ssa_def *
nir_usadd_4x8(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1799 nir_usadd_4x8(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1800 {
1801 return nir_build_alu(build, nir_op_usadd_4x8, src0, src1, NULL, NULL);
1802 }
1803 static inline nir_ssa_def *
nir_ushr(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1804 nir_ushr(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1805 {
1806 return nir_build_alu(build, nir_op_ushr, src0, src1, NULL, NULL);
1807 }
1808 static inline nir_ssa_def *
nir_ussub_4x8(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1809 nir_ussub_4x8(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1810 {
1811 return nir_build_alu(build, nir_op_ussub_4x8, src0, src1, NULL, NULL);
1812 }
1813 static inline nir_ssa_def *
nir_usub_borrow(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1814 nir_usub_borrow(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1815 {
1816 return nir_build_alu(build, nir_op_usub_borrow, src0, src1, NULL, NULL);
1817 }
1818 static inline nir_ssa_def *
nir_usub_sat(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1819 nir_usub_sat(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1820 {
1821 return nir_build_alu(build, nir_op_usub_sat, src0, src1, NULL, NULL);
1822 }
1823 static inline nir_ssa_def *
nir_vec16(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1,nir_ssa_def * src2,nir_ssa_def * src3,nir_ssa_def * src4,nir_ssa_def * src5,nir_ssa_def * src6,nir_ssa_def * src7,nir_ssa_def * src8,nir_ssa_def * src9,nir_ssa_def * src10,nir_ssa_def * src11,nir_ssa_def * src12,nir_ssa_def * src13,nir_ssa_def * src14,nir_ssa_def * src15)1824 nir_vec16(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2, nir_ssa_def *src3, nir_ssa_def *src4, nir_ssa_def *src5, nir_ssa_def *src6, nir_ssa_def *src7, nir_ssa_def *src8, nir_ssa_def *src9, nir_ssa_def *src10, nir_ssa_def *src11, nir_ssa_def *src12, nir_ssa_def *src13, nir_ssa_def *src14, nir_ssa_def *src15)
1825 {
1826 nir_ssa_def *srcs[16] = {src0, src1, src2, src3, src4, src5, src6, src7, src8, src9, src10, src11, src12, src13, src14, src15};
1827 return nir_build_alu_src_arr(build, nir_op_vec16, srcs);
1828 }
1829 static inline nir_ssa_def *
nir_vec2(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1)1830 nir_vec2(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
1831 {
1832 return nir_build_alu(build, nir_op_vec2, src0, src1, NULL, NULL);
1833 }
1834 static inline nir_ssa_def *
nir_vec3(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1,nir_ssa_def * src2)1835 nir_vec3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
1836 {
1837 return nir_build_alu(build, nir_op_vec3, src0, src1, src2, NULL);
1838 }
1839 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)1840 nir_vec4(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2, nir_ssa_def *src3)
1841 {
1842 return nir_build_alu(build, nir_op_vec4, src0, src1, src2, src3);
1843 }
1844 static inline nir_ssa_def *
nir_vec8(nir_builder * build,nir_ssa_def * src0,nir_ssa_def * src1,nir_ssa_def * src2,nir_ssa_def * src3,nir_ssa_def * src4,nir_ssa_def * src5,nir_ssa_def * src6,nir_ssa_def * src7)1845 nir_vec8(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2, nir_ssa_def *src3, nir_ssa_def *src4, nir_ssa_def *src5, nir_ssa_def *src6, nir_ssa_def *src7)
1846 {
1847 nir_ssa_def *srcs[8] = {src0, src1, src2, src3, src4, src5, src6, src7};
1848 return nir_build_alu_src_arr(build, nir_op_vec8, srcs);
1849 }
1850
1851 /* Generic builder for system values. */
1852 static inline nir_ssa_def *
nir_load_system_value(nir_builder * build,nir_intrinsic_op op,int index,unsigned num_components,unsigned bit_size)1853 nir_load_system_value(nir_builder *build, nir_intrinsic_op op, int index,
1854 unsigned num_components, unsigned bit_size)
1855 {
1856 nir_intrinsic_instr *load = nir_intrinsic_instr_create(build->shader, op);
1857 if (nir_intrinsic_infos[op].dest_components > 0)
1858 assert(num_components == nir_intrinsic_infos[op].dest_components);
1859 else
1860 load->num_components = num_components;
1861 load->const_index[0] = index;
1862
1863 nir_ssa_dest_init(&load->instr, &load->dest,
1864 num_components, bit_size, NULL);
1865 nir_builder_instr_insert(build, &load->instr);
1866 return &load->dest.ssa;
1867 }
1868
1869
1870
1871
1872 static inline nir_ssa_def *
nir_load_aa_line_width(nir_builder * build)1873 nir_load_aa_line_width(nir_builder *build)
1874 {
1875 return nir_load_system_value(build, nir_intrinsic_load_aa_line_width,
1876 0, 1, 32);
1877 }
1878
1879 static inline nir_ssa_def *
nir_load_base_global_invocation_id(nir_builder * build,unsigned bit_size)1880 nir_load_base_global_invocation_id(nir_builder *build, unsigned bit_size)
1881 {
1882 return nir_load_system_value(build, nir_intrinsic_load_base_global_invocation_id,
1883 0, 3, bit_size);
1884 }
1885
1886 static inline nir_ssa_def *
nir_load_base_instance(nir_builder * build)1887 nir_load_base_instance(nir_builder *build)
1888 {
1889 return nir_load_system_value(build, nir_intrinsic_load_base_instance,
1890 0, 1, 32);
1891 }
1892
1893 static inline nir_ssa_def *
nir_load_base_vertex(nir_builder * build)1894 nir_load_base_vertex(nir_builder *build)
1895 {
1896 return nir_load_system_value(build, nir_intrinsic_load_base_vertex,
1897 0, 1, 32);
1898 }
1899
1900 static inline nir_ssa_def *
nir_load_base_work_group_id(nir_builder * build,unsigned bit_size)1901 nir_load_base_work_group_id(nir_builder *build, unsigned bit_size)
1902 {
1903 return nir_load_system_value(build, nir_intrinsic_load_base_work_group_id,
1904 0, 3, bit_size);
1905 }
1906
1907 static inline nir_ssa_def *
nir_load_blend_const_color_a_float(nir_builder * build)1908 nir_load_blend_const_color_a_float(nir_builder *build)
1909 {
1910 return nir_load_system_value(build, nir_intrinsic_load_blend_const_color_a_float,
1911 0, 1, 32);
1912 }
1913
1914 static inline nir_ssa_def *
nir_load_blend_const_color_aaaa8888_unorm(nir_builder * build)1915 nir_load_blend_const_color_aaaa8888_unorm(nir_builder *build)
1916 {
1917 return nir_load_system_value(build, nir_intrinsic_load_blend_const_color_aaaa8888_unorm,
1918 0, 1, 32);
1919 }
1920
1921 static inline nir_ssa_def *
nir_load_blend_const_color_b_float(nir_builder * build)1922 nir_load_blend_const_color_b_float(nir_builder *build)
1923 {
1924 return nir_load_system_value(build, nir_intrinsic_load_blend_const_color_b_float,
1925 0, 1, 32);
1926 }
1927
1928 static inline nir_ssa_def *
nir_load_blend_const_color_g_float(nir_builder * build)1929 nir_load_blend_const_color_g_float(nir_builder *build)
1930 {
1931 return nir_load_system_value(build, nir_intrinsic_load_blend_const_color_g_float,
1932 0, 1, 32);
1933 }
1934
1935 static inline nir_ssa_def *
nir_load_blend_const_color_r_float(nir_builder * build)1936 nir_load_blend_const_color_r_float(nir_builder *build)
1937 {
1938 return nir_load_system_value(build, nir_intrinsic_load_blend_const_color_r_float,
1939 0, 1, 32);
1940 }
1941
1942 static inline nir_ssa_def *
nir_load_blend_const_color_rgba(nir_builder * build)1943 nir_load_blend_const_color_rgba(nir_builder *build)
1944 {
1945 return nir_load_system_value(build, nir_intrinsic_load_blend_const_color_rgba,
1946 0, 4, 32);
1947 }
1948
1949 static inline nir_ssa_def *
nir_load_blend_const_color_rgba8888_unorm(nir_builder * build)1950 nir_load_blend_const_color_rgba8888_unorm(nir_builder *build)
1951 {
1952 return nir_load_system_value(build, nir_intrinsic_load_blend_const_color_rgba8888_unorm,
1953 0, 1, 32);
1954 }
1955
1956 static inline nir_ssa_def *
nir_load_color0(nir_builder * build)1957 nir_load_color0(nir_builder *build)
1958 {
1959 return nir_load_system_value(build, nir_intrinsic_load_color0,
1960 0, 4, 32);
1961 }
1962
1963 static inline nir_ssa_def *
nir_load_color1(nir_builder * build)1964 nir_load_color1(nir_builder *build)
1965 {
1966 return nir_load_system_value(build, nir_intrinsic_load_color1,
1967 0, 4, 32);
1968 }
1969
1970 static inline nir_ssa_def *
nir_load_constant_base_ptr(nir_builder * build,unsigned num_components,unsigned bit_size)1971 nir_load_constant_base_ptr(nir_builder *build, unsigned num_components, unsigned bit_size)
1972 {
1973 return nir_load_system_value(build, nir_intrinsic_load_constant_base_ptr,
1974 0, num_components, bit_size);
1975 }
1976
1977 static inline nir_ssa_def *
nir_load_draw_id(nir_builder * build)1978 nir_load_draw_id(nir_builder *build)
1979 {
1980 return nir_load_system_value(build, nir_intrinsic_load_draw_id,
1981 0, 1, 32);
1982 }
1983
1984 static inline nir_ssa_def *
nir_load_first_vertex(nir_builder * build)1985 nir_load_first_vertex(nir_builder *build)
1986 {
1987 return nir_load_system_value(build, nir_intrinsic_load_first_vertex,
1988 0, 1, 32);
1989 }
1990
1991 static inline nir_ssa_def *
nir_load_frag_coord(nir_builder * build)1992 nir_load_frag_coord(nir_builder *build)
1993 {
1994 return nir_load_system_value(build, nir_intrinsic_load_frag_coord,
1995 0, 4, 32);
1996 }
1997
1998 static inline nir_ssa_def *
nir_load_front_face(nir_builder * build,unsigned bit_size)1999 nir_load_front_face(nir_builder *build, unsigned bit_size)
2000 {
2001 return nir_load_system_value(build, nir_intrinsic_load_front_face,
2002 0, 1, bit_size);
2003 }
2004
2005 static inline nir_ssa_def *
nir_load_global_invocation_id(nir_builder * build,unsigned bit_size)2006 nir_load_global_invocation_id(nir_builder *build, unsigned bit_size)
2007 {
2008 return nir_load_system_value(build, nir_intrinsic_load_global_invocation_id,
2009 0, 3, bit_size);
2010 }
2011
2012 static inline nir_ssa_def *
nir_load_global_invocation_id_zero_base(nir_builder * build,unsigned bit_size)2013 nir_load_global_invocation_id_zero_base(nir_builder *build, unsigned bit_size)
2014 {
2015 return nir_load_system_value(build, nir_intrinsic_load_global_invocation_id_zero_base,
2016 0, 3, bit_size);
2017 }
2018
2019 static inline nir_ssa_def *
nir_load_global_invocation_index(nir_builder * build,unsigned bit_size)2020 nir_load_global_invocation_index(nir_builder *build, unsigned bit_size)
2021 {
2022 return nir_load_system_value(build, nir_intrinsic_load_global_invocation_index,
2023 0, 1, bit_size);
2024 }
2025
2026 static inline nir_ssa_def *
nir_load_gs_header_ir3(nir_builder * build)2027 nir_load_gs_header_ir3(nir_builder *build)
2028 {
2029 return nir_load_system_value(build, nir_intrinsic_load_gs_header_ir3,
2030 0, 1, 32);
2031 }
2032
2033 static inline nir_ssa_def *
nir_load_helper_invocation(nir_builder * build,unsigned bit_size)2034 nir_load_helper_invocation(nir_builder *build, unsigned bit_size)
2035 {
2036 return nir_load_system_value(build, nir_intrinsic_load_helper_invocation,
2037 0, 1, bit_size);
2038 }
2039
2040 static inline nir_ssa_def *
nir_load_hs_patch_stride_ir3(nir_builder * build)2041 nir_load_hs_patch_stride_ir3(nir_builder *build)
2042 {
2043 return nir_load_system_value(build, nir_intrinsic_load_hs_patch_stride_ir3,
2044 0, 1, 32);
2045 }
2046
2047 static inline nir_ssa_def *
nir_load_instance_id(nir_builder * build)2048 nir_load_instance_id(nir_builder *build)
2049 {
2050 return nir_load_system_value(build, nir_intrinsic_load_instance_id,
2051 0, 1, 32);
2052 }
2053
2054 static inline nir_ssa_def *
nir_load_invocation_id(nir_builder * build)2055 nir_load_invocation_id(nir_builder *build)
2056 {
2057 return nir_load_system_value(build, nir_intrinsic_load_invocation_id,
2058 0, 1, 32);
2059 }
2060
2061 static inline nir_ssa_def *
nir_load_is_indexed_draw(nir_builder * build)2062 nir_load_is_indexed_draw(nir_builder *build)
2063 {
2064 return nir_load_system_value(build, nir_intrinsic_load_is_indexed_draw,
2065 0, 1, 32);
2066 }
2067
2068 static inline nir_ssa_def *
nir_load_layer_id(nir_builder * build)2069 nir_load_layer_id(nir_builder *build)
2070 {
2071 return nir_load_system_value(build, nir_intrinsic_load_layer_id,
2072 0, 1, 32);
2073 }
2074
2075 static inline nir_ssa_def *
nir_load_line_coord(nir_builder * build)2076 nir_load_line_coord(nir_builder *build)
2077 {
2078 return nir_load_system_value(build, nir_intrinsic_load_line_coord,
2079 0, 1, 32);
2080 }
2081
2082 static inline nir_ssa_def *
nir_load_line_width(nir_builder * build)2083 nir_load_line_width(nir_builder *build)
2084 {
2085 return nir_load_system_value(build, nir_intrinsic_load_line_width,
2086 0, 1, 32);
2087 }
2088
2089 static inline nir_ssa_def *
nir_load_local_group_size(nir_builder * build)2090 nir_load_local_group_size(nir_builder *build)
2091 {
2092 return nir_load_system_value(build, nir_intrinsic_load_local_group_size,
2093 0, 3, 32);
2094 }
2095
2096 static inline nir_ssa_def *
nir_load_local_invocation_id(nir_builder * build)2097 nir_load_local_invocation_id(nir_builder *build)
2098 {
2099 return nir_load_system_value(build, nir_intrinsic_load_local_invocation_id,
2100 0, 3, 32);
2101 }
2102
2103 static inline nir_ssa_def *
nir_load_local_invocation_index(nir_builder * build)2104 nir_load_local_invocation_index(nir_builder *build)
2105 {
2106 return nir_load_system_value(build, nir_intrinsic_load_local_invocation_index,
2107 0, 1, 32);
2108 }
2109
2110 static inline nir_ssa_def *
nir_load_num_subgroups(nir_builder * build)2111 nir_load_num_subgroups(nir_builder *build)
2112 {
2113 return nir_load_system_value(build, nir_intrinsic_load_num_subgroups,
2114 0, 1, 32);
2115 }
2116
2117 static inline nir_ssa_def *
nir_load_num_work_groups(nir_builder * build,unsigned bit_size)2118 nir_load_num_work_groups(nir_builder *build, unsigned bit_size)
2119 {
2120 return nir_load_system_value(build, nir_intrinsic_load_num_work_groups,
2121 0, 3, bit_size);
2122 }
2123
2124 static inline nir_ssa_def *
nir_load_patch_vertices_in(nir_builder * build)2125 nir_load_patch_vertices_in(nir_builder *build)
2126 {
2127 return nir_load_system_value(build, nir_intrinsic_load_patch_vertices_in,
2128 0, 1, 32);
2129 }
2130
2131 static inline nir_ssa_def *
nir_load_point_coord(nir_builder * build)2132 nir_load_point_coord(nir_builder *build)
2133 {
2134 return nir_load_system_value(build, nir_intrinsic_load_point_coord,
2135 0, 2, 32);
2136 }
2137
2138 static inline nir_ssa_def *
nir_load_primitive_id(nir_builder * build)2139 nir_load_primitive_id(nir_builder *build)
2140 {
2141 return nir_load_system_value(build, nir_intrinsic_load_primitive_id,
2142 0, 1, 32);
2143 }
2144
2145 static inline nir_ssa_def *
nir_load_primitive_location_ir3(nir_builder * build,unsigned nir_intrinsic_driver_location)2146 nir_load_primitive_location_ir3(nir_builder *build, unsigned nir_intrinsic_driver_location)
2147 {
2148 return nir_load_system_value(build, nir_intrinsic_load_primitive_location_ir3,
2149 nir_intrinsic_driver_location, 1, 32);
2150 }
2151
2152 static inline nir_ssa_def *
nir_load_ray_flags(nir_builder * build)2153 nir_load_ray_flags(nir_builder *build)
2154 {
2155 return nir_load_system_value(build, nir_intrinsic_load_ray_flags,
2156 0, 1, 32);
2157 }
2158
2159 static inline nir_ssa_def *
nir_load_ray_geometry_index(nir_builder * build)2160 nir_load_ray_geometry_index(nir_builder *build)
2161 {
2162 return nir_load_system_value(build, nir_intrinsic_load_ray_geometry_index,
2163 0, 1, 32);
2164 }
2165
2166 static inline nir_ssa_def *
nir_load_ray_hit_kind(nir_builder * build)2167 nir_load_ray_hit_kind(nir_builder *build)
2168 {
2169 return nir_load_system_value(build, nir_intrinsic_load_ray_hit_kind,
2170 0, 1, 32);
2171 }
2172
2173 static inline nir_ssa_def *
nir_load_ray_instance_custom_index(nir_builder * build)2174 nir_load_ray_instance_custom_index(nir_builder *build)
2175 {
2176 return nir_load_system_value(build, nir_intrinsic_load_ray_instance_custom_index,
2177 0, 1, 32);
2178 }
2179
2180 static inline nir_ssa_def *
nir_load_ray_launch_id(nir_builder * build)2181 nir_load_ray_launch_id(nir_builder *build)
2182 {
2183 return nir_load_system_value(build, nir_intrinsic_load_ray_launch_id,
2184 0, 3, 32);
2185 }
2186
2187 static inline nir_ssa_def *
nir_load_ray_launch_size(nir_builder * build)2188 nir_load_ray_launch_size(nir_builder *build)
2189 {
2190 return nir_load_system_value(build, nir_intrinsic_load_ray_launch_size,
2191 0, 3, 32);
2192 }
2193
2194 static inline nir_ssa_def *
nir_load_ray_object_direction(nir_builder * build)2195 nir_load_ray_object_direction(nir_builder *build)
2196 {
2197 return nir_load_system_value(build, nir_intrinsic_load_ray_object_direction,
2198 0, 3, 32);
2199 }
2200
2201 static inline nir_ssa_def *
nir_load_ray_object_origin(nir_builder * build)2202 nir_load_ray_object_origin(nir_builder *build)
2203 {
2204 return nir_load_system_value(build, nir_intrinsic_load_ray_object_origin,
2205 0, 3, 32);
2206 }
2207
2208 static inline nir_ssa_def *
nir_load_ray_object_to_world(nir_builder * build,unsigned nir_intrinsic_column)2209 nir_load_ray_object_to_world(nir_builder *build, unsigned nir_intrinsic_column)
2210 {
2211 return nir_load_system_value(build, nir_intrinsic_load_ray_object_to_world,
2212 nir_intrinsic_column, 3, 32);
2213 }
2214
2215 static inline nir_ssa_def *
nir_load_ray_t_max(nir_builder * build)2216 nir_load_ray_t_max(nir_builder *build)
2217 {
2218 return nir_load_system_value(build, nir_intrinsic_load_ray_t_max,
2219 0, 1, 32);
2220 }
2221
2222 static inline nir_ssa_def *
nir_load_ray_t_min(nir_builder * build)2223 nir_load_ray_t_min(nir_builder *build)
2224 {
2225 return nir_load_system_value(build, nir_intrinsic_load_ray_t_min,
2226 0, 1, 32);
2227 }
2228
2229 static inline nir_ssa_def *
nir_load_ray_world_direction(nir_builder * build)2230 nir_load_ray_world_direction(nir_builder *build)
2231 {
2232 return nir_load_system_value(build, nir_intrinsic_load_ray_world_direction,
2233 0, 3, 32);
2234 }
2235
2236 static inline nir_ssa_def *
nir_load_ray_world_origin(nir_builder * build)2237 nir_load_ray_world_origin(nir_builder *build)
2238 {
2239 return nir_load_system_value(build, nir_intrinsic_load_ray_world_origin,
2240 0, 3, 32);
2241 }
2242
2243 static inline nir_ssa_def *
nir_load_ray_world_to_object(nir_builder * build,unsigned nir_intrinsic_column)2244 nir_load_ray_world_to_object(nir_builder *build, unsigned nir_intrinsic_column)
2245 {
2246 return nir_load_system_value(build, nir_intrinsic_load_ray_world_to_object,
2247 nir_intrinsic_column, 3, 32);
2248 }
2249
2250 static inline nir_ssa_def *
nir_load_sample_id(nir_builder * build)2251 nir_load_sample_id(nir_builder *build)
2252 {
2253 return nir_load_system_value(build, nir_intrinsic_load_sample_id,
2254 0, 1, 32);
2255 }
2256
2257 static inline nir_ssa_def *
nir_load_sample_id_no_per_sample(nir_builder * build)2258 nir_load_sample_id_no_per_sample(nir_builder *build)
2259 {
2260 return nir_load_system_value(build, nir_intrinsic_load_sample_id_no_per_sample,
2261 0, 1, 32);
2262 }
2263
2264 static inline nir_ssa_def *
nir_load_sample_mask_in(nir_builder * build)2265 nir_load_sample_mask_in(nir_builder *build)
2266 {
2267 return nir_load_system_value(build, nir_intrinsic_load_sample_mask_in,
2268 0, 1, 32);
2269 }
2270
2271 static inline nir_ssa_def *
nir_load_sample_pos(nir_builder * build)2272 nir_load_sample_pos(nir_builder *build)
2273 {
2274 return nir_load_system_value(build, nir_intrinsic_load_sample_pos,
2275 0, 2, 32);
2276 }
2277
2278 static inline nir_ssa_def *
nir_load_scratch_base_ptr(nir_builder * build,unsigned nir_intrinsic_base,unsigned num_components,unsigned bit_size)2279 nir_load_scratch_base_ptr(nir_builder *build, unsigned nir_intrinsic_base, unsigned num_components, unsigned bit_size)
2280 {
2281 return nir_load_system_value(build, nir_intrinsic_load_scratch_base_ptr,
2282 nir_intrinsic_base, num_components, bit_size);
2283 }
2284
2285 static inline nir_ssa_def *
nir_load_shader_record_ptr(nir_builder * build)2286 nir_load_shader_record_ptr(nir_builder *build)
2287 {
2288 return nir_load_system_value(build, nir_intrinsic_load_shader_record_ptr,
2289 0, 1, 64);
2290 }
2291
2292 static inline nir_ssa_def *
nir_load_shared_base_ptr(nir_builder * build,unsigned num_components,unsigned bit_size)2293 nir_load_shared_base_ptr(nir_builder *build, unsigned num_components, unsigned bit_size)
2294 {
2295 return nir_load_system_value(build, nir_intrinsic_load_shared_base_ptr,
2296 0, num_components, bit_size);
2297 }
2298
2299 static inline nir_ssa_def *
nir_load_simd_width_intel(nir_builder * build)2300 nir_load_simd_width_intel(nir_builder *build)
2301 {
2302 return nir_load_system_value(build, nir_intrinsic_load_simd_width_intel,
2303 0, 1, 32);
2304 }
2305
2306 static inline nir_ssa_def *
nir_load_subgroup_eq_mask(nir_builder * build,unsigned num_components,unsigned bit_size)2307 nir_load_subgroup_eq_mask(nir_builder *build, unsigned num_components, unsigned bit_size)
2308 {
2309 return nir_load_system_value(build, nir_intrinsic_load_subgroup_eq_mask,
2310 0, num_components, bit_size);
2311 }
2312
2313 static inline nir_ssa_def *
nir_load_subgroup_ge_mask(nir_builder * build,unsigned num_components,unsigned bit_size)2314 nir_load_subgroup_ge_mask(nir_builder *build, unsigned num_components, unsigned bit_size)
2315 {
2316 return nir_load_system_value(build, nir_intrinsic_load_subgroup_ge_mask,
2317 0, num_components, bit_size);
2318 }
2319
2320 static inline nir_ssa_def *
nir_load_subgroup_gt_mask(nir_builder * build,unsigned num_components,unsigned bit_size)2321 nir_load_subgroup_gt_mask(nir_builder *build, unsigned num_components, unsigned bit_size)
2322 {
2323 return nir_load_system_value(build, nir_intrinsic_load_subgroup_gt_mask,
2324 0, num_components, bit_size);
2325 }
2326
2327 static inline nir_ssa_def *
nir_load_subgroup_id(nir_builder * build)2328 nir_load_subgroup_id(nir_builder *build)
2329 {
2330 return nir_load_system_value(build, nir_intrinsic_load_subgroup_id,
2331 0, 1, 32);
2332 }
2333
2334 static inline nir_ssa_def *
nir_load_subgroup_invocation(nir_builder * build)2335 nir_load_subgroup_invocation(nir_builder *build)
2336 {
2337 return nir_load_system_value(build, nir_intrinsic_load_subgroup_invocation,
2338 0, 1, 32);
2339 }
2340
2341 static inline nir_ssa_def *
nir_load_subgroup_le_mask(nir_builder * build,unsigned num_components,unsigned bit_size)2342 nir_load_subgroup_le_mask(nir_builder *build, unsigned num_components, unsigned bit_size)
2343 {
2344 return nir_load_system_value(build, nir_intrinsic_load_subgroup_le_mask,
2345 0, num_components, bit_size);
2346 }
2347
2348 static inline nir_ssa_def *
nir_load_subgroup_lt_mask(nir_builder * build,unsigned num_components,unsigned bit_size)2349 nir_load_subgroup_lt_mask(nir_builder *build, unsigned num_components, unsigned bit_size)
2350 {
2351 return nir_load_system_value(build, nir_intrinsic_load_subgroup_lt_mask,
2352 0, num_components, bit_size);
2353 }
2354
2355 static inline nir_ssa_def *
nir_load_subgroup_size(nir_builder * build)2356 nir_load_subgroup_size(nir_builder *build)
2357 {
2358 return nir_load_system_value(build, nir_intrinsic_load_subgroup_size,
2359 0, 1, 32);
2360 }
2361
2362 static inline nir_ssa_def *
nir_load_tcs_header_ir3(nir_builder * build)2363 nir_load_tcs_header_ir3(nir_builder *build)
2364 {
2365 return nir_load_system_value(build, nir_intrinsic_load_tcs_header_ir3,
2366 0, 1, 32);
2367 }
2368
2369 static inline nir_ssa_def *
nir_load_tcs_in_param_base_r600(nir_builder * build)2370 nir_load_tcs_in_param_base_r600(nir_builder *build)
2371 {
2372 return nir_load_system_value(build, nir_intrinsic_load_tcs_in_param_base_r600,
2373 0, 4, 32);
2374 }
2375
2376 static inline nir_ssa_def *
nir_load_tcs_out_param_base_r600(nir_builder * build)2377 nir_load_tcs_out_param_base_r600(nir_builder *build)
2378 {
2379 return nir_load_system_value(build, nir_intrinsic_load_tcs_out_param_base_r600,
2380 0, 4, 32);
2381 }
2382
2383 static inline nir_ssa_def *
nir_load_tcs_rel_patch_id_r600(nir_builder * build)2384 nir_load_tcs_rel_patch_id_r600(nir_builder *build)
2385 {
2386 return nir_load_system_value(build, nir_intrinsic_load_tcs_rel_patch_id_r600,
2387 0, 1, 32);
2388 }
2389
2390 static inline nir_ssa_def *
nir_load_tcs_tess_factor_base_r600(nir_builder * build)2391 nir_load_tcs_tess_factor_base_r600(nir_builder *build)
2392 {
2393 return nir_load_system_value(build, nir_intrinsic_load_tcs_tess_factor_base_r600,
2394 0, 1, 32);
2395 }
2396
2397 static inline nir_ssa_def *
nir_load_tess_coord(nir_builder * build)2398 nir_load_tess_coord(nir_builder *build)
2399 {
2400 return nir_load_system_value(build, nir_intrinsic_load_tess_coord,
2401 0, 3, 32);
2402 }
2403
2404 static inline nir_ssa_def *
nir_load_tess_factor_base_ir3(nir_builder * build)2405 nir_load_tess_factor_base_ir3(nir_builder *build)
2406 {
2407 return nir_load_system_value(build, nir_intrinsic_load_tess_factor_base_ir3,
2408 0, 2, 32);
2409 }
2410
2411 static inline nir_ssa_def *
nir_load_tess_level_inner(nir_builder * build)2412 nir_load_tess_level_inner(nir_builder *build)
2413 {
2414 return nir_load_system_value(build, nir_intrinsic_load_tess_level_inner,
2415 0, 2, 32);
2416 }
2417
2418 static inline nir_ssa_def *
nir_load_tess_level_inner_default(nir_builder * build)2419 nir_load_tess_level_inner_default(nir_builder *build)
2420 {
2421 return nir_load_system_value(build, nir_intrinsic_load_tess_level_inner_default,
2422 0, 2, 32);
2423 }
2424
2425 static inline nir_ssa_def *
nir_load_tess_level_outer(nir_builder * build)2426 nir_load_tess_level_outer(nir_builder *build)
2427 {
2428 return nir_load_system_value(build, nir_intrinsic_load_tess_level_outer,
2429 0, 4, 32);
2430 }
2431
2432 static inline nir_ssa_def *
nir_load_tess_level_outer_default(nir_builder * build)2433 nir_load_tess_level_outer_default(nir_builder *build)
2434 {
2435 return nir_load_system_value(build, nir_intrinsic_load_tess_level_outer_default,
2436 0, 4, 32);
2437 }
2438
2439 static inline nir_ssa_def *
nir_load_tess_param_base_ir3(nir_builder * build)2440 nir_load_tess_param_base_ir3(nir_builder *build)
2441 {
2442 return nir_load_system_value(build, nir_intrinsic_load_tess_param_base_ir3,
2443 0, 2, 32);
2444 }
2445
2446 static inline nir_ssa_def *
nir_load_user_clip_plane(nir_builder * build,unsigned nir_intrinsic_ucp_id)2447 nir_load_user_clip_plane(nir_builder *build, unsigned nir_intrinsic_ucp_id)
2448 {
2449 return nir_load_system_value(build, nir_intrinsic_load_user_clip_plane,
2450 nir_intrinsic_ucp_id, 4, 32);
2451 }
2452
2453 static inline nir_ssa_def *
nir_load_user_data_amd(nir_builder * build)2454 nir_load_user_data_amd(nir_builder *build)
2455 {
2456 return nir_load_system_value(build, nir_intrinsic_load_user_data_amd,
2457 0, 4, 32);
2458 }
2459
2460 static inline nir_ssa_def *
nir_load_vertex_id(nir_builder * build)2461 nir_load_vertex_id(nir_builder *build)
2462 {
2463 return nir_load_system_value(build, nir_intrinsic_load_vertex_id,
2464 0, 1, 32);
2465 }
2466
2467 static inline nir_ssa_def *
nir_load_vertex_id_zero_base(nir_builder * build)2468 nir_load_vertex_id_zero_base(nir_builder *build)
2469 {
2470 return nir_load_system_value(build, nir_intrinsic_load_vertex_id_zero_base,
2471 0, 1, 32);
2472 }
2473
2474 static inline nir_ssa_def *
nir_load_view_index(nir_builder * build)2475 nir_load_view_index(nir_builder *build)
2476 {
2477 return nir_load_system_value(build, nir_intrinsic_load_view_index,
2478 0, 1, 32);
2479 }
2480
2481 static inline nir_ssa_def *
nir_load_viewport_offset(nir_builder * build)2482 nir_load_viewport_offset(nir_builder *build)
2483 {
2484 return nir_load_system_value(build, nir_intrinsic_load_viewport_offset,
2485 0, 3, 32);
2486 }
2487
2488 static inline nir_ssa_def *
nir_load_viewport_scale(nir_builder * build)2489 nir_load_viewport_scale(nir_builder *build)
2490 {
2491 return nir_load_system_value(build, nir_intrinsic_load_viewport_scale,
2492 0, 3, 32);
2493 }
2494
2495 static inline nir_ssa_def *
nir_load_viewport_x_scale(nir_builder * build)2496 nir_load_viewport_x_scale(nir_builder *build)
2497 {
2498 return nir_load_system_value(build, nir_intrinsic_load_viewport_x_scale,
2499 0, 1, 32);
2500 }
2501
2502 static inline nir_ssa_def *
nir_load_viewport_y_scale(nir_builder * build)2503 nir_load_viewport_y_scale(nir_builder *build)
2504 {
2505 return nir_load_system_value(build, nir_intrinsic_load_viewport_y_scale,
2506 0, 1, 32);
2507 }
2508
2509 static inline nir_ssa_def *
nir_load_viewport_z_offset(nir_builder * build)2510 nir_load_viewport_z_offset(nir_builder *build)
2511 {
2512 return nir_load_system_value(build, nir_intrinsic_load_viewport_z_offset,
2513 0, 1, 32);
2514 }
2515
2516 static inline nir_ssa_def *
nir_load_viewport_z_scale(nir_builder * build)2517 nir_load_viewport_z_scale(nir_builder *build)
2518 {
2519 return nir_load_system_value(build, nir_intrinsic_load_viewport_z_scale,
2520 0, 1, 32);
2521 }
2522
2523 static inline nir_ssa_def *
nir_load_vs_primitive_stride_ir3(nir_builder * build)2524 nir_load_vs_primitive_stride_ir3(nir_builder *build)
2525 {
2526 return nir_load_system_value(build, nir_intrinsic_load_vs_primitive_stride_ir3,
2527 0, 1, 32);
2528 }
2529
2530 static inline nir_ssa_def *
nir_load_vs_vertex_stride_ir3(nir_builder * build)2531 nir_load_vs_vertex_stride_ir3(nir_builder *build)
2532 {
2533 return nir_load_system_value(build, nir_intrinsic_load_vs_vertex_stride_ir3,
2534 0, 1, 32);
2535 }
2536
2537 static inline nir_ssa_def *
nir_load_work_dim(nir_builder * build)2538 nir_load_work_dim(nir_builder *build)
2539 {
2540 return nir_load_system_value(build, nir_intrinsic_load_work_dim,
2541 0, 1, 32);
2542 }
2543
2544 static inline nir_ssa_def *
nir_load_work_group_id(nir_builder * build,unsigned bit_size)2545 nir_load_work_group_id(nir_builder *build, unsigned bit_size)
2546 {
2547 return nir_load_system_value(build, nir_intrinsic_load_work_group_id,
2548 0, 3, bit_size);
2549 }
2550
2551 static inline nir_ssa_def *
nir_load_work_group_id_zero_base(nir_builder * build)2552 nir_load_work_group_id_zero_base(nir_builder *build)
2553 {
2554 return nir_load_system_value(build, nir_intrinsic_load_work_group_id_zero_base,
2555 0, 3, 32);
2556 }
2557
2558 #endif /* _NIR_BUILDER_OPCODES_ */
2559