Home | History | Annotate | Download | only in nir
      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 *
     29 nir_b2f(nir_builder *build, nir_ssa_def *src0)
     30 {
     31    return nir_build_alu(build, nir_op_b2f, src0, NULL, NULL, NULL);
     32 }
     33 static inline nir_ssa_def *
     34 nir_b2i(nir_builder *build, nir_ssa_def *src0)
     35 {
     36    return nir_build_alu(build, nir_op_b2i, src0, NULL, NULL, NULL);
     37 }
     38 static inline nir_ssa_def *
     39 nir_ball_fequal2(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
     40 {
     41    return nir_build_alu(build, nir_op_ball_fequal2, src0, src1, NULL, NULL);
     42 }
     43 static inline nir_ssa_def *
     44 nir_ball_fequal3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
     45 {
     46    return nir_build_alu(build, nir_op_ball_fequal3, src0, src1, NULL, NULL);
     47 }
     48 static inline nir_ssa_def *
     49 nir_ball_fequal4(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
     50 {
     51    return nir_build_alu(build, nir_op_ball_fequal4, src0, src1, NULL, NULL);
     52 }
     53 static inline nir_ssa_def *
     54 nir_ball_iequal2(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
     55 {
     56    return nir_build_alu(build, nir_op_ball_iequal2, src0, src1, NULL, NULL);
     57 }
     58 static inline nir_ssa_def *
     59 nir_ball_iequal3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
     60 {
     61    return nir_build_alu(build, nir_op_ball_iequal3, src0, src1, NULL, NULL);
     62 }
     63 static inline nir_ssa_def *
     64 nir_ball_iequal4(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
     65 {
     66    return nir_build_alu(build, nir_op_ball_iequal4, src0, src1, NULL, NULL);
     67 }
     68 static inline nir_ssa_def *
     69 nir_bany_fnequal2(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
     70 {
     71    return nir_build_alu(build, nir_op_bany_fnequal2, src0, src1, NULL, NULL);
     72 }
     73 static inline nir_ssa_def *
     74 nir_bany_fnequal3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
     75 {
     76    return nir_build_alu(build, nir_op_bany_fnequal3, src0, src1, NULL, NULL);
     77 }
     78 static inline nir_ssa_def *
     79 nir_bany_fnequal4(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
     80 {
     81    return nir_build_alu(build, nir_op_bany_fnequal4, src0, src1, NULL, NULL);
     82 }
     83 static inline nir_ssa_def *
     84 nir_bany_inequal2(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
     85 {
     86    return nir_build_alu(build, nir_op_bany_inequal2, src0, src1, NULL, NULL);
     87 }
     88 static inline nir_ssa_def *
     89 nir_bany_inequal3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
     90 {
     91    return nir_build_alu(build, nir_op_bany_inequal3, src0, src1, NULL, NULL);
     92 }
     93 static inline nir_ssa_def *
     94 nir_bany_inequal4(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
     95 {
     96    return nir_build_alu(build, nir_op_bany_inequal4, src0, src1, NULL, NULL);
     97 }
     98 static inline nir_ssa_def *
     99 nir_bcsel(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
    100 {
    101    return nir_build_alu(build, nir_op_bcsel, src0, src1, src2, NULL);
    102 }
    103 static inline nir_ssa_def *
    104 nir_bfi(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
    105 {
    106    return nir_build_alu(build, nir_op_bfi, src0, src1, src2, NULL);
    107 }
    108 static inline nir_ssa_def *
    109 nir_bfm(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    110 {
    111    return nir_build_alu(build, nir_op_bfm, src0, src1, NULL, NULL);
    112 }
    113 static inline nir_ssa_def *
    114 nir_bit_count(nir_builder *build, nir_ssa_def *src0)
    115 {
    116    return nir_build_alu(build, nir_op_bit_count, src0, NULL, NULL, NULL);
    117 }
    118 static inline nir_ssa_def *
    119 nir_bitfield_insert(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2, nir_ssa_def *src3)
    120 {
    121    return nir_build_alu(build, nir_op_bitfield_insert, src0, src1, src2, src3);
    122 }
    123 static inline nir_ssa_def *
    124 nir_bitfield_reverse(nir_builder *build, nir_ssa_def *src0)
    125 {
    126    return nir_build_alu(build, nir_op_bitfield_reverse, src0, NULL, NULL, NULL);
    127 }
    128 static inline nir_ssa_def *
    129 nir_d2b(nir_builder *build, nir_ssa_def *src0)
    130 {
    131    return nir_build_alu(build, nir_op_d2b, src0, NULL, NULL, NULL);
    132 }
    133 static inline nir_ssa_def *
    134 nir_d2f(nir_builder *build, nir_ssa_def *src0)
    135 {
    136    return nir_build_alu(build, nir_op_d2f, src0, NULL, NULL, NULL);
    137 }
    138 static inline nir_ssa_def *
    139 nir_d2i(nir_builder *build, nir_ssa_def *src0)
    140 {
    141    return nir_build_alu(build, nir_op_d2i, src0, NULL, NULL, NULL);
    142 }
    143 static inline nir_ssa_def *
    144 nir_d2u(nir_builder *build, nir_ssa_def *src0)
    145 {
    146    return nir_build_alu(build, nir_op_d2u, src0, NULL, NULL, NULL);
    147 }
    148 static inline nir_ssa_def *
    149 nir_extract_i16(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    150 {
    151    return nir_build_alu(build, nir_op_extract_i16, src0, src1, NULL, NULL);
    152 }
    153 static inline nir_ssa_def *
    154 nir_extract_i8(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    155 {
    156    return nir_build_alu(build, nir_op_extract_i8, src0, src1, NULL, NULL);
    157 }
    158 static inline nir_ssa_def *
    159 nir_extract_u16(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    160 {
    161    return nir_build_alu(build, nir_op_extract_u16, src0, src1, NULL, NULL);
    162 }
    163 static inline nir_ssa_def *
    164 nir_extract_u8(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    165 {
    166    return nir_build_alu(build, nir_op_extract_u8, src0, src1, NULL, NULL);
    167 }
    168 static inline nir_ssa_def *
    169 nir_f2b(nir_builder *build, nir_ssa_def *src0)
    170 {
    171    return nir_build_alu(build, nir_op_f2b, src0, NULL, NULL, NULL);
    172 }
    173 static inline nir_ssa_def *
    174 nir_f2d(nir_builder *build, nir_ssa_def *src0)
    175 {
    176    return nir_build_alu(build, nir_op_f2d, src0, NULL, NULL, NULL);
    177 }
    178 static inline nir_ssa_def *
    179 nir_f2i(nir_builder *build, nir_ssa_def *src0)
    180 {
    181    return nir_build_alu(build, nir_op_f2i, src0, NULL, NULL, NULL);
    182 }
    183 static inline nir_ssa_def *
    184 nir_f2u(nir_builder *build, nir_ssa_def *src0)
    185 {
    186    return nir_build_alu(build, nir_op_f2u, src0, NULL, NULL, NULL);
    187 }
    188 static inline nir_ssa_def *
    189 nir_fabs(nir_builder *build, nir_ssa_def *src0)
    190 {
    191    return nir_build_alu(build, nir_op_fabs, src0, NULL, NULL, NULL);
    192 }
    193 static inline nir_ssa_def *
    194 nir_fadd(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    195 {
    196    return nir_build_alu(build, nir_op_fadd, src0, src1, NULL, NULL);
    197 }
    198 static inline nir_ssa_def *
    199 nir_fall_equal2(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    200 {
    201    return nir_build_alu(build, nir_op_fall_equal2, src0, src1, NULL, NULL);
    202 }
    203 static inline nir_ssa_def *
    204 nir_fall_equal3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    205 {
    206    return nir_build_alu(build, nir_op_fall_equal3, src0, src1, NULL, NULL);
    207 }
    208 static inline nir_ssa_def *
    209 nir_fall_equal4(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    210 {
    211    return nir_build_alu(build, nir_op_fall_equal4, src0, src1, NULL, NULL);
    212 }
    213 static inline nir_ssa_def *
    214 nir_fand(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    215 {
    216    return nir_build_alu(build, nir_op_fand, src0, src1, NULL, NULL);
    217 }
    218 static inline nir_ssa_def *
    219 nir_fany_nequal2(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    220 {
    221    return nir_build_alu(build, nir_op_fany_nequal2, src0, src1, NULL, NULL);
    222 }
    223 static inline nir_ssa_def *
    224 nir_fany_nequal3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    225 {
    226    return nir_build_alu(build, nir_op_fany_nequal3, src0, src1, NULL, NULL);
    227 }
    228 static inline nir_ssa_def *
    229 nir_fany_nequal4(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    230 {
    231    return nir_build_alu(build, nir_op_fany_nequal4, src0, src1, NULL, NULL);
    232 }
    233 static inline nir_ssa_def *
    234 nir_fceil(nir_builder *build, nir_ssa_def *src0)
    235 {
    236    return nir_build_alu(build, nir_op_fceil, src0, NULL, NULL, NULL);
    237 }
    238 static inline nir_ssa_def *
    239 nir_fcos(nir_builder *build, nir_ssa_def *src0)
    240 {
    241    return nir_build_alu(build, nir_op_fcos, src0, NULL, NULL, NULL);
    242 }
    243 static inline nir_ssa_def *
    244 nir_fcsel(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
    245 {
    246    return nir_build_alu(build, nir_op_fcsel, src0, src1, src2, NULL);
    247 }
    248 static inline nir_ssa_def *
    249 nir_fddx(nir_builder *build, nir_ssa_def *src0)
    250 {
    251    return nir_build_alu(build, nir_op_fddx, src0, NULL, NULL, NULL);
    252 }
    253 static inline nir_ssa_def *
    254 nir_fddx_coarse(nir_builder *build, nir_ssa_def *src0)
    255 {
    256    return nir_build_alu(build, nir_op_fddx_coarse, src0, NULL, NULL, NULL);
    257 }
    258 static inline nir_ssa_def *
    259 nir_fddx_fine(nir_builder *build, nir_ssa_def *src0)
    260 {
    261    return nir_build_alu(build, nir_op_fddx_fine, src0, NULL, NULL, NULL);
    262 }
    263 static inline nir_ssa_def *
    264 nir_fddy(nir_builder *build, nir_ssa_def *src0)
    265 {
    266    return nir_build_alu(build, nir_op_fddy, src0, NULL, NULL, NULL);
    267 }
    268 static inline nir_ssa_def *
    269 nir_fddy_coarse(nir_builder *build, nir_ssa_def *src0)
    270 {
    271    return nir_build_alu(build, nir_op_fddy_coarse, src0, NULL, NULL, NULL);
    272 }
    273 static inline nir_ssa_def *
    274 nir_fddy_fine(nir_builder *build, nir_ssa_def *src0)
    275 {
    276    return nir_build_alu(build, nir_op_fddy_fine, src0, NULL, NULL, NULL);
    277 }
    278 static inline nir_ssa_def *
    279 nir_fdiv(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    280 {
    281    return nir_build_alu(build, nir_op_fdiv, src0, src1, NULL, NULL);
    282 }
    283 static inline nir_ssa_def *
    284 nir_fdot2(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    285 {
    286    return nir_build_alu(build, nir_op_fdot2, src0, src1, NULL, NULL);
    287 }
    288 static inline nir_ssa_def *
    289 nir_fdot3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    290 {
    291    return nir_build_alu(build, nir_op_fdot3, src0, src1, NULL, NULL);
    292 }
    293 static inline nir_ssa_def *
    294 nir_fdot4(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    295 {
    296    return nir_build_alu(build, nir_op_fdot4, src0, src1, NULL, NULL);
    297 }
    298 static inline nir_ssa_def *
    299 nir_fdot_replicated2(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    300 {
    301    return nir_build_alu(build, nir_op_fdot_replicated2, src0, src1, NULL, NULL);
    302 }
    303 static inline nir_ssa_def *
    304 nir_fdot_replicated3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    305 {
    306    return nir_build_alu(build, nir_op_fdot_replicated3, src0, src1, NULL, NULL);
    307 }
    308 static inline nir_ssa_def *
    309 nir_fdot_replicated4(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    310 {
    311    return nir_build_alu(build, nir_op_fdot_replicated4, src0, src1, NULL, NULL);
    312 }
    313 static inline nir_ssa_def *
    314 nir_fdph(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    315 {
    316    return nir_build_alu(build, nir_op_fdph, src0, src1, NULL, NULL);
    317 }
    318 static inline nir_ssa_def *
    319 nir_fdph_replicated(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    320 {
    321    return nir_build_alu(build, nir_op_fdph_replicated, src0, src1, NULL, NULL);
    322 }
    323 static inline nir_ssa_def *
    324 nir_feq(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    325 {
    326    return nir_build_alu(build, nir_op_feq, src0, src1, NULL, NULL);
    327 }
    328 static inline nir_ssa_def *
    329 nir_fexp2(nir_builder *build, nir_ssa_def *src0)
    330 {
    331    return nir_build_alu(build, nir_op_fexp2, src0, NULL, NULL, NULL);
    332 }
    333 static inline nir_ssa_def *
    334 nir_ffloor(nir_builder *build, nir_ssa_def *src0)
    335 {
    336    return nir_build_alu(build, nir_op_ffloor, src0, NULL, NULL, NULL);
    337 }
    338 static inline nir_ssa_def *
    339 nir_ffma(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
    340 {
    341    return nir_build_alu(build, nir_op_ffma, src0, src1, src2, NULL);
    342 }
    343 static inline nir_ssa_def *
    344 nir_ffract(nir_builder *build, nir_ssa_def *src0)
    345 {
    346    return nir_build_alu(build, nir_op_ffract, src0, NULL, NULL, NULL);
    347 }
    348 static inline nir_ssa_def *
    349 nir_fge(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    350 {
    351    return nir_build_alu(build, nir_op_fge, src0, src1, NULL, NULL);
    352 }
    353 static inline nir_ssa_def *
    354 nir_find_lsb(nir_builder *build, nir_ssa_def *src0)
    355 {
    356    return nir_build_alu(build, nir_op_find_lsb, src0, NULL, NULL, NULL);
    357 }
    358 static inline nir_ssa_def *
    359 nir_flog2(nir_builder *build, nir_ssa_def *src0)
    360 {
    361    return nir_build_alu(build, nir_op_flog2, src0, NULL, NULL, NULL);
    362 }
    363 static inline nir_ssa_def *
    364 nir_flrp(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
    365 {
    366    return nir_build_alu(build, nir_op_flrp, src0, src1, src2, NULL);
    367 }
    368 static inline nir_ssa_def *
    369 nir_flt(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    370 {
    371    return nir_build_alu(build, nir_op_flt, src0, src1, NULL, NULL);
    372 }
    373 static inline nir_ssa_def *
    374 nir_fmax(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    375 {
    376    return nir_build_alu(build, nir_op_fmax, src0, src1, NULL, NULL);
    377 }
    378 static inline nir_ssa_def *
    379 nir_fmin(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    380 {
    381    return nir_build_alu(build, nir_op_fmin, src0, src1, NULL, NULL);
    382 }
    383 static inline nir_ssa_def *
    384 nir_fmod(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    385 {
    386    return nir_build_alu(build, nir_op_fmod, src0, src1, NULL, NULL);
    387 }
    388 static inline nir_ssa_def *
    389 nir_fmov(nir_builder *build, nir_ssa_def *src0)
    390 {
    391    return nir_build_alu(build, nir_op_fmov, src0, NULL, NULL, NULL);
    392 }
    393 static inline nir_ssa_def *
    394 nir_fmul(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    395 {
    396    return nir_build_alu(build, nir_op_fmul, src0, src1, NULL, NULL);
    397 }
    398 static inline nir_ssa_def *
    399 nir_fne(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    400 {
    401    return nir_build_alu(build, nir_op_fne, src0, src1, NULL, NULL);
    402 }
    403 static inline nir_ssa_def *
    404 nir_fneg(nir_builder *build, nir_ssa_def *src0)
    405 {
    406    return nir_build_alu(build, nir_op_fneg, src0, NULL, NULL, NULL);
    407 }
    408 static inline nir_ssa_def *
    409 nir_fnoise1_1(nir_builder *build, nir_ssa_def *src0)
    410 {
    411    return nir_build_alu(build, nir_op_fnoise1_1, src0, NULL, NULL, NULL);
    412 }
    413 static inline nir_ssa_def *
    414 nir_fnoise1_2(nir_builder *build, nir_ssa_def *src0)
    415 {
    416    return nir_build_alu(build, nir_op_fnoise1_2, src0, NULL, NULL, NULL);
    417 }
    418 static inline nir_ssa_def *
    419 nir_fnoise1_3(nir_builder *build, nir_ssa_def *src0)
    420 {
    421    return nir_build_alu(build, nir_op_fnoise1_3, src0, NULL, NULL, NULL);
    422 }
    423 static inline nir_ssa_def *
    424 nir_fnoise1_4(nir_builder *build, nir_ssa_def *src0)
    425 {
    426    return nir_build_alu(build, nir_op_fnoise1_4, src0, NULL, NULL, NULL);
    427 }
    428 static inline nir_ssa_def *
    429 nir_fnoise2_1(nir_builder *build, nir_ssa_def *src0)
    430 {
    431    return nir_build_alu(build, nir_op_fnoise2_1, src0, NULL, NULL, NULL);
    432 }
    433 static inline nir_ssa_def *
    434 nir_fnoise2_2(nir_builder *build, nir_ssa_def *src0)
    435 {
    436    return nir_build_alu(build, nir_op_fnoise2_2, src0, NULL, NULL, NULL);
    437 }
    438 static inline nir_ssa_def *
    439 nir_fnoise2_3(nir_builder *build, nir_ssa_def *src0)
    440 {
    441    return nir_build_alu(build, nir_op_fnoise2_3, src0, NULL, NULL, NULL);
    442 }
    443 static inline nir_ssa_def *
    444 nir_fnoise2_4(nir_builder *build, nir_ssa_def *src0)
    445 {
    446    return nir_build_alu(build, nir_op_fnoise2_4, src0, NULL, NULL, NULL);
    447 }
    448 static inline nir_ssa_def *
    449 nir_fnoise3_1(nir_builder *build, nir_ssa_def *src0)
    450 {
    451    return nir_build_alu(build, nir_op_fnoise3_1, src0, NULL, NULL, NULL);
    452 }
    453 static inline nir_ssa_def *
    454 nir_fnoise3_2(nir_builder *build, nir_ssa_def *src0)
    455 {
    456    return nir_build_alu(build, nir_op_fnoise3_2, src0, NULL, NULL, NULL);
    457 }
    458 static inline nir_ssa_def *
    459 nir_fnoise3_3(nir_builder *build, nir_ssa_def *src0)
    460 {
    461    return nir_build_alu(build, nir_op_fnoise3_3, src0, NULL, NULL, NULL);
    462 }
    463 static inline nir_ssa_def *
    464 nir_fnoise3_4(nir_builder *build, nir_ssa_def *src0)
    465 {
    466    return nir_build_alu(build, nir_op_fnoise3_4, src0, NULL, NULL, NULL);
    467 }
    468 static inline nir_ssa_def *
    469 nir_fnoise4_1(nir_builder *build, nir_ssa_def *src0)
    470 {
    471    return nir_build_alu(build, nir_op_fnoise4_1, src0, NULL, NULL, NULL);
    472 }
    473 static inline nir_ssa_def *
    474 nir_fnoise4_2(nir_builder *build, nir_ssa_def *src0)
    475 {
    476    return nir_build_alu(build, nir_op_fnoise4_2, src0, NULL, NULL, NULL);
    477 }
    478 static inline nir_ssa_def *
    479 nir_fnoise4_3(nir_builder *build, nir_ssa_def *src0)
    480 {
    481    return nir_build_alu(build, nir_op_fnoise4_3, src0, NULL, NULL, NULL);
    482 }
    483 static inline nir_ssa_def *
    484 nir_fnoise4_4(nir_builder *build, nir_ssa_def *src0)
    485 {
    486    return nir_build_alu(build, nir_op_fnoise4_4, src0, NULL, NULL, NULL);
    487 }
    488 static inline nir_ssa_def *
    489 nir_fnot(nir_builder *build, nir_ssa_def *src0)
    490 {
    491    return nir_build_alu(build, nir_op_fnot, src0, NULL, NULL, NULL);
    492 }
    493 static inline nir_ssa_def *
    494 nir_for(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    495 {
    496    return nir_build_alu(build, nir_op_for, src0, src1, NULL, NULL);
    497 }
    498 static inline nir_ssa_def *
    499 nir_fpow(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    500 {
    501    return nir_build_alu(build, nir_op_fpow, src0, src1, NULL, NULL);
    502 }
    503 static inline nir_ssa_def *
    504 nir_fquantize2f16(nir_builder *build, nir_ssa_def *src0)
    505 {
    506    return nir_build_alu(build, nir_op_fquantize2f16, src0, NULL, NULL, NULL);
    507 }
    508 static inline nir_ssa_def *
    509 nir_frcp(nir_builder *build, nir_ssa_def *src0)
    510 {
    511    return nir_build_alu(build, nir_op_frcp, src0, NULL, NULL, NULL);
    512 }
    513 static inline nir_ssa_def *
    514 nir_frem(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    515 {
    516    return nir_build_alu(build, nir_op_frem, src0, src1, NULL, NULL);
    517 }
    518 static inline nir_ssa_def *
    519 nir_fround_even(nir_builder *build, nir_ssa_def *src0)
    520 {
    521    return nir_build_alu(build, nir_op_fround_even, src0, NULL, NULL, NULL);
    522 }
    523 static inline nir_ssa_def *
    524 nir_frsq(nir_builder *build, nir_ssa_def *src0)
    525 {
    526    return nir_build_alu(build, nir_op_frsq, src0, NULL, NULL, NULL);
    527 }
    528 static inline nir_ssa_def *
    529 nir_fsat(nir_builder *build, nir_ssa_def *src0)
    530 {
    531    return nir_build_alu(build, nir_op_fsat, src0, NULL, NULL, NULL);
    532 }
    533 static inline nir_ssa_def *
    534 nir_fsign(nir_builder *build, nir_ssa_def *src0)
    535 {
    536    return nir_build_alu(build, nir_op_fsign, src0, NULL, NULL, NULL);
    537 }
    538 static inline nir_ssa_def *
    539 nir_fsin(nir_builder *build, nir_ssa_def *src0)
    540 {
    541    return nir_build_alu(build, nir_op_fsin, src0, NULL, NULL, NULL);
    542 }
    543 static inline nir_ssa_def *
    544 nir_fsqrt(nir_builder *build, nir_ssa_def *src0)
    545 {
    546    return nir_build_alu(build, nir_op_fsqrt, src0, NULL, NULL, NULL);
    547 }
    548 static inline nir_ssa_def *
    549 nir_fsub(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    550 {
    551    return nir_build_alu(build, nir_op_fsub, src0, src1, NULL, NULL);
    552 }
    553 static inline nir_ssa_def *
    554 nir_ftrunc(nir_builder *build, nir_ssa_def *src0)
    555 {
    556    return nir_build_alu(build, nir_op_ftrunc, src0, NULL, NULL, NULL);
    557 }
    558 static inline nir_ssa_def *
    559 nir_fxor(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    560 {
    561    return nir_build_alu(build, nir_op_fxor, src0, src1, NULL, NULL);
    562 }
    563 static inline nir_ssa_def *
    564 nir_i2b(nir_builder *build, nir_ssa_def *src0)
    565 {
    566    return nir_build_alu(build, nir_op_i2b, src0, NULL, NULL, NULL);
    567 }
    568 static inline nir_ssa_def *
    569 nir_i2d(nir_builder *build, nir_ssa_def *src0)
    570 {
    571    return nir_build_alu(build, nir_op_i2d, src0, NULL, NULL, NULL);
    572 }
    573 static inline nir_ssa_def *
    574 nir_i2f(nir_builder *build, nir_ssa_def *src0)
    575 {
    576    return nir_build_alu(build, nir_op_i2f, src0, NULL, NULL, NULL);
    577 }
    578 static inline nir_ssa_def *
    579 nir_iabs(nir_builder *build, nir_ssa_def *src0)
    580 {
    581    return nir_build_alu(build, nir_op_iabs, src0, NULL, NULL, NULL);
    582 }
    583 static inline nir_ssa_def *
    584 nir_iadd(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    585 {
    586    return nir_build_alu(build, nir_op_iadd, src0, src1, NULL, NULL);
    587 }
    588 static inline nir_ssa_def *
    589 nir_iand(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    590 {
    591    return nir_build_alu(build, nir_op_iand, src0, src1, NULL, NULL);
    592 }
    593 static inline nir_ssa_def *
    594 nir_ibfe(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
    595 {
    596    return nir_build_alu(build, nir_op_ibfe, src0, src1, src2, NULL);
    597 }
    598 static inline nir_ssa_def *
    599 nir_ibitfield_extract(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
    600 {
    601    return nir_build_alu(build, nir_op_ibitfield_extract, src0, src1, src2, NULL);
    602 }
    603 static inline nir_ssa_def *
    604 nir_idiv(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    605 {
    606    return nir_build_alu(build, nir_op_idiv, src0, src1, NULL, NULL);
    607 }
    608 static inline nir_ssa_def *
    609 nir_ieq(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    610 {
    611    return nir_build_alu(build, nir_op_ieq, src0, src1, NULL, NULL);
    612 }
    613 static inline nir_ssa_def *
    614 nir_ifind_msb(nir_builder *build, nir_ssa_def *src0)
    615 {
    616    return nir_build_alu(build, nir_op_ifind_msb, src0, NULL, NULL, NULL);
    617 }
    618 static inline nir_ssa_def *
    619 nir_ige(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    620 {
    621    return nir_build_alu(build, nir_op_ige, src0, src1, NULL, NULL);
    622 }
    623 static inline nir_ssa_def *
    624 nir_ilt(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    625 {
    626    return nir_build_alu(build, nir_op_ilt, src0, src1, NULL, NULL);
    627 }
    628 static inline nir_ssa_def *
    629 nir_imax(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    630 {
    631    return nir_build_alu(build, nir_op_imax, src0, src1, NULL, NULL);
    632 }
    633 static inline nir_ssa_def *
    634 nir_imin(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    635 {
    636    return nir_build_alu(build, nir_op_imin, src0, src1, NULL, NULL);
    637 }
    638 static inline nir_ssa_def *
    639 nir_imod(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    640 {
    641    return nir_build_alu(build, nir_op_imod, src0, src1, NULL, NULL);
    642 }
    643 static inline nir_ssa_def *
    644 nir_imov(nir_builder *build, nir_ssa_def *src0)
    645 {
    646    return nir_build_alu(build, nir_op_imov, src0, NULL, NULL, NULL);
    647 }
    648 static inline nir_ssa_def *
    649 nir_imul(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    650 {
    651    return nir_build_alu(build, nir_op_imul, src0, src1, NULL, NULL);
    652 }
    653 static inline nir_ssa_def *
    654 nir_imul_high(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    655 {
    656    return nir_build_alu(build, nir_op_imul_high, src0, src1, NULL, NULL);
    657 }
    658 static inline nir_ssa_def *
    659 nir_ine(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    660 {
    661    return nir_build_alu(build, nir_op_ine, src0, src1, NULL, NULL);
    662 }
    663 static inline nir_ssa_def *
    664 nir_ineg(nir_builder *build, nir_ssa_def *src0)
    665 {
    666    return nir_build_alu(build, nir_op_ineg, src0, NULL, NULL, NULL);
    667 }
    668 static inline nir_ssa_def *
    669 nir_inot(nir_builder *build, nir_ssa_def *src0)
    670 {
    671    return nir_build_alu(build, nir_op_inot, src0, NULL, NULL, NULL);
    672 }
    673 static inline nir_ssa_def *
    674 nir_ior(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    675 {
    676    return nir_build_alu(build, nir_op_ior, src0, src1, NULL, NULL);
    677 }
    678 static inline nir_ssa_def *
    679 nir_irem(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    680 {
    681    return nir_build_alu(build, nir_op_irem, src0, src1, NULL, NULL);
    682 }
    683 static inline nir_ssa_def *
    684 nir_ishl(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    685 {
    686    return nir_build_alu(build, nir_op_ishl, src0, src1, NULL, NULL);
    687 }
    688 static inline nir_ssa_def *
    689 nir_ishr(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    690 {
    691    return nir_build_alu(build, nir_op_ishr, src0, src1, NULL, NULL);
    692 }
    693 static inline nir_ssa_def *
    694 nir_isign(nir_builder *build, nir_ssa_def *src0)
    695 {
    696    return nir_build_alu(build, nir_op_isign, src0, NULL, NULL, NULL);
    697 }
    698 static inline nir_ssa_def *
    699 nir_isub(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    700 {
    701    return nir_build_alu(build, nir_op_isub, src0, src1, NULL, NULL);
    702 }
    703 static inline nir_ssa_def *
    704 nir_ixor(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    705 {
    706    return nir_build_alu(build, nir_op_ixor, src0, src1, NULL, NULL);
    707 }
    708 static inline nir_ssa_def *
    709 nir_ldexp(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    710 {
    711    return nir_build_alu(build, nir_op_ldexp, src0, src1, NULL, NULL);
    712 }
    713 static inline nir_ssa_def *
    714 nir_pack_double_2x32(nir_builder *build, nir_ssa_def *src0)
    715 {
    716    return nir_build_alu(build, nir_op_pack_double_2x32, src0, NULL, NULL, NULL);
    717 }
    718 static inline nir_ssa_def *
    719 nir_pack_double_2x32_split(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    720 {
    721    return nir_build_alu(build, nir_op_pack_double_2x32_split, src0, src1, NULL, NULL);
    722 }
    723 static inline nir_ssa_def *
    724 nir_pack_half_2x16(nir_builder *build, nir_ssa_def *src0)
    725 {
    726    return nir_build_alu(build, nir_op_pack_half_2x16, src0, NULL, NULL, NULL);
    727 }
    728 static inline nir_ssa_def *
    729 nir_pack_half_2x16_split(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    730 {
    731    return nir_build_alu(build, nir_op_pack_half_2x16_split, src0, src1, NULL, NULL);
    732 }
    733 static inline nir_ssa_def *
    734 nir_pack_snorm_2x16(nir_builder *build, nir_ssa_def *src0)
    735 {
    736    return nir_build_alu(build, nir_op_pack_snorm_2x16, src0, NULL, NULL, NULL);
    737 }
    738 static inline nir_ssa_def *
    739 nir_pack_snorm_4x8(nir_builder *build, nir_ssa_def *src0)
    740 {
    741    return nir_build_alu(build, nir_op_pack_snorm_4x8, src0, NULL, NULL, NULL);
    742 }
    743 static inline nir_ssa_def *
    744 nir_pack_unorm_2x16(nir_builder *build, nir_ssa_def *src0)
    745 {
    746    return nir_build_alu(build, nir_op_pack_unorm_2x16, src0, NULL, NULL, NULL);
    747 }
    748 static inline nir_ssa_def *
    749 nir_pack_unorm_4x8(nir_builder *build, nir_ssa_def *src0)
    750 {
    751    return nir_build_alu(build, nir_op_pack_unorm_4x8, src0, NULL, NULL, NULL);
    752 }
    753 static inline nir_ssa_def *
    754 nir_pack_uvec2_to_uint(nir_builder *build, nir_ssa_def *src0)
    755 {
    756    return nir_build_alu(build, nir_op_pack_uvec2_to_uint, src0, NULL, NULL, NULL);
    757 }
    758 static inline nir_ssa_def *
    759 nir_pack_uvec4_to_uint(nir_builder *build, nir_ssa_def *src0)
    760 {
    761    return nir_build_alu(build, nir_op_pack_uvec4_to_uint, src0, NULL, NULL, NULL);
    762 }
    763 static inline nir_ssa_def *
    764 nir_seq(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    765 {
    766    return nir_build_alu(build, nir_op_seq, src0, src1, NULL, NULL);
    767 }
    768 static inline nir_ssa_def *
    769 nir_sge(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    770 {
    771    return nir_build_alu(build, nir_op_sge, src0, src1, NULL, NULL);
    772 }
    773 static inline nir_ssa_def *
    774 nir_slt(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    775 {
    776    return nir_build_alu(build, nir_op_slt, src0, src1, NULL, NULL);
    777 }
    778 static inline nir_ssa_def *
    779 nir_sne(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    780 {
    781    return nir_build_alu(build, nir_op_sne, src0, src1, NULL, NULL);
    782 }
    783 static inline nir_ssa_def *
    784 nir_u2d(nir_builder *build, nir_ssa_def *src0)
    785 {
    786    return nir_build_alu(build, nir_op_u2d, src0, NULL, NULL, NULL);
    787 }
    788 static inline nir_ssa_def *
    789 nir_u2f(nir_builder *build, nir_ssa_def *src0)
    790 {
    791    return nir_build_alu(build, nir_op_u2f, src0, NULL, NULL, NULL);
    792 }
    793 static inline nir_ssa_def *
    794 nir_uadd_carry(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    795 {
    796    return nir_build_alu(build, nir_op_uadd_carry, src0, src1, NULL, NULL);
    797 }
    798 static inline nir_ssa_def *
    799 nir_ubfe(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
    800 {
    801    return nir_build_alu(build, nir_op_ubfe, src0, src1, src2, NULL);
    802 }
    803 static inline nir_ssa_def *
    804 nir_ubitfield_extract(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
    805 {
    806    return nir_build_alu(build, nir_op_ubitfield_extract, src0, src1, src2, NULL);
    807 }
    808 static inline nir_ssa_def *
    809 nir_udiv(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    810 {
    811    return nir_build_alu(build, nir_op_udiv, src0, src1, NULL, NULL);
    812 }
    813 static inline nir_ssa_def *
    814 nir_ufind_msb(nir_builder *build, nir_ssa_def *src0)
    815 {
    816    return nir_build_alu(build, nir_op_ufind_msb, src0, NULL, NULL, NULL);
    817 }
    818 static inline nir_ssa_def *
    819 nir_uge(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    820 {
    821    return nir_build_alu(build, nir_op_uge, src0, src1, NULL, NULL);
    822 }
    823 static inline nir_ssa_def *
    824 nir_ult(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    825 {
    826    return nir_build_alu(build, nir_op_ult, src0, src1, NULL, NULL);
    827 }
    828 static inline nir_ssa_def *
    829 nir_umax(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    830 {
    831    return nir_build_alu(build, nir_op_umax, src0, src1, NULL, NULL);
    832 }
    833 static inline nir_ssa_def *
    834 nir_umax_4x8(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    835 {
    836    return nir_build_alu(build, nir_op_umax_4x8, src0, src1, NULL, NULL);
    837 }
    838 static inline nir_ssa_def *
    839 nir_umin(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    840 {
    841    return nir_build_alu(build, nir_op_umin, src0, src1, NULL, NULL);
    842 }
    843 static inline nir_ssa_def *
    844 nir_umin_4x8(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    845 {
    846    return nir_build_alu(build, nir_op_umin_4x8, src0, src1, NULL, NULL);
    847 }
    848 static inline nir_ssa_def *
    849 nir_umod(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    850 {
    851    return nir_build_alu(build, nir_op_umod, src0, src1, NULL, NULL);
    852 }
    853 static inline nir_ssa_def *
    854 nir_umul_high(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    855 {
    856    return nir_build_alu(build, nir_op_umul_high, src0, src1, NULL, NULL);
    857 }
    858 static inline nir_ssa_def *
    859 nir_umul_unorm_4x8(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    860 {
    861    return nir_build_alu(build, nir_op_umul_unorm_4x8, src0, src1, NULL, NULL);
    862 }
    863 static inline nir_ssa_def *
    864 nir_unpack_double_2x32(nir_builder *build, nir_ssa_def *src0)
    865 {
    866    return nir_build_alu(build, nir_op_unpack_double_2x32, src0, NULL, NULL, NULL);
    867 }
    868 static inline nir_ssa_def *
    869 nir_unpack_double_2x32_split_x(nir_builder *build, nir_ssa_def *src0)
    870 {
    871    return nir_build_alu(build, nir_op_unpack_double_2x32_split_x, src0, NULL, NULL, NULL);
    872 }
    873 static inline nir_ssa_def *
    874 nir_unpack_double_2x32_split_y(nir_builder *build, nir_ssa_def *src0)
    875 {
    876    return nir_build_alu(build, nir_op_unpack_double_2x32_split_y, src0, NULL, NULL, NULL);
    877 }
    878 static inline nir_ssa_def *
    879 nir_unpack_half_2x16(nir_builder *build, nir_ssa_def *src0)
    880 {
    881    return nir_build_alu(build, nir_op_unpack_half_2x16, src0, NULL, NULL, NULL);
    882 }
    883 static inline nir_ssa_def *
    884 nir_unpack_half_2x16_split_x(nir_builder *build, nir_ssa_def *src0)
    885 {
    886    return nir_build_alu(build, nir_op_unpack_half_2x16_split_x, src0, NULL, NULL, NULL);
    887 }
    888 static inline nir_ssa_def *
    889 nir_unpack_half_2x16_split_y(nir_builder *build, nir_ssa_def *src0)
    890 {
    891    return nir_build_alu(build, nir_op_unpack_half_2x16_split_y, src0, NULL, NULL, NULL);
    892 }
    893 static inline nir_ssa_def *
    894 nir_unpack_snorm_2x16(nir_builder *build, nir_ssa_def *src0)
    895 {
    896    return nir_build_alu(build, nir_op_unpack_snorm_2x16, src0, NULL, NULL, NULL);
    897 }
    898 static inline nir_ssa_def *
    899 nir_unpack_snorm_4x8(nir_builder *build, nir_ssa_def *src0)
    900 {
    901    return nir_build_alu(build, nir_op_unpack_snorm_4x8, src0, NULL, NULL, NULL);
    902 }
    903 static inline nir_ssa_def *
    904 nir_unpack_unorm_2x16(nir_builder *build, nir_ssa_def *src0)
    905 {
    906    return nir_build_alu(build, nir_op_unpack_unorm_2x16, src0, NULL, NULL, NULL);
    907 }
    908 static inline nir_ssa_def *
    909 nir_unpack_unorm_4x8(nir_builder *build, nir_ssa_def *src0)
    910 {
    911    return nir_build_alu(build, nir_op_unpack_unorm_4x8, src0, NULL, NULL, NULL);
    912 }
    913 static inline nir_ssa_def *
    914 nir_usadd_4x8(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    915 {
    916    return nir_build_alu(build, nir_op_usadd_4x8, src0, src1, NULL, NULL);
    917 }
    918 static inline nir_ssa_def *
    919 nir_ushr(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    920 {
    921    return nir_build_alu(build, nir_op_ushr, src0, src1, NULL, NULL);
    922 }
    923 static inline nir_ssa_def *
    924 nir_ussub_4x8(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    925 {
    926    return nir_build_alu(build, nir_op_ussub_4x8, src0, src1, NULL, NULL);
    927 }
    928 static inline nir_ssa_def *
    929 nir_usub_borrow(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    930 {
    931    return nir_build_alu(build, nir_op_usub_borrow, src0, src1, NULL, NULL);
    932 }
    933 static inline nir_ssa_def *
    934 nir_vec2(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
    935 {
    936    return nir_build_alu(build, nir_op_vec2, src0, src1, NULL, NULL);
    937 }
    938 static inline nir_ssa_def *
    939 nir_vec3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2)
    940 {
    941    return nir_build_alu(build, nir_op_vec3, src0, src1, src2, NULL);
    942 }
    943 static inline nir_ssa_def *
    944 nir_vec4(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2, nir_ssa_def *src3)
    945 {
    946    return nir_build_alu(build, nir_op_vec4, src0, src1, src2, src3);
    947 }
    948 
    949 #endif /* _NIR_BUILDER_OPCODES_ */
    950