1b8e80941Smrg/* Copyright (C) 2015 Broadcom 2b8e80941Smrg * 3b8e80941Smrg * Permission is hereby granted, free of charge, to any person obtaining a 4b8e80941Smrg * copy of this software and associated documentation files (the "Software"), 5b8e80941Smrg * to deal in the Software without restriction, including without limitation 6b8e80941Smrg * the rights to use, copy, modify, merge, publish, distribute, sublicense, 7b8e80941Smrg * and/or sell copies of the Software, and to permit persons to whom the 8b8e80941Smrg * Software is furnished to do so, subject to the following conditions: 9b8e80941Smrg * 10b8e80941Smrg * The above copyright notice and this permission notice (including the next 11b8e80941Smrg * paragraph) shall be included in all copies or substantial portions of the 12b8e80941Smrg * Software. 13b8e80941Smrg * 14b8e80941Smrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15b8e80941Smrg * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16b8e80941Smrg * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17b8e80941Smrg * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18b8e80941Smrg * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 19b8e80941Smrg * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 20b8e80941Smrg * IN THE SOFTWARE. 21b8e80941Smrg */ 22b8e80941Smrg 23b8e80941Smrg#ifndef _NIR_BUILDER_OPCODES_ 24b8e80941Smrg#define _NIR_BUILDER_OPCODES_ 25b8e80941Smrg 26b8e80941Smrg 27b8e80941Smrg 28b8e80941Smrgstatic inline nir_ssa_def * 29b8e80941Smrgnir_b2f16(nir_builder *build, nir_ssa_def *src0) 30b8e80941Smrg{ 31b8e80941Smrg return nir_build_alu(build, nir_op_b2f16, src0, NULL, NULL, NULL); 32b8e80941Smrg} 33b8e80941Smrgstatic inline nir_ssa_def * 34b8e80941Smrgnir_b2f32(nir_builder *build, nir_ssa_def *src0) 35b8e80941Smrg{ 36b8e80941Smrg return nir_build_alu(build, nir_op_b2f32, src0, NULL, NULL, NULL); 37b8e80941Smrg} 38b8e80941Smrgstatic inline nir_ssa_def * 39b8e80941Smrgnir_b2f64(nir_builder *build, nir_ssa_def *src0) 40b8e80941Smrg{ 41b8e80941Smrg return nir_build_alu(build, nir_op_b2f64, src0, NULL, NULL, NULL); 42b8e80941Smrg} 43b8e80941Smrgstatic inline nir_ssa_def * 44b8e80941Smrgnir_b2i1(nir_builder *build, nir_ssa_def *src0) 45b8e80941Smrg{ 46b8e80941Smrg return nir_build_alu(build, nir_op_b2i1, src0, NULL, NULL, NULL); 47b8e80941Smrg} 48b8e80941Smrgstatic inline nir_ssa_def * 49b8e80941Smrgnir_b2i16(nir_builder *build, nir_ssa_def *src0) 50b8e80941Smrg{ 51b8e80941Smrg return nir_build_alu(build, nir_op_b2i16, src0, NULL, NULL, NULL); 52b8e80941Smrg} 53b8e80941Smrgstatic inline nir_ssa_def * 54b8e80941Smrgnir_b2i32(nir_builder *build, nir_ssa_def *src0) 55b8e80941Smrg{ 56b8e80941Smrg return nir_build_alu(build, nir_op_b2i32, src0, NULL, NULL, NULL); 57b8e80941Smrg} 58b8e80941Smrgstatic inline nir_ssa_def * 59b8e80941Smrgnir_b2i64(nir_builder *build, nir_ssa_def *src0) 60b8e80941Smrg{ 61b8e80941Smrg return nir_build_alu(build, nir_op_b2i64, src0, NULL, NULL, NULL); 62b8e80941Smrg} 63b8e80941Smrgstatic inline nir_ssa_def * 64b8e80941Smrgnir_b2i8(nir_builder *build, nir_ssa_def *src0) 65b8e80941Smrg{ 66b8e80941Smrg return nir_build_alu(build, nir_op_b2i8, src0, NULL, NULL, NULL); 67b8e80941Smrg} 68b8e80941Smrgstatic inline nir_ssa_def * 69b8e80941Smrgnir_b32all_fequal2(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 70b8e80941Smrg{ 71b8e80941Smrg return nir_build_alu(build, nir_op_b32all_fequal2, src0, src1, NULL, NULL); 72b8e80941Smrg} 73b8e80941Smrgstatic inline nir_ssa_def * 74b8e80941Smrgnir_b32all_fequal3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 75b8e80941Smrg{ 76b8e80941Smrg return nir_build_alu(build, nir_op_b32all_fequal3, src0, src1, NULL, NULL); 77b8e80941Smrg} 78b8e80941Smrgstatic inline nir_ssa_def * 79b8e80941Smrgnir_b32all_fequal4(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 80b8e80941Smrg{ 81b8e80941Smrg return nir_build_alu(build, nir_op_b32all_fequal4, src0, src1, NULL, NULL); 82b8e80941Smrg} 83b8e80941Smrgstatic inline nir_ssa_def * 84b8e80941Smrgnir_b32all_iequal2(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 85b8e80941Smrg{ 86b8e80941Smrg return nir_build_alu(build, nir_op_b32all_iequal2, src0, src1, NULL, NULL); 87b8e80941Smrg} 88b8e80941Smrgstatic inline nir_ssa_def * 89b8e80941Smrgnir_b32all_iequal3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 90b8e80941Smrg{ 91b8e80941Smrg return nir_build_alu(build, nir_op_b32all_iequal3, src0, src1, NULL, NULL); 92b8e80941Smrg} 93b8e80941Smrgstatic inline nir_ssa_def * 94b8e80941Smrgnir_b32all_iequal4(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 95b8e80941Smrg{ 96b8e80941Smrg return nir_build_alu(build, nir_op_b32all_iequal4, src0, src1, NULL, NULL); 97b8e80941Smrg} 98b8e80941Smrgstatic inline nir_ssa_def * 99b8e80941Smrgnir_b32any_fnequal2(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 100b8e80941Smrg{ 101b8e80941Smrg return nir_build_alu(build, nir_op_b32any_fnequal2, src0, src1, NULL, NULL); 102b8e80941Smrg} 103b8e80941Smrgstatic inline nir_ssa_def * 104b8e80941Smrgnir_b32any_fnequal3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 105b8e80941Smrg{ 106b8e80941Smrg return nir_build_alu(build, nir_op_b32any_fnequal3, src0, src1, NULL, NULL); 107b8e80941Smrg} 108b8e80941Smrgstatic inline nir_ssa_def * 109b8e80941Smrgnir_b32any_fnequal4(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 110b8e80941Smrg{ 111b8e80941Smrg return nir_build_alu(build, nir_op_b32any_fnequal4, src0, src1, NULL, NULL); 112b8e80941Smrg} 113b8e80941Smrgstatic inline nir_ssa_def * 114b8e80941Smrgnir_b32any_inequal2(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 115b8e80941Smrg{ 116b8e80941Smrg return nir_build_alu(build, nir_op_b32any_inequal2, src0, src1, NULL, NULL); 117b8e80941Smrg} 118b8e80941Smrgstatic inline nir_ssa_def * 119b8e80941Smrgnir_b32any_inequal3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 120b8e80941Smrg{ 121b8e80941Smrg return nir_build_alu(build, nir_op_b32any_inequal3, src0, src1, NULL, NULL); 122b8e80941Smrg} 123b8e80941Smrgstatic inline nir_ssa_def * 124b8e80941Smrgnir_b32any_inequal4(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 125b8e80941Smrg{ 126b8e80941Smrg return nir_build_alu(build, nir_op_b32any_inequal4, src0, src1, NULL, NULL); 127b8e80941Smrg} 128b8e80941Smrgstatic inline nir_ssa_def * 129b8e80941Smrgnir_b32csel(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2) 130b8e80941Smrg{ 131b8e80941Smrg return nir_build_alu(build, nir_op_b32csel, src0, src1, src2, NULL); 132b8e80941Smrg} 133b8e80941Smrgstatic inline nir_ssa_def * 134b8e80941Smrgnir_ball_fequal2(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 135b8e80941Smrg{ 136b8e80941Smrg return nir_build_alu(build, nir_op_ball_fequal2, src0, src1, NULL, NULL); 137b8e80941Smrg} 138b8e80941Smrgstatic inline nir_ssa_def * 139b8e80941Smrgnir_ball_fequal3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 140b8e80941Smrg{ 141b8e80941Smrg return nir_build_alu(build, nir_op_ball_fequal3, src0, src1, NULL, NULL); 142b8e80941Smrg} 143b8e80941Smrgstatic inline nir_ssa_def * 144b8e80941Smrgnir_ball_fequal4(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 145b8e80941Smrg{ 146b8e80941Smrg return nir_build_alu(build, nir_op_ball_fequal4, src0, src1, NULL, NULL); 147b8e80941Smrg} 148b8e80941Smrgstatic inline nir_ssa_def * 149b8e80941Smrgnir_ball_iequal2(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 150b8e80941Smrg{ 151b8e80941Smrg return nir_build_alu(build, nir_op_ball_iequal2, src0, src1, NULL, NULL); 152b8e80941Smrg} 153b8e80941Smrgstatic inline nir_ssa_def * 154b8e80941Smrgnir_ball_iequal3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 155b8e80941Smrg{ 156b8e80941Smrg return nir_build_alu(build, nir_op_ball_iequal3, src0, src1, NULL, NULL); 157b8e80941Smrg} 158b8e80941Smrgstatic inline nir_ssa_def * 159b8e80941Smrgnir_ball_iequal4(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 160b8e80941Smrg{ 161b8e80941Smrg return nir_build_alu(build, nir_op_ball_iequal4, src0, src1, NULL, NULL); 162b8e80941Smrg} 163b8e80941Smrgstatic inline nir_ssa_def * 164b8e80941Smrgnir_bany_fnequal2(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 165b8e80941Smrg{ 166b8e80941Smrg return nir_build_alu(build, nir_op_bany_fnequal2, src0, src1, NULL, NULL); 167b8e80941Smrg} 168b8e80941Smrgstatic inline nir_ssa_def * 169b8e80941Smrgnir_bany_fnequal3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 170b8e80941Smrg{ 171b8e80941Smrg return nir_build_alu(build, nir_op_bany_fnequal3, src0, src1, NULL, NULL); 172b8e80941Smrg} 173b8e80941Smrgstatic inline nir_ssa_def * 174b8e80941Smrgnir_bany_fnequal4(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 175b8e80941Smrg{ 176b8e80941Smrg return nir_build_alu(build, nir_op_bany_fnequal4, src0, src1, NULL, NULL); 177b8e80941Smrg} 178b8e80941Smrgstatic inline nir_ssa_def * 179b8e80941Smrgnir_bany_inequal2(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 180b8e80941Smrg{ 181b8e80941Smrg return nir_build_alu(build, nir_op_bany_inequal2, src0, src1, NULL, NULL); 182b8e80941Smrg} 183b8e80941Smrgstatic inline nir_ssa_def * 184b8e80941Smrgnir_bany_inequal3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 185b8e80941Smrg{ 186b8e80941Smrg return nir_build_alu(build, nir_op_bany_inequal3, src0, src1, NULL, NULL); 187b8e80941Smrg} 188b8e80941Smrgstatic inline nir_ssa_def * 189b8e80941Smrgnir_bany_inequal4(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 190b8e80941Smrg{ 191b8e80941Smrg return nir_build_alu(build, nir_op_bany_inequal4, src0, src1, NULL, NULL); 192b8e80941Smrg} 193b8e80941Smrgstatic inline nir_ssa_def * 194b8e80941Smrgnir_bcsel(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2) 195b8e80941Smrg{ 196b8e80941Smrg return nir_build_alu(build, nir_op_bcsel, src0, src1, src2, NULL); 197b8e80941Smrg} 198b8e80941Smrgstatic inline nir_ssa_def * 199b8e80941Smrgnir_bfi(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2) 200b8e80941Smrg{ 201b8e80941Smrg return nir_build_alu(build, nir_op_bfi, src0, src1, src2, NULL); 202b8e80941Smrg} 203b8e80941Smrgstatic inline nir_ssa_def * 204b8e80941Smrgnir_bfm(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 205b8e80941Smrg{ 206b8e80941Smrg return nir_build_alu(build, nir_op_bfm, src0, src1, NULL, NULL); 207b8e80941Smrg} 208b8e80941Smrgstatic inline nir_ssa_def * 209b8e80941Smrgnir_bit_count(nir_builder *build, nir_ssa_def *src0) 210b8e80941Smrg{ 211b8e80941Smrg return nir_build_alu(build, nir_op_bit_count, src0, NULL, NULL, NULL); 212b8e80941Smrg} 213b8e80941Smrgstatic inline nir_ssa_def * 214b8e80941Smrgnir_bitfield_insert(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2, nir_ssa_def *src3) 215b8e80941Smrg{ 216b8e80941Smrg return nir_build_alu(build, nir_op_bitfield_insert, src0, src1, src2, src3); 217b8e80941Smrg} 218b8e80941Smrgstatic inline nir_ssa_def * 219b8e80941Smrgnir_bitfield_reverse(nir_builder *build, nir_ssa_def *src0) 220b8e80941Smrg{ 221b8e80941Smrg return nir_build_alu(build, nir_op_bitfield_reverse, src0, NULL, NULL, NULL); 222b8e80941Smrg} 223b8e80941Smrgstatic inline nir_ssa_def * 224b8e80941Smrgnir_cube_face_coord(nir_builder *build, nir_ssa_def *src0) 225b8e80941Smrg{ 226b8e80941Smrg return nir_build_alu(build, nir_op_cube_face_coord, src0, NULL, NULL, NULL); 227b8e80941Smrg} 228b8e80941Smrgstatic inline nir_ssa_def * 229b8e80941Smrgnir_cube_face_index(nir_builder *build, nir_ssa_def *src0) 230b8e80941Smrg{ 231b8e80941Smrg return nir_build_alu(build, nir_op_cube_face_index, src0, NULL, NULL, NULL); 232b8e80941Smrg} 233b8e80941Smrgstatic inline nir_ssa_def * 234b8e80941Smrgnir_extract_i16(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 235b8e80941Smrg{ 236b8e80941Smrg return nir_build_alu(build, nir_op_extract_i16, src0, src1, NULL, NULL); 237b8e80941Smrg} 238b8e80941Smrgstatic inline nir_ssa_def * 239b8e80941Smrgnir_extract_i8(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 240b8e80941Smrg{ 241b8e80941Smrg return nir_build_alu(build, nir_op_extract_i8, src0, src1, NULL, NULL); 242b8e80941Smrg} 243b8e80941Smrgstatic inline nir_ssa_def * 244b8e80941Smrgnir_extract_u16(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 245b8e80941Smrg{ 246b8e80941Smrg return nir_build_alu(build, nir_op_extract_u16, src0, src1, NULL, NULL); 247b8e80941Smrg} 248b8e80941Smrgstatic inline nir_ssa_def * 249b8e80941Smrgnir_extract_u8(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 250b8e80941Smrg{ 251b8e80941Smrg return nir_build_alu(build, nir_op_extract_u8, src0, src1, NULL, NULL); 252b8e80941Smrg} 253b8e80941Smrgstatic inline nir_ssa_def * 254b8e80941Smrgnir_f2b1(nir_builder *build, nir_ssa_def *src0) 255b8e80941Smrg{ 256b8e80941Smrg return nir_build_alu(build, nir_op_f2b1, src0, NULL, NULL, NULL); 257b8e80941Smrg} 258b8e80941Smrgstatic inline nir_ssa_def * 259b8e80941Smrgnir_f2b32(nir_builder *build, nir_ssa_def *src0) 260b8e80941Smrg{ 261b8e80941Smrg return nir_build_alu(build, nir_op_f2b32, src0, NULL, NULL, NULL); 262b8e80941Smrg} 263b8e80941Smrgstatic inline nir_ssa_def * 264b8e80941Smrgnir_f2f16(nir_builder *build, nir_ssa_def *src0) 265b8e80941Smrg{ 266b8e80941Smrg return nir_build_alu(build, nir_op_f2f16, src0, NULL, NULL, NULL); 267b8e80941Smrg} 268b8e80941Smrgstatic inline nir_ssa_def * 269b8e80941Smrgnir_f2f16_rtne(nir_builder *build, nir_ssa_def *src0) 270b8e80941Smrg{ 271b8e80941Smrg return nir_build_alu(build, nir_op_f2f16_rtne, src0, NULL, NULL, NULL); 272b8e80941Smrg} 273b8e80941Smrgstatic inline nir_ssa_def * 274b8e80941Smrgnir_f2f16_rtz(nir_builder *build, nir_ssa_def *src0) 275b8e80941Smrg{ 276b8e80941Smrg return nir_build_alu(build, nir_op_f2f16_rtz, src0, NULL, NULL, NULL); 277b8e80941Smrg} 278b8e80941Smrgstatic inline nir_ssa_def * 279b8e80941Smrgnir_f2f32(nir_builder *build, nir_ssa_def *src0) 280b8e80941Smrg{ 281b8e80941Smrg return nir_build_alu(build, nir_op_f2f32, src0, NULL, NULL, NULL); 282b8e80941Smrg} 283b8e80941Smrgstatic inline nir_ssa_def * 284b8e80941Smrgnir_f2f64(nir_builder *build, nir_ssa_def *src0) 285b8e80941Smrg{ 286b8e80941Smrg return nir_build_alu(build, nir_op_f2f64, src0, NULL, NULL, NULL); 287b8e80941Smrg} 288b8e80941Smrgstatic inline nir_ssa_def * 289b8e80941Smrgnir_f2i1(nir_builder *build, nir_ssa_def *src0) 290b8e80941Smrg{ 291b8e80941Smrg return nir_build_alu(build, nir_op_f2i1, src0, NULL, NULL, NULL); 292b8e80941Smrg} 293b8e80941Smrgstatic inline nir_ssa_def * 294b8e80941Smrgnir_f2i16(nir_builder *build, nir_ssa_def *src0) 295b8e80941Smrg{ 296b8e80941Smrg return nir_build_alu(build, nir_op_f2i16, src0, NULL, NULL, NULL); 297b8e80941Smrg} 298b8e80941Smrgstatic inline nir_ssa_def * 299b8e80941Smrgnir_f2i32(nir_builder *build, nir_ssa_def *src0) 300b8e80941Smrg{ 301b8e80941Smrg return nir_build_alu(build, nir_op_f2i32, src0, NULL, NULL, NULL); 302b8e80941Smrg} 303b8e80941Smrgstatic inline nir_ssa_def * 304b8e80941Smrgnir_f2i64(nir_builder *build, nir_ssa_def *src0) 305b8e80941Smrg{ 306b8e80941Smrg return nir_build_alu(build, nir_op_f2i64, src0, NULL, NULL, NULL); 307b8e80941Smrg} 308b8e80941Smrgstatic inline nir_ssa_def * 309b8e80941Smrgnir_f2i8(nir_builder *build, nir_ssa_def *src0) 310b8e80941Smrg{ 311b8e80941Smrg return nir_build_alu(build, nir_op_f2i8, src0, NULL, NULL, NULL); 312b8e80941Smrg} 313b8e80941Smrgstatic inline nir_ssa_def * 314b8e80941Smrgnir_f2u1(nir_builder *build, nir_ssa_def *src0) 315b8e80941Smrg{ 316b8e80941Smrg return nir_build_alu(build, nir_op_f2u1, src0, NULL, NULL, NULL); 317b8e80941Smrg} 318b8e80941Smrgstatic inline nir_ssa_def * 319b8e80941Smrgnir_f2u16(nir_builder *build, nir_ssa_def *src0) 320b8e80941Smrg{ 321b8e80941Smrg return nir_build_alu(build, nir_op_f2u16, src0, NULL, NULL, NULL); 322b8e80941Smrg} 323b8e80941Smrgstatic inline nir_ssa_def * 324b8e80941Smrgnir_f2u32(nir_builder *build, nir_ssa_def *src0) 325b8e80941Smrg{ 326b8e80941Smrg return nir_build_alu(build, nir_op_f2u32, src0, NULL, NULL, NULL); 327b8e80941Smrg} 328b8e80941Smrgstatic inline nir_ssa_def * 329b8e80941Smrgnir_f2u64(nir_builder *build, nir_ssa_def *src0) 330b8e80941Smrg{ 331b8e80941Smrg return nir_build_alu(build, nir_op_f2u64, src0, NULL, NULL, NULL); 332b8e80941Smrg} 333b8e80941Smrgstatic inline nir_ssa_def * 334b8e80941Smrgnir_f2u8(nir_builder *build, nir_ssa_def *src0) 335b8e80941Smrg{ 336b8e80941Smrg return nir_build_alu(build, nir_op_f2u8, src0, NULL, NULL, NULL); 337b8e80941Smrg} 338b8e80941Smrgstatic inline nir_ssa_def * 339b8e80941Smrgnir_fabs(nir_builder *build, nir_ssa_def *src0) 340b8e80941Smrg{ 341b8e80941Smrg return nir_build_alu(build, nir_op_fabs, src0, NULL, NULL, NULL); 342b8e80941Smrg} 343b8e80941Smrgstatic inline nir_ssa_def * 344b8e80941Smrgnir_fadd(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 345b8e80941Smrg{ 346b8e80941Smrg return nir_build_alu(build, nir_op_fadd, src0, src1, NULL, NULL); 347b8e80941Smrg} 348b8e80941Smrgstatic inline nir_ssa_def * 349b8e80941Smrgnir_fall_equal2(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 350b8e80941Smrg{ 351b8e80941Smrg return nir_build_alu(build, nir_op_fall_equal2, src0, src1, NULL, NULL); 352b8e80941Smrg} 353b8e80941Smrgstatic inline nir_ssa_def * 354b8e80941Smrgnir_fall_equal3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 355b8e80941Smrg{ 356b8e80941Smrg return nir_build_alu(build, nir_op_fall_equal3, src0, src1, NULL, NULL); 357b8e80941Smrg} 358b8e80941Smrgstatic inline nir_ssa_def * 359b8e80941Smrgnir_fall_equal4(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 360b8e80941Smrg{ 361b8e80941Smrg return nir_build_alu(build, nir_op_fall_equal4, src0, src1, NULL, NULL); 362b8e80941Smrg} 363b8e80941Smrgstatic inline nir_ssa_def * 364b8e80941Smrgnir_fand(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 365b8e80941Smrg{ 366b8e80941Smrg return nir_build_alu(build, nir_op_fand, src0, src1, NULL, NULL); 367b8e80941Smrg} 368b8e80941Smrgstatic inline nir_ssa_def * 369b8e80941Smrgnir_fany_nequal2(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 370b8e80941Smrg{ 371b8e80941Smrg return nir_build_alu(build, nir_op_fany_nequal2, src0, src1, NULL, NULL); 372b8e80941Smrg} 373b8e80941Smrgstatic inline nir_ssa_def * 374b8e80941Smrgnir_fany_nequal3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 375b8e80941Smrg{ 376b8e80941Smrg return nir_build_alu(build, nir_op_fany_nequal3, src0, src1, NULL, NULL); 377b8e80941Smrg} 378b8e80941Smrgstatic inline nir_ssa_def * 379b8e80941Smrgnir_fany_nequal4(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 380b8e80941Smrg{ 381b8e80941Smrg return nir_build_alu(build, nir_op_fany_nequal4, src0, src1, NULL, NULL); 382b8e80941Smrg} 383b8e80941Smrgstatic inline nir_ssa_def * 384b8e80941Smrgnir_fceil(nir_builder *build, nir_ssa_def *src0) 385b8e80941Smrg{ 386b8e80941Smrg return nir_build_alu(build, nir_op_fceil, src0, NULL, NULL, NULL); 387b8e80941Smrg} 388b8e80941Smrgstatic inline nir_ssa_def * 389b8e80941Smrgnir_fcos(nir_builder *build, nir_ssa_def *src0) 390b8e80941Smrg{ 391b8e80941Smrg return nir_build_alu(build, nir_op_fcos, src0, NULL, NULL, NULL); 392b8e80941Smrg} 393b8e80941Smrgstatic inline nir_ssa_def * 394b8e80941Smrgnir_fcsel(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2) 395b8e80941Smrg{ 396b8e80941Smrg return nir_build_alu(build, nir_op_fcsel, src0, src1, src2, NULL); 397b8e80941Smrg} 398b8e80941Smrgstatic inline nir_ssa_def * 399b8e80941Smrgnir_fddx(nir_builder *build, nir_ssa_def *src0) 400b8e80941Smrg{ 401b8e80941Smrg return nir_build_alu(build, nir_op_fddx, src0, NULL, NULL, NULL); 402b8e80941Smrg} 403b8e80941Smrgstatic inline nir_ssa_def * 404b8e80941Smrgnir_fddx_coarse(nir_builder *build, nir_ssa_def *src0) 405b8e80941Smrg{ 406b8e80941Smrg return nir_build_alu(build, nir_op_fddx_coarse, src0, NULL, NULL, NULL); 407b8e80941Smrg} 408b8e80941Smrgstatic inline nir_ssa_def * 409b8e80941Smrgnir_fddx_fine(nir_builder *build, nir_ssa_def *src0) 410b8e80941Smrg{ 411b8e80941Smrg return nir_build_alu(build, nir_op_fddx_fine, src0, NULL, NULL, NULL); 412b8e80941Smrg} 413b8e80941Smrgstatic inline nir_ssa_def * 414b8e80941Smrgnir_fddy(nir_builder *build, nir_ssa_def *src0) 415b8e80941Smrg{ 416b8e80941Smrg return nir_build_alu(build, nir_op_fddy, src0, NULL, NULL, NULL); 417b8e80941Smrg} 418b8e80941Smrgstatic inline nir_ssa_def * 419b8e80941Smrgnir_fddy_coarse(nir_builder *build, nir_ssa_def *src0) 420b8e80941Smrg{ 421b8e80941Smrg return nir_build_alu(build, nir_op_fddy_coarse, src0, NULL, NULL, NULL); 422b8e80941Smrg} 423b8e80941Smrgstatic inline nir_ssa_def * 424b8e80941Smrgnir_fddy_fine(nir_builder *build, nir_ssa_def *src0) 425b8e80941Smrg{ 426b8e80941Smrg return nir_build_alu(build, nir_op_fddy_fine, src0, NULL, NULL, NULL); 427b8e80941Smrg} 428b8e80941Smrgstatic inline nir_ssa_def * 429b8e80941Smrgnir_fdiv(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 430b8e80941Smrg{ 431b8e80941Smrg return nir_build_alu(build, nir_op_fdiv, src0, src1, NULL, NULL); 432b8e80941Smrg} 433b8e80941Smrgstatic inline nir_ssa_def * 434b8e80941Smrgnir_fdot2(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 435b8e80941Smrg{ 436b8e80941Smrg return nir_build_alu(build, nir_op_fdot2, src0, src1, NULL, NULL); 437b8e80941Smrg} 438b8e80941Smrgstatic inline nir_ssa_def * 439b8e80941Smrgnir_fdot3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 440b8e80941Smrg{ 441b8e80941Smrg return nir_build_alu(build, nir_op_fdot3, src0, src1, NULL, NULL); 442b8e80941Smrg} 443b8e80941Smrgstatic inline nir_ssa_def * 444b8e80941Smrgnir_fdot4(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 445b8e80941Smrg{ 446b8e80941Smrg return nir_build_alu(build, nir_op_fdot4, src0, src1, NULL, NULL); 447b8e80941Smrg} 448b8e80941Smrgstatic inline nir_ssa_def * 449b8e80941Smrgnir_fdot_replicated2(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 450b8e80941Smrg{ 451b8e80941Smrg return nir_build_alu(build, nir_op_fdot_replicated2, src0, src1, NULL, NULL); 452b8e80941Smrg} 453b8e80941Smrgstatic inline nir_ssa_def * 454b8e80941Smrgnir_fdot_replicated3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 455b8e80941Smrg{ 456b8e80941Smrg return nir_build_alu(build, nir_op_fdot_replicated3, src0, src1, NULL, NULL); 457b8e80941Smrg} 458b8e80941Smrgstatic inline nir_ssa_def * 459b8e80941Smrgnir_fdot_replicated4(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 460b8e80941Smrg{ 461b8e80941Smrg return nir_build_alu(build, nir_op_fdot_replicated4, src0, src1, NULL, NULL); 462b8e80941Smrg} 463b8e80941Smrgstatic inline nir_ssa_def * 464b8e80941Smrgnir_fdph(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 465b8e80941Smrg{ 466b8e80941Smrg return nir_build_alu(build, nir_op_fdph, src0, src1, NULL, NULL); 467b8e80941Smrg} 468b8e80941Smrgstatic inline nir_ssa_def * 469b8e80941Smrgnir_fdph_replicated(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 470b8e80941Smrg{ 471b8e80941Smrg return nir_build_alu(build, nir_op_fdph_replicated, src0, src1, NULL, NULL); 472b8e80941Smrg} 473b8e80941Smrgstatic inline nir_ssa_def * 474b8e80941Smrgnir_feq(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 475b8e80941Smrg{ 476b8e80941Smrg return nir_build_alu(build, nir_op_feq, src0, src1, NULL, NULL); 477b8e80941Smrg} 478b8e80941Smrgstatic inline nir_ssa_def * 479b8e80941Smrgnir_feq32(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 480b8e80941Smrg{ 481b8e80941Smrg return nir_build_alu(build, nir_op_feq32, src0, src1, NULL, NULL); 482b8e80941Smrg} 483b8e80941Smrgstatic inline nir_ssa_def * 484b8e80941Smrgnir_fexp2(nir_builder *build, nir_ssa_def *src0) 485b8e80941Smrg{ 486b8e80941Smrg return nir_build_alu(build, nir_op_fexp2, src0, NULL, NULL, NULL); 487b8e80941Smrg} 488b8e80941Smrgstatic inline nir_ssa_def * 489b8e80941Smrgnir_ffloor(nir_builder *build, nir_ssa_def *src0) 490b8e80941Smrg{ 491b8e80941Smrg return nir_build_alu(build, nir_op_ffloor, src0, NULL, NULL, NULL); 492b8e80941Smrg} 493b8e80941Smrgstatic inline nir_ssa_def * 494b8e80941Smrgnir_ffma(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2) 495b8e80941Smrg{ 496b8e80941Smrg return nir_build_alu(build, nir_op_ffma, src0, src1, src2, NULL); 497b8e80941Smrg} 498b8e80941Smrgstatic inline nir_ssa_def * 499b8e80941Smrgnir_ffract(nir_builder *build, nir_ssa_def *src0) 500b8e80941Smrg{ 501b8e80941Smrg return nir_build_alu(build, nir_op_ffract, src0, NULL, NULL, NULL); 502b8e80941Smrg} 503b8e80941Smrgstatic inline nir_ssa_def * 504b8e80941Smrgnir_fge(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 505b8e80941Smrg{ 506b8e80941Smrg return nir_build_alu(build, nir_op_fge, src0, src1, NULL, NULL); 507b8e80941Smrg} 508b8e80941Smrgstatic inline nir_ssa_def * 509b8e80941Smrgnir_fge32(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 510b8e80941Smrg{ 511b8e80941Smrg return nir_build_alu(build, nir_op_fge32, src0, src1, NULL, NULL); 512b8e80941Smrg} 513b8e80941Smrgstatic inline nir_ssa_def * 514b8e80941Smrgnir_find_lsb(nir_builder *build, nir_ssa_def *src0) 515b8e80941Smrg{ 516b8e80941Smrg return nir_build_alu(build, nir_op_find_lsb, src0, NULL, NULL, NULL); 517b8e80941Smrg} 518b8e80941Smrgstatic inline nir_ssa_def * 519b8e80941Smrgnir_flog2(nir_builder *build, nir_ssa_def *src0) 520b8e80941Smrg{ 521b8e80941Smrg return nir_build_alu(build, nir_op_flog2, src0, NULL, NULL, NULL); 522b8e80941Smrg} 523b8e80941Smrgstatic inline nir_ssa_def * 524b8e80941Smrgnir_flrp(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2) 525b8e80941Smrg{ 526b8e80941Smrg return nir_build_alu(build, nir_op_flrp, src0, src1, src2, NULL); 527b8e80941Smrg} 528b8e80941Smrgstatic inline nir_ssa_def * 529b8e80941Smrgnir_flt(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 530b8e80941Smrg{ 531b8e80941Smrg return nir_build_alu(build, nir_op_flt, src0, src1, NULL, NULL); 532b8e80941Smrg} 533b8e80941Smrgstatic inline nir_ssa_def * 534b8e80941Smrgnir_flt32(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 535b8e80941Smrg{ 536b8e80941Smrg return nir_build_alu(build, nir_op_flt32, src0, src1, NULL, NULL); 537b8e80941Smrg} 538b8e80941Smrgstatic inline nir_ssa_def * 539b8e80941Smrgnir_fmax(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 540b8e80941Smrg{ 541b8e80941Smrg return nir_build_alu(build, nir_op_fmax, src0, src1, NULL, NULL); 542b8e80941Smrg} 543b8e80941Smrgstatic inline nir_ssa_def * 544b8e80941Smrgnir_fmax3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2) 545b8e80941Smrg{ 546b8e80941Smrg return nir_build_alu(build, nir_op_fmax3, src0, src1, src2, NULL); 547b8e80941Smrg} 548b8e80941Smrgstatic inline nir_ssa_def * 549b8e80941Smrgnir_fmed3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2) 550b8e80941Smrg{ 551b8e80941Smrg return nir_build_alu(build, nir_op_fmed3, src0, src1, src2, NULL); 552b8e80941Smrg} 553b8e80941Smrgstatic inline nir_ssa_def * 554b8e80941Smrgnir_fmin(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 555b8e80941Smrg{ 556b8e80941Smrg return nir_build_alu(build, nir_op_fmin, src0, src1, NULL, NULL); 557b8e80941Smrg} 558b8e80941Smrgstatic inline nir_ssa_def * 559b8e80941Smrgnir_fmin3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2) 560b8e80941Smrg{ 561b8e80941Smrg return nir_build_alu(build, nir_op_fmin3, src0, src1, src2, NULL); 562b8e80941Smrg} 563b8e80941Smrgstatic inline nir_ssa_def * 564b8e80941Smrgnir_fmod(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 565b8e80941Smrg{ 566b8e80941Smrg return nir_build_alu(build, nir_op_fmod, src0, src1, NULL, NULL); 567b8e80941Smrg} 568b8e80941Smrgstatic inline nir_ssa_def * 569b8e80941Smrgnir_fmov(nir_builder *build, nir_ssa_def *src0) 570b8e80941Smrg{ 571b8e80941Smrg return nir_build_alu(build, nir_op_fmov, src0, NULL, NULL, NULL); 572b8e80941Smrg} 573b8e80941Smrgstatic inline nir_ssa_def * 574b8e80941Smrgnir_fmul(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 575b8e80941Smrg{ 576b8e80941Smrg return nir_build_alu(build, nir_op_fmul, src0, src1, NULL, NULL); 577b8e80941Smrg} 578b8e80941Smrgstatic inline nir_ssa_def * 579b8e80941Smrgnir_fne(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 580b8e80941Smrg{ 581b8e80941Smrg return nir_build_alu(build, nir_op_fne, src0, src1, NULL, NULL); 582b8e80941Smrg} 583b8e80941Smrgstatic inline nir_ssa_def * 584b8e80941Smrgnir_fne32(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 585b8e80941Smrg{ 586b8e80941Smrg return nir_build_alu(build, nir_op_fne32, src0, src1, NULL, NULL); 587b8e80941Smrg} 588b8e80941Smrgstatic inline nir_ssa_def * 589b8e80941Smrgnir_fneg(nir_builder *build, nir_ssa_def *src0) 590b8e80941Smrg{ 591b8e80941Smrg return nir_build_alu(build, nir_op_fneg, src0, NULL, NULL, NULL); 592b8e80941Smrg} 593b8e80941Smrgstatic inline nir_ssa_def * 594b8e80941Smrgnir_fnoise1_1(nir_builder *build, nir_ssa_def *src0) 595b8e80941Smrg{ 596b8e80941Smrg return nir_build_alu(build, nir_op_fnoise1_1, src0, NULL, NULL, NULL); 597b8e80941Smrg} 598b8e80941Smrgstatic inline nir_ssa_def * 599b8e80941Smrgnir_fnoise1_2(nir_builder *build, nir_ssa_def *src0) 600b8e80941Smrg{ 601b8e80941Smrg return nir_build_alu(build, nir_op_fnoise1_2, src0, NULL, NULL, NULL); 602b8e80941Smrg} 603b8e80941Smrgstatic inline nir_ssa_def * 604b8e80941Smrgnir_fnoise1_3(nir_builder *build, nir_ssa_def *src0) 605b8e80941Smrg{ 606b8e80941Smrg return nir_build_alu(build, nir_op_fnoise1_3, src0, NULL, NULL, NULL); 607b8e80941Smrg} 608b8e80941Smrgstatic inline nir_ssa_def * 609b8e80941Smrgnir_fnoise1_4(nir_builder *build, nir_ssa_def *src0) 610b8e80941Smrg{ 611b8e80941Smrg return nir_build_alu(build, nir_op_fnoise1_4, src0, NULL, NULL, NULL); 612b8e80941Smrg} 613b8e80941Smrgstatic inline nir_ssa_def * 614b8e80941Smrgnir_fnoise2_1(nir_builder *build, nir_ssa_def *src0) 615b8e80941Smrg{ 616b8e80941Smrg return nir_build_alu(build, nir_op_fnoise2_1, src0, NULL, NULL, NULL); 617b8e80941Smrg} 618b8e80941Smrgstatic inline nir_ssa_def * 619b8e80941Smrgnir_fnoise2_2(nir_builder *build, nir_ssa_def *src0) 620b8e80941Smrg{ 621b8e80941Smrg return nir_build_alu(build, nir_op_fnoise2_2, src0, NULL, NULL, NULL); 622b8e80941Smrg} 623b8e80941Smrgstatic inline nir_ssa_def * 624b8e80941Smrgnir_fnoise2_3(nir_builder *build, nir_ssa_def *src0) 625b8e80941Smrg{ 626b8e80941Smrg return nir_build_alu(build, nir_op_fnoise2_3, src0, NULL, NULL, NULL); 627b8e80941Smrg} 628b8e80941Smrgstatic inline nir_ssa_def * 629b8e80941Smrgnir_fnoise2_4(nir_builder *build, nir_ssa_def *src0) 630b8e80941Smrg{ 631b8e80941Smrg return nir_build_alu(build, nir_op_fnoise2_4, src0, NULL, NULL, NULL); 632b8e80941Smrg} 633b8e80941Smrgstatic inline nir_ssa_def * 634b8e80941Smrgnir_fnoise3_1(nir_builder *build, nir_ssa_def *src0) 635b8e80941Smrg{ 636b8e80941Smrg return nir_build_alu(build, nir_op_fnoise3_1, src0, NULL, NULL, NULL); 637b8e80941Smrg} 638b8e80941Smrgstatic inline nir_ssa_def * 639b8e80941Smrgnir_fnoise3_2(nir_builder *build, nir_ssa_def *src0) 640b8e80941Smrg{ 641b8e80941Smrg return nir_build_alu(build, nir_op_fnoise3_2, src0, NULL, NULL, NULL); 642b8e80941Smrg} 643b8e80941Smrgstatic inline nir_ssa_def * 644b8e80941Smrgnir_fnoise3_3(nir_builder *build, nir_ssa_def *src0) 645b8e80941Smrg{ 646b8e80941Smrg return nir_build_alu(build, nir_op_fnoise3_3, src0, NULL, NULL, NULL); 647b8e80941Smrg} 648b8e80941Smrgstatic inline nir_ssa_def * 649b8e80941Smrgnir_fnoise3_4(nir_builder *build, nir_ssa_def *src0) 650b8e80941Smrg{ 651b8e80941Smrg return nir_build_alu(build, nir_op_fnoise3_4, src0, NULL, NULL, NULL); 652b8e80941Smrg} 653b8e80941Smrgstatic inline nir_ssa_def * 654b8e80941Smrgnir_fnoise4_1(nir_builder *build, nir_ssa_def *src0) 655b8e80941Smrg{ 656b8e80941Smrg return nir_build_alu(build, nir_op_fnoise4_1, src0, NULL, NULL, NULL); 657b8e80941Smrg} 658b8e80941Smrgstatic inline nir_ssa_def * 659b8e80941Smrgnir_fnoise4_2(nir_builder *build, nir_ssa_def *src0) 660b8e80941Smrg{ 661b8e80941Smrg return nir_build_alu(build, nir_op_fnoise4_2, src0, NULL, NULL, NULL); 662b8e80941Smrg} 663b8e80941Smrgstatic inline nir_ssa_def * 664b8e80941Smrgnir_fnoise4_3(nir_builder *build, nir_ssa_def *src0) 665b8e80941Smrg{ 666b8e80941Smrg return nir_build_alu(build, nir_op_fnoise4_3, src0, NULL, NULL, NULL); 667b8e80941Smrg} 668b8e80941Smrgstatic inline nir_ssa_def * 669b8e80941Smrgnir_fnoise4_4(nir_builder *build, nir_ssa_def *src0) 670b8e80941Smrg{ 671b8e80941Smrg return nir_build_alu(build, nir_op_fnoise4_4, src0, NULL, NULL, NULL); 672b8e80941Smrg} 673b8e80941Smrgstatic inline nir_ssa_def * 674b8e80941Smrgnir_fnot(nir_builder *build, nir_ssa_def *src0) 675b8e80941Smrg{ 676b8e80941Smrg return nir_build_alu(build, nir_op_fnot, src0, NULL, NULL, NULL); 677b8e80941Smrg} 678b8e80941Smrgstatic inline nir_ssa_def * 679b8e80941Smrgnir_for(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 680b8e80941Smrg{ 681b8e80941Smrg return nir_build_alu(build, nir_op_for, src0, src1, NULL, NULL); 682b8e80941Smrg} 683b8e80941Smrgstatic inline nir_ssa_def * 684b8e80941Smrgnir_fpow(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 685b8e80941Smrg{ 686b8e80941Smrg return nir_build_alu(build, nir_op_fpow, src0, src1, NULL, NULL); 687b8e80941Smrg} 688b8e80941Smrgstatic inline nir_ssa_def * 689b8e80941Smrgnir_fquantize2f16(nir_builder *build, nir_ssa_def *src0) 690b8e80941Smrg{ 691b8e80941Smrg return nir_build_alu(build, nir_op_fquantize2f16, src0, NULL, NULL, NULL); 692b8e80941Smrg} 693b8e80941Smrgstatic inline nir_ssa_def * 694b8e80941Smrgnir_frcp(nir_builder *build, nir_ssa_def *src0) 695b8e80941Smrg{ 696b8e80941Smrg return nir_build_alu(build, nir_op_frcp, src0, NULL, NULL, NULL); 697b8e80941Smrg} 698b8e80941Smrgstatic inline nir_ssa_def * 699b8e80941Smrgnir_frem(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 700b8e80941Smrg{ 701b8e80941Smrg return nir_build_alu(build, nir_op_frem, src0, src1, NULL, NULL); 702b8e80941Smrg} 703b8e80941Smrgstatic inline nir_ssa_def * 704b8e80941Smrgnir_frexp_exp(nir_builder *build, nir_ssa_def *src0) 705b8e80941Smrg{ 706b8e80941Smrg return nir_build_alu(build, nir_op_frexp_exp, src0, NULL, NULL, NULL); 707b8e80941Smrg} 708b8e80941Smrgstatic inline nir_ssa_def * 709b8e80941Smrgnir_frexp_sig(nir_builder *build, nir_ssa_def *src0) 710b8e80941Smrg{ 711b8e80941Smrg return nir_build_alu(build, nir_op_frexp_sig, src0, NULL, NULL, NULL); 712b8e80941Smrg} 713b8e80941Smrgstatic inline nir_ssa_def * 714b8e80941Smrgnir_fround_even(nir_builder *build, nir_ssa_def *src0) 715b8e80941Smrg{ 716b8e80941Smrg return nir_build_alu(build, nir_op_fround_even, src0, NULL, NULL, NULL); 717b8e80941Smrg} 718b8e80941Smrgstatic inline nir_ssa_def * 719b8e80941Smrgnir_frsq(nir_builder *build, nir_ssa_def *src0) 720b8e80941Smrg{ 721b8e80941Smrg return nir_build_alu(build, nir_op_frsq, src0, NULL, NULL, NULL); 722b8e80941Smrg} 723b8e80941Smrgstatic inline nir_ssa_def * 724b8e80941Smrgnir_fsat(nir_builder *build, nir_ssa_def *src0) 725b8e80941Smrg{ 726b8e80941Smrg return nir_build_alu(build, nir_op_fsat, src0, NULL, NULL, NULL); 727b8e80941Smrg} 728b8e80941Smrgstatic inline nir_ssa_def * 729b8e80941Smrgnir_fsign(nir_builder *build, nir_ssa_def *src0) 730b8e80941Smrg{ 731b8e80941Smrg return nir_build_alu(build, nir_op_fsign, src0, NULL, NULL, NULL); 732b8e80941Smrg} 733b8e80941Smrgstatic inline nir_ssa_def * 734b8e80941Smrgnir_fsin(nir_builder *build, nir_ssa_def *src0) 735b8e80941Smrg{ 736b8e80941Smrg return nir_build_alu(build, nir_op_fsin, src0, NULL, NULL, NULL); 737b8e80941Smrg} 738b8e80941Smrgstatic inline nir_ssa_def * 739b8e80941Smrgnir_fsqrt(nir_builder *build, nir_ssa_def *src0) 740b8e80941Smrg{ 741b8e80941Smrg return nir_build_alu(build, nir_op_fsqrt, src0, NULL, NULL, NULL); 742b8e80941Smrg} 743b8e80941Smrgstatic inline nir_ssa_def * 744b8e80941Smrgnir_fsub(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 745b8e80941Smrg{ 746b8e80941Smrg return nir_build_alu(build, nir_op_fsub, src0, src1, NULL, NULL); 747b8e80941Smrg} 748b8e80941Smrgstatic inline nir_ssa_def * 749b8e80941Smrgnir_ftrunc(nir_builder *build, nir_ssa_def *src0) 750b8e80941Smrg{ 751b8e80941Smrg return nir_build_alu(build, nir_op_ftrunc, src0, NULL, NULL, NULL); 752b8e80941Smrg} 753b8e80941Smrgstatic inline nir_ssa_def * 754b8e80941Smrgnir_fxor(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 755b8e80941Smrg{ 756b8e80941Smrg return nir_build_alu(build, nir_op_fxor, src0, src1, NULL, NULL); 757b8e80941Smrg} 758b8e80941Smrgstatic inline nir_ssa_def * 759b8e80941Smrgnir_i2b1(nir_builder *build, nir_ssa_def *src0) 760b8e80941Smrg{ 761b8e80941Smrg return nir_build_alu(build, nir_op_i2b1, src0, NULL, NULL, NULL); 762b8e80941Smrg} 763b8e80941Smrgstatic inline nir_ssa_def * 764b8e80941Smrgnir_i2b32(nir_builder *build, nir_ssa_def *src0) 765b8e80941Smrg{ 766b8e80941Smrg return nir_build_alu(build, nir_op_i2b32, src0, NULL, NULL, NULL); 767b8e80941Smrg} 768b8e80941Smrgstatic inline nir_ssa_def * 769b8e80941Smrgnir_i2f16(nir_builder *build, nir_ssa_def *src0) 770b8e80941Smrg{ 771b8e80941Smrg return nir_build_alu(build, nir_op_i2f16, src0, NULL, NULL, NULL); 772b8e80941Smrg} 773b8e80941Smrgstatic inline nir_ssa_def * 774b8e80941Smrgnir_i2f32(nir_builder *build, nir_ssa_def *src0) 775b8e80941Smrg{ 776b8e80941Smrg return nir_build_alu(build, nir_op_i2f32, src0, NULL, NULL, NULL); 777b8e80941Smrg} 778b8e80941Smrgstatic inline nir_ssa_def * 779b8e80941Smrgnir_i2f64(nir_builder *build, nir_ssa_def *src0) 780b8e80941Smrg{ 781b8e80941Smrg return nir_build_alu(build, nir_op_i2f64, src0, NULL, NULL, NULL); 782b8e80941Smrg} 783b8e80941Smrgstatic inline nir_ssa_def * 784b8e80941Smrgnir_i2i1(nir_builder *build, nir_ssa_def *src0) 785b8e80941Smrg{ 786b8e80941Smrg return nir_build_alu(build, nir_op_i2i1, src0, NULL, NULL, NULL); 787b8e80941Smrg} 788b8e80941Smrgstatic inline nir_ssa_def * 789b8e80941Smrgnir_i2i16(nir_builder *build, nir_ssa_def *src0) 790b8e80941Smrg{ 791b8e80941Smrg return nir_build_alu(build, nir_op_i2i16, src0, NULL, NULL, NULL); 792b8e80941Smrg} 793b8e80941Smrgstatic inline nir_ssa_def * 794b8e80941Smrgnir_i2i32(nir_builder *build, nir_ssa_def *src0) 795b8e80941Smrg{ 796b8e80941Smrg return nir_build_alu(build, nir_op_i2i32, src0, NULL, NULL, NULL); 797b8e80941Smrg} 798b8e80941Smrgstatic inline nir_ssa_def * 799b8e80941Smrgnir_i2i64(nir_builder *build, nir_ssa_def *src0) 800b8e80941Smrg{ 801b8e80941Smrg return nir_build_alu(build, nir_op_i2i64, src0, NULL, NULL, NULL); 802b8e80941Smrg} 803b8e80941Smrgstatic inline nir_ssa_def * 804b8e80941Smrgnir_i2i8(nir_builder *build, nir_ssa_def *src0) 805b8e80941Smrg{ 806b8e80941Smrg return nir_build_alu(build, nir_op_i2i8, src0, NULL, NULL, NULL); 807b8e80941Smrg} 808b8e80941Smrgstatic inline nir_ssa_def * 809b8e80941Smrgnir_iabs(nir_builder *build, nir_ssa_def *src0) 810b8e80941Smrg{ 811b8e80941Smrg return nir_build_alu(build, nir_op_iabs, src0, NULL, NULL, NULL); 812b8e80941Smrg} 813b8e80941Smrgstatic inline nir_ssa_def * 814b8e80941Smrgnir_iadd(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 815b8e80941Smrg{ 816b8e80941Smrg return nir_build_alu(build, nir_op_iadd, src0, src1, NULL, NULL); 817b8e80941Smrg} 818b8e80941Smrgstatic inline nir_ssa_def * 819b8e80941Smrgnir_iadd_sat(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 820b8e80941Smrg{ 821b8e80941Smrg return nir_build_alu(build, nir_op_iadd_sat, src0, src1, NULL, NULL); 822b8e80941Smrg} 823b8e80941Smrgstatic inline nir_ssa_def * 824b8e80941Smrgnir_iand(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 825b8e80941Smrg{ 826b8e80941Smrg return nir_build_alu(build, nir_op_iand, src0, src1, NULL, NULL); 827b8e80941Smrg} 828b8e80941Smrgstatic inline nir_ssa_def * 829b8e80941Smrgnir_ibfe(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2) 830b8e80941Smrg{ 831b8e80941Smrg return nir_build_alu(build, nir_op_ibfe, src0, src1, src2, NULL); 832b8e80941Smrg} 833b8e80941Smrgstatic inline nir_ssa_def * 834b8e80941Smrgnir_ibitfield_extract(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2) 835b8e80941Smrg{ 836b8e80941Smrg return nir_build_alu(build, nir_op_ibitfield_extract, src0, src1, src2, NULL); 837b8e80941Smrg} 838b8e80941Smrgstatic inline nir_ssa_def * 839b8e80941Smrgnir_idiv(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 840b8e80941Smrg{ 841b8e80941Smrg return nir_build_alu(build, nir_op_idiv, src0, src1, NULL, NULL); 842b8e80941Smrg} 843b8e80941Smrgstatic inline nir_ssa_def * 844b8e80941Smrgnir_ieq(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 845b8e80941Smrg{ 846b8e80941Smrg return nir_build_alu(build, nir_op_ieq, src0, src1, NULL, NULL); 847b8e80941Smrg} 848b8e80941Smrgstatic inline nir_ssa_def * 849b8e80941Smrgnir_ieq32(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 850b8e80941Smrg{ 851b8e80941Smrg return nir_build_alu(build, nir_op_ieq32, src0, src1, NULL, NULL); 852b8e80941Smrg} 853b8e80941Smrgstatic inline nir_ssa_def * 854b8e80941Smrgnir_ifind_msb(nir_builder *build, nir_ssa_def *src0) 855b8e80941Smrg{ 856b8e80941Smrg return nir_build_alu(build, nir_op_ifind_msb, src0, NULL, NULL, NULL); 857b8e80941Smrg} 858b8e80941Smrgstatic inline nir_ssa_def * 859b8e80941Smrgnir_ige(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 860b8e80941Smrg{ 861b8e80941Smrg return nir_build_alu(build, nir_op_ige, src0, src1, NULL, NULL); 862b8e80941Smrg} 863b8e80941Smrgstatic inline nir_ssa_def * 864b8e80941Smrgnir_ige32(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 865b8e80941Smrg{ 866b8e80941Smrg return nir_build_alu(build, nir_op_ige32, src0, src1, NULL, NULL); 867b8e80941Smrg} 868b8e80941Smrgstatic inline nir_ssa_def * 869b8e80941Smrgnir_ihadd(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 870b8e80941Smrg{ 871b8e80941Smrg return nir_build_alu(build, nir_op_ihadd, src0, src1, NULL, NULL); 872b8e80941Smrg} 873b8e80941Smrgstatic inline nir_ssa_def * 874b8e80941Smrgnir_ilt(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 875b8e80941Smrg{ 876b8e80941Smrg return nir_build_alu(build, nir_op_ilt, src0, src1, NULL, NULL); 877b8e80941Smrg} 878b8e80941Smrgstatic inline nir_ssa_def * 879b8e80941Smrgnir_ilt32(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 880b8e80941Smrg{ 881b8e80941Smrg return nir_build_alu(build, nir_op_ilt32, src0, src1, NULL, NULL); 882b8e80941Smrg} 883b8e80941Smrgstatic inline nir_ssa_def * 884b8e80941Smrgnir_imax(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 885b8e80941Smrg{ 886b8e80941Smrg return nir_build_alu(build, nir_op_imax, src0, src1, NULL, NULL); 887b8e80941Smrg} 888b8e80941Smrgstatic inline nir_ssa_def * 889b8e80941Smrgnir_imax3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2) 890b8e80941Smrg{ 891b8e80941Smrg return nir_build_alu(build, nir_op_imax3, src0, src1, src2, NULL); 892b8e80941Smrg} 893b8e80941Smrgstatic inline nir_ssa_def * 894b8e80941Smrgnir_imed3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2) 895b8e80941Smrg{ 896b8e80941Smrg return nir_build_alu(build, nir_op_imed3, src0, src1, src2, NULL); 897b8e80941Smrg} 898b8e80941Smrgstatic inline nir_ssa_def * 899b8e80941Smrgnir_imin(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 900b8e80941Smrg{ 901b8e80941Smrg return nir_build_alu(build, nir_op_imin, src0, src1, NULL, NULL); 902b8e80941Smrg} 903b8e80941Smrgstatic inline nir_ssa_def * 904b8e80941Smrgnir_imin3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2) 905b8e80941Smrg{ 906b8e80941Smrg return nir_build_alu(build, nir_op_imin3, src0, src1, src2, NULL); 907b8e80941Smrg} 908b8e80941Smrgstatic inline nir_ssa_def * 909b8e80941Smrgnir_imod(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 910b8e80941Smrg{ 911b8e80941Smrg return nir_build_alu(build, nir_op_imod, src0, src1, NULL, NULL); 912b8e80941Smrg} 913b8e80941Smrgstatic inline nir_ssa_def * 914b8e80941Smrgnir_imov(nir_builder *build, nir_ssa_def *src0) 915b8e80941Smrg{ 916b8e80941Smrg return nir_build_alu(build, nir_op_imov, src0, NULL, NULL, NULL); 917b8e80941Smrg} 918b8e80941Smrgstatic inline nir_ssa_def * 919b8e80941Smrgnir_imul(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 920b8e80941Smrg{ 921b8e80941Smrg return nir_build_alu(build, nir_op_imul, src0, src1, NULL, NULL); 922b8e80941Smrg} 923b8e80941Smrgstatic inline nir_ssa_def * 924b8e80941Smrgnir_imul_2x32_64(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 925b8e80941Smrg{ 926b8e80941Smrg return nir_build_alu(build, nir_op_imul_2x32_64, src0, src1, NULL, NULL); 927b8e80941Smrg} 928b8e80941Smrgstatic inline nir_ssa_def * 929b8e80941Smrgnir_imul_high(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 930b8e80941Smrg{ 931b8e80941Smrg return nir_build_alu(build, nir_op_imul_high, src0, src1, NULL, NULL); 932b8e80941Smrg} 933b8e80941Smrgstatic inline nir_ssa_def * 934b8e80941Smrgnir_ine(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 935b8e80941Smrg{ 936b8e80941Smrg return nir_build_alu(build, nir_op_ine, src0, src1, NULL, NULL); 937b8e80941Smrg} 938b8e80941Smrgstatic inline nir_ssa_def * 939b8e80941Smrgnir_ine32(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 940b8e80941Smrg{ 941b8e80941Smrg return nir_build_alu(build, nir_op_ine32, src0, src1, NULL, NULL); 942b8e80941Smrg} 943b8e80941Smrgstatic inline nir_ssa_def * 944b8e80941Smrgnir_ineg(nir_builder *build, nir_ssa_def *src0) 945b8e80941Smrg{ 946b8e80941Smrg return nir_build_alu(build, nir_op_ineg, src0, NULL, NULL, NULL); 947b8e80941Smrg} 948b8e80941Smrgstatic inline nir_ssa_def * 949b8e80941Smrgnir_inot(nir_builder *build, nir_ssa_def *src0) 950b8e80941Smrg{ 951b8e80941Smrg return nir_build_alu(build, nir_op_inot, src0, NULL, NULL, NULL); 952b8e80941Smrg} 953b8e80941Smrgstatic inline nir_ssa_def * 954b8e80941Smrgnir_ior(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 955b8e80941Smrg{ 956b8e80941Smrg return nir_build_alu(build, nir_op_ior, src0, src1, NULL, NULL); 957b8e80941Smrg} 958b8e80941Smrgstatic inline nir_ssa_def * 959b8e80941Smrgnir_irem(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 960b8e80941Smrg{ 961b8e80941Smrg return nir_build_alu(build, nir_op_irem, src0, src1, NULL, NULL); 962b8e80941Smrg} 963b8e80941Smrgstatic inline nir_ssa_def * 964b8e80941Smrgnir_irhadd(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 965b8e80941Smrg{ 966b8e80941Smrg return nir_build_alu(build, nir_op_irhadd, src0, src1, NULL, NULL); 967b8e80941Smrg} 968b8e80941Smrgstatic inline nir_ssa_def * 969b8e80941Smrgnir_ishl(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 970b8e80941Smrg{ 971b8e80941Smrg return nir_build_alu(build, nir_op_ishl, src0, src1, NULL, NULL); 972b8e80941Smrg} 973b8e80941Smrgstatic inline nir_ssa_def * 974b8e80941Smrgnir_ishr(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 975b8e80941Smrg{ 976b8e80941Smrg return nir_build_alu(build, nir_op_ishr, src0, src1, NULL, NULL); 977b8e80941Smrg} 978b8e80941Smrgstatic inline nir_ssa_def * 979b8e80941Smrgnir_isign(nir_builder *build, nir_ssa_def *src0) 980b8e80941Smrg{ 981b8e80941Smrg return nir_build_alu(build, nir_op_isign, src0, NULL, NULL, NULL); 982b8e80941Smrg} 983b8e80941Smrgstatic inline nir_ssa_def * 984b8e80941Smrgnir_isub(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 985b8e80941Smrg{ 986b8e80941Smrg return nir_build_alu(build, nir_op_isub, src0, src1, NULL, NULL); 987b8e80941Smrg} 988b8e80941Smrgstatic inline nir_ssa_def * 989b8e80941Smrgnir_isub_sat(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 990b8e80941Smrg{ 991b8e80941Smrg return nir_build_alu(build, nir_op_isub_sat, src0, src1, NULL, NULL); 992b8e80941Smrg} 993b8e80941Smrgstatic inline nir_ssa_def * 994b8e80941Smrgnir_ixor(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 995b8e80941Smrg{ 996b8e80941Smrg return nir_build_alu(build, nir_op_ixor, src0, src1, NULL, NULL); 997b8e80941Smrg} 998b8e80941Smrgstatic inline nir_ssa_def * 999b8e80941Smrgnir_ldexp(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 1000b8e80941Smrg{ 1001b8e80941Smrg return nir_build_alu(build, nir_op_ldexp, src0, src1, NULL, NULL); 1002b8e80941Smrg} 1003b8e80941Smrgstatic inline nir_ssa_def * 1004b8e80941Smrgnir_pack_32_2x16(nir_builder *build, nir_ssa_def *src0) 1005b8e80941Smrg{ 1006b8e80941Smrg return nir_build_alu(build, nir_op_pack_32_2x16, src0, NULL, NULL, NULL); 1007b8e80941Smrg} 1008b8e80941Smrgstatic inline nir_ssa_def * 1009b8e80941Smrgnir_pack_32_2x16_split(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 1010b8e80941Smrg{ 1011b8e80941Smrg return nir_build_alu(build, nir_op_pack_32_2x16_split, src0, src1, NULL, NULL); 1012b8e80941Smrg} 1013b8e80941Smrgstatic inline nir_ssa_def * 1014b8e80941Smrgnir_pack_64_2x32(nir_builder *build, nir_ssa_def *src0) 1015b8e80941Smrg{ 1016b8e80941Smrg return nir_build_alu(build, nir_op_pack_64_2x32, src0, NULL, NULL, NULL); 1017b8e80941Smrg} 1018b8e80941Smrgstatic inline nir_ssa_def * 1019b8e80941Smrgnir_pack_64_2x32_split(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 1020b8e80941Smrg{ 1021b8e80941Smrg return nir_build_alu(build, nir_op_pack_64_2x32_split, src0, src1, NULL, NULL); 1022b8e80941Smrg} 1023b8e80941Smrgstatic inline nir_ssa_def * 1024b8e80941Smrgnir_pack_64_4x16(nir_builder *build, nir_ssa_def *src0) 1025b8e80941Smrg{ 1026b8e80941Smrg return nir_build_alu(build, nir_op_pack_64_4x16, src0, NULL, NULL, NULL); 1027b8e80941Smrg} 1028b8e80941Smrgstatic inline nir_ssa_def * 1029b8e80941Smrgnir_pack_half_2x16(nir_builder *build, nir_ssa_def *src0) 1030b8e80941Smrg{ 1031b8e80941Smrg return nir_build_alu(build, nir_op_pack_half_2x16, src0, NULL, NULL, NULL); 1032b8e80941Smrg} 1033b8e80941Smrgstatic inline nir_ssa_def * 1034b8e80941Smrgnir_pack_half_2x16_split(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 1035b8e80941Smrg{ 1036b8e80941Smrg return nir_build_alu(build, nir_op_pack_half_2x16_split, src0, src1, NULL, NULL); 1037b8e80941Smrg} 1038b8e80941Smrgstatic inline nir_ssa_def * 1039b8e80941Smrgnir_pack_snorm_2x16(nir_builder *build, nir_ssa_def *src0) 1040b8e80941Smrg{ 1041b8e80941Smrg return nir_build_alu(build, nir_op_pack_snorm_2x16, src0, NULL, NULL, NULL); 1042b8e80941Smrg} 1043b8e80941Smrgstatic inline nir_ssa_def * 1044b8e80941Smrgnir_pack_snorm_4x8(nir_builder *build, nir_ssa_def *src0) 1045b8e80941Smrg{ 1046b8e80941Smrg return nir_build_alu(build, nir_op_pack_snorm_4x8, src0, NULL, NULL, NULL); 1047b8e80941Smrg} 1048b8e80941Smrgstatic inline nir_ssa_def * 1049b8e80941Smrgnir_pack_unorm_2x16(nir_builder *build, nir_ssa_def *src0) 1050b8e80941Smrg{ 1051b8e80941Smrg return nir_build_alu(build, nir_op_pack_unorm_2x16, src0, NULL, NULL, NULL); 1052b8e80941Smrg} 1053b8e80941Smrgstatic inline nir_ssa_def * 1054b8e80941Smrgnir_pack_unorm_4x8(nir_builder *build, nir_ssa_def *src0) 1055b8e80941Smrg{ 1056b8e80941Smrg return nir_build_alu(build, nir_op_pack_unorm_4x8, src0, NULL, NULL, NULL); 1057b8e80941Smrg} 1058b8e80941Smrgstatic inline nir_ssa_def * 1059b8e80941Smrgnir_pack_uvec2_to_uint(nir_builder *build, nir_ssa_def *src0) 1060b8e80941Smrg{ 1061b8e80941Smrg return nir_build_alu(build, nir_op_pack_uvec2_to_uint, src0, NULL, NULL, NULL); 1062b8e80941Smrg} 1063b8e80941Smrgstatic inline nir_ssa_def * 1064b8e80941Smrgnir_pack_uvec4_to_uint(nir_builder *build, nir_ssa_def *src0) 1065b8e80941Smrg{ 1066b8e80941Smrg return nir_build_alu(build, nir_op_pack_uvec4_to_uint, src0, NULL, NULL, NULL); 1067b8e80941Smrg} 1068b8e80941Smrgstatic inline nir_ssa_def * 1069b8e80941Smrgnir_seq(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 1070b8e80941Smrg{ 1071b8e80941Smrg return nir_build_alu(build, nir_op_seq, src0, src1, NULL, NULL); 1072b8e80941Smrg} 1073b8e80941Smrgstatic inline nir_ssa_def * 1074b8e80941Smrgnir_sge(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 1075b8e80941Smrg{ 1076b8e80941Smrg return nir_build_alu(build, nir_op_sge, src0, src1, NULL, NULL); 1077b8e80941Smrg} 1078b8e80941Smrgstatic inline nir_ssa_def * 1079b8e80941Smrgnir_slt(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 1080b8e80941Smrg{ 1081b8e80941Smrg return nir_build_alu(build, nir_op_slt, src0, src1, NULL, NULL); 1082b8e80941Smrg} 1083b8e80941Smrgstatic inline nir_ssa_def * 1084b8e80941Smrgnir_sne(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 1085b8e80941Smrg{ 1086b8e80941Smrg return nir_build_alu(build, nir_op_sne, src0, src1, NULL, NULL); 1087b8e80941Smrg} 1088b8e80941Smrgstatic inline nir_ssa_def * 1089b8e80941Smrgnir_u2f16(nir_builder *build, nir_ssa_def *src0) 1090b8e80941Smrg{ 1091b8e80941Smrg return nir_build_alu(build, nir_op_u2f16, src0, NULL, NULL, NULL); 1092b8e80941Smrg} 1093b8e80941Smrgstatic inline nir_ssa_def * 1094b8e80941Smrgnir_u2f32(nir_builder *build, nir_ssa_def *src0) 1095b8e80941Smrg{ 1096b8e80941Smrg return nir_build_alu(build, nir_op_u2f32, src0, NULL, NULL, NULL); 1097b8e80941Smrg} 1098b8e80941Smrgstatic inline nir_ssa_def * 1099b8e80941Smrgnir_u2f64(nir_builder *build, nir_ssa_def *src0) 1100b8e80941Smrg{ 1101b8e80941Smrg return nir_build_alu(build, nir_op_u2f64, src0, NULL, NULL, NULL); 1102b8e80941Smrg} 1103b8e80941Smrgstatic inline nir_ssa_def * 1104b8e80941Smrgnir_u2u1(nir_builder *build, nir_ssa_def *src0) 1105b8e80941Smrg{ 1106b8e80941Smrg return nir_build_alu(build, nir_op_u2u1, src0, NULL, NULL, NULL); 1107b8e80941Smrg} 1108b8e80941Smrgstatic inline nir_ssa_def * 1109b8e80941Smrgnir_u2u16(nir_builder *build, nir_ssa_def *src0) 1110b8e80941Smrg{ 1111b8e80941Smrg return nir_build_alu(build, nir_op_u2u16, src0, NULL, NULL, NULL); 1112b8e80941Smrg} 1113b8e80941Smrgstatic inline nir_ssa_def * 1114b8e80941Smrgnir_u2u32(nir_builder *build, nir_ssa_def *src0) 1115b8e80941Smrg{ 1116b8e80941Smrg return nir_build_alu(build, nir_op_u2u32, src0, NULL, NULL, NULL); 1117b8e80941Smrg} 1118b8e80941Smrgstatic inline nir_ssa_def * 1119b8e80941Smrgnir_u2u64(nir_builder *build, nir_ssa_def *src0) 1120b8e80941Smrg{ 1121b8e80941Smrg return nir_build_alu(build, nir_op_u2u64, src0, NULL, NULL, NULL); 1122b8e80941Smrg} 1123b8e80941Smrgstatic inline nir_ssa_def * 1124b8e80941Smrgnir_u2u8(nir_builder *build, nir_ssa_def *src0) 1125b8e80941Smrg{ 1126b8e80941Smrg return nir_build_alu(build, nir_op_u2u8, src0, NULL, NULL, NULL); 1127b8e80941Smrg} 1128b8e80941Smrgstatic inline nir_ssa_def * 1129b8e80941Smrgnir_uadd_carry(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 1130b8e80941Smrg{ 1131b8e80941Smrg return nir_build_alu(build, nir_op_uadd_carry, src0, src1, NULL, NULL); 1132b8e80941Smrg} 1133b8e80941Smrgstatic inline nir_ssa_def * 1134b8e80941Smrgnir_uadd_sat(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 1135b8e80941Smrg{ 1136b8e80941Smrg return nir_build_alu(build, nir_op_uadd_sat, src0, src1, NULL, NULL); 1137b8e80941Smrg} 1138b8e80941Smrgstatic inline nir_ssa_def * 1139b8e80941Smrgnir_ubfe(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2) 1140b8e80941Smrg{ 1141b8e80941Smrg return nir_build_alu(build, nir_op_ubfe, src0, src1, src2, NULL); 1142b8e80941Smrg} 1143b8e80941Smrgstatic inline nir_ssa_def * 1144b8e80941Smrgnir_ubitfield_extract(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2) 1145b8e80941Smrg{ 1146b8e80941Smrg return nir_build_alu(build, nir_op_ubitfield_extract, src0, src1, src2, NULL); 1147b8e80941Smrg} 1148b8e80941Smrgstatic inline nir_ssa_def * 1149b8e80941Smrgnir_udiv(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 1150b8e80941Smrg{ 1151b8e80941Smrg return nir_build_alu(build, nir_op_udiv, src0, src1, NULL, NULL); 1152b8e80941Smrg} 1153b8e80941Smrgstatic inline nir_ssa_def * 1154b8e80941Smrgnir_ufind_msb(nir_builder *build, nir_ssa_def *src0) 1155b8e80941Smrg{ 1156b8e80941Smrg return nir_build_alu(build, nir_op_ufind_msb, src0, NULL, NULL, NULL); 1157b8e80941Smrg} 1158b8e80941Smrgstatic inline nir_ssa_def * 1159b8e80941Smrgnir_uge(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 1160b8e80941Smrg{ 1161b8e80941Smrg return nir_build_alu(build, nir_op_uge, src0, src1, NULL, NULL); 1162b8e80941Smrg} 1163b8e80941Smrgstatic inline nir_ssa_def * 1164b8e80941Smrgnir_uge32(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 1165b8e80941Smrg{ 1166b8e80941Smrg return nir_build_alu(build, nir_op_uge32, src0, src1, NULL, NULL); 1167b8e80941Smrg} 1168b8e80941Smrgstatic inline nir_ssa_def * 1169b8e80941Smrgnir_uhadd(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 1170b8e80941Smrg{ 1171b8e80941Smrg return nir_build_alu(build, nir_op_uhadd, src0, src1, NULL, NULL); 1172b8e80941Smrg} 1173b8e80941Smrgstatic inline nir_ssa_def * 1174b8e80941Smrgnir_ult(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 1175b8e80941Smrg{ 1176b8e80941Smrg return nir_build_alu(build, nir_op_ult, src0, src1, NULL, NULL); 1177b8e80941Smrg} 1178b8e80941Smrgstatic inline nir_ssa_def * 1179b8e80941Smrgnir_ult32(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 1180b8e80941Smrg{ 1181b8e80941Smrg return nir_build_alu(build, nir_op_ult32, src0, src1, NULL, NULL); 1182b8e80941Smrg} 1183b8e80941Smrgstatic inline nir_ssa_def * 1184b8e80941Smrgnir_umax(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 1185b8e80941Smrg{ 1186b8e80941Smrg return nir_build_alu(build, nir_op_umax, src0, src1, NULL, NULL); 1187b8e80941Smrg} 1188b8e80941Smrgstatic inline nir_ssa_def * 1189b8e80941Smrgnir_umax3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2) 1190b8e80941Smrg{ 1191b8e80941Smrg return nir_build_alu(build, nir_op_umax3, src0, src1, src2, NULL); 1192b8e80941Smrg} 1193b8e80941Smrgstatic inline nir_ssa_def * 1194b8e80941Smrgnir_umax_4x8(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 1195b8e80941Smrg{ 1196b8e80941Smrg return nir_build_alu(build, nir_op_umax_4x8, src0, src1, NULL, NULL); 1197b8e80941Smrg} 1198b8e80941Smrgstatic inline nir_ssa_def * 1199b8e80941Smrgnir_umed3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2) 1200b8e80941Smrg{ 1201b8e80941Smrg return nir_build_alu(build, nir_op_umed3, src0, src1, src2, NULL); 1202b8e80941Smrg} 1203b8e80941Smrgstatic inline nir_ssa_def * 1204b8e80941Smrgnir_umin(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 1205b8e80941Smrg{ 1206b8e80941Smrg return nir_build_alu(build, nir_op_umin, src0, src1, NULL, NULL); 1207b8e80941Smrg} 1208b8e80941Smrgstatic inline nir_ssa_def * 1209b8e80941Smrgnir_umin3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2) 1210b8e80941Smrg{ 1211b8e80941Smrg return nir_build_alu(build, nir_op_umin3, src0, src1, src2, NULL); 1212b8e80941Smrg} 1213b8e80941Smrgstatic inline nir_ssa_def * 1214b8e80941Smrgnir_umin_4x8(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 1215b8e80941Smrg{ 1216b8e80941Smrg return nir_build_alu(build, nir_op_umin_4x8, src0, src1, NULL, NULL); 1217b8e80941Smrg} 1218b8e80941Smrgstatic inline nir_ssa_def * 1219b8e80941Smrgnir_umod(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 1220b8e80941Smrg{ 1221b8e80941Smrg return nir_build_alu(build, nir_op_umod, src0, src1, NULL, NULL); 1222b8e80941Smrg} 1223b8e80941Smrgstatic inline nir_ssa_def * 1224b8e80941Smrgnir_umul_2x32_64(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 1225b8e80941Smrg{ 1226b8e80941Smrg return nir_build_alu(build, nir_op_umul_2x32_64, src0, src1, NULL, NULL); 1227b8e80941Smrg} 1228b8e80941Smrgstatic inline nir_ssa_def * 1229b8e80941Smrgnir_umul_high(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 1230b8e80941Smrg{ 1231b8e80941Smrg return nir_build_alu(build, nir_op_umul_high, src0, src1, NULL, NULL); 1232b8e80941Smrg} 1233b8e80941Smrgstatic inline nir_ssa_def * 1234b8e80941Smrgnir_umul_unorm_4x8(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 1235b8e80941Smrg{ 1236b8e80941Smrg return nir_build_alu(build, nir_op_umul_unorm_4x8, src0, src1, NULL, NULL); 1237b8e80941Smrg} 1238b8e80941Smrgstatic inline nir_ssa_def * 1239b8e80941Smrgnir_unpack_32_2x16(nir_builder *build, nir_ssa_def *src0) 1240b8e80941Smrg{ 1241b8e80941Smrg return nir_build_alu(build, nir_op_unpack_32_2x16, src0, NULL, NULL, NULL); 1242b8e80941Smrg} 1243b8e80941Smrgstatic inline nir_ssa_def * 1244b8e80941Smrgnir_unpack_32_2x16_split_x(nir_builder *build, nir_ssa_def *src0) 1245b8e80941Smrg{ 1246b8e80941Smrg return nir_build_alu(build, nir_op_unpack_32_2x16_split_x, src0, NULL, NULL, NULL); 1247b8e80941Smrg} 1248b8e80941Smrgstatic inline nir_ssa_def * 1249b8e80941Smrgnir_unpack_32_2x16_split_y(nir_builder *build, nir_ssa_def *src0) 1250b8e80941Smrg{ 1251b8e80941Smrg return nir_build_alu(build, nir_op_unpack_32_2x16_split_y, src0, NULL, NULL, NULL); 1252b8e80941Smrg} 1253b8e80941Smrgstatic inline nir_ssa_def * 1254b8e80941Smrgnir_unpack_64_2x32(nir_builder *build, nir_ssa_def *src0) 1255b8e80941Smrg{ 1256b8e80941Smrg return nir_build_alu(build, nir_op_unpack_64_2x32, src0, NULL, NULL, NULL); 1257b8e80941Smrg} 1258b8e80941Smrgstatic inline nir_ssa_def * 1259b8e80941Smrgnir_unpack_64_2x32_split_x(nir_builder *build, nir_ssa_def *src0) 1260b8e80941Smrg{ 1261b8e80941Smrg return nir_build_alu(build, nir_op_unpack_64_2x32_split_x, src0, NULL, NULL, NULL); 1262b8e80941Smrg} 1263b8e80941Smrgstatic inline nir_ssa_def * 1264b8e80941Smrgnir_unpack_64_2x32_split_y(nir_builder *build, nir_ssa_def *src0) 1265b8e80941Smrg{ 1266b8e80941Smrg return nir_build_alu(build, nir_op_unpack_64_2x32_split_y, src0, NULL, NULL, NULL); 1267b8e80941Smrg} 1268b8e80941Smrgstatic inline nir_ssa_def * 1269b8e80941Smrgnir_unpack_64_4x16(nir_builder *build, nir_ssa_def *src0) 1270b8e80941Smrg{ 1271b8e80941Smrg return nir_build_alu(build, nir_op_unpack_64_4x16, src0, NULL, NULL, NULL); 1272b8e80941Smrg} 1273b8e80941Smrgstatic inline nir_ssa_def * 1274b8e80941Smrgnir_unpack_half_2x16(nir_builder *build, nir_ssa_def *src0) 1275b8e80941Smrg{ 1276b8e80941Smrg return nir_build_alu(build, nir_op_unpack_half_2x16, src0, NULL, NULL, NULL); 1277b8e80941Smrg} 1278b8e80941Smrgstatic inline nir_ssa_def * 1279b8e80941Smrgnir_unpack_half_2x16_split_x(nir_builder *build, nir_ssa_def *src0) 1280b8e80941Smrg{ 1281b8e80941Smrg return nir_build_alu(build, nir_op_unpack_half_2x16_split_x, src0, NULL, NULL, NULL); 1282b8e80941Smrg} 1283b8e80941Smrgstatic inline nir_ssa_def * 1284b8e80941Smrgnir_unpack_half_2x16_split_y(nir_builder *build, nir_ssa_def *src0) 1285b8e80941Smrg{ 1286b8e80941Smrg return nir_build_alu(build, nir_op_unpack_half_2x16_split_y, src0, NULL, NULL, NULL); 1287b8e80941Smrg} 1288b8e80941Smrgstatic inline nir_ssa_def * 1289b8e80941Smrgnir_unpack_snorm_2x16(nir_builder *build, nir_ssa_def *src0) 1290b8e80941Smrg{ 1291b8e80941Smrg return nir_build_alu(build, nir_op_unpack_snorm_2x16, src0, NULL, NULL, NULL); 1292b8e80941Smrg} 1293b8e80941Smrgstatic inline nir_ssa_def * 1294b8e80941Smrgnir_unpack_snorm_4x8(nir_builder *build, nir_ssa_def *src0) 1295b8e80941Smrg{ 1296b8e80941Smrg return nir_build_alu(build, nir_op_unpack_snorm_4x8, src0, NULL, NULL, NULL); 1297b8e80941Smrg} 1298b8e80941Smrgstatic inline nir_ssa_def * 1299b8e80941Smrgnir_unpack_unorm_2x16(nir_builder *build, nir_ssa_def *src0) 1300b8e80941Smrg{ 1301b8e80941Smrg return nir_build_alu(build, nir_op_unpack_unorm_2x16, src0, NULL, NULL, NULL); 1302b8e80941Smrg} 1303b8e80941Smrgstatic inline nir_ssa_def * 1304b8e80941Smrgnir_unpack_unorm_4x8(nir_builder *build, nir_ssa_def *src0) 1305b8e80941Smrg{ 1306b8e80941Smrg return nir_build_alu(build, nir_op_unpack_unorm_4x8, src0, NULL, NULL, NULL); 1307b8e80941Smrg} 1308b8e80941Smrgstatic inline nir_ssa_def * 1309b8e80941Smrgnir_urhadd(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 1310b8e80941Smrg{ 1311b8e80941Smrg return nir_build_alu(build, nir_op_urhadd, src0, src1, NULL, NULL); 1312b8e80941Smrg} 1313b8e80941Smrgstatic inline nir_ssa_def * 1314b8e80941Smrgnir_usadd_4x8(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 1315b8e80941Smrg{ 1316b8e80941Smrg return nir_build_alu(build, nir_op_usadd_4x8, src0, src1, NULL, NULL); 1317b8e80941Smrg} 1318b8e80941Smrgstatic inline nir_ssa_def * 1319b8e80941Smrgnir_ushr(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 1320b8e80941Smrg{ 1321b8e80941Smrg return nir_build_alu(build, nir_op_ushr, src0, src1, NULL, NULL); 1322b8e80941Smrg} 1323b8e80941Smrgstatic inline nir_ssa_def * 1324b8e80941Smrgnir_ussub_4x8(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 1325b8e80941Smrg{ 1326b8e80941Smrg return nir_build_alu(build, nir_op_ussub_4x8, src0, src1, NULL, NULL); 1327b8e80941Smrg} 1328b8e80941Smrgstatic inline nir_ssa_def * 1329b8e80941Smrgnir_usub_borrow(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 1330b8e80941Smrg{ 1331b8e80941Smrg return nir_build_alu(build, nir_op_usub_borrow, src0, src1, NULL, NULL); 1332b8e80941Smrg} 1333b8e80941Smrgstatic inline nir_ssa_def * 1334b8e80941Smrgnir_usub_sat(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 1335b8e80941Smrg{ 1336b8e80941Smrg return nir_build_alu(build, nir_op_usub_sat, src0, src1, NULL, NULL); 1337b8e80941Smrg} 1338b8e80941Smrgstatic inline nir_ssa_def * 1339b8e80941Smrgnir_vec2(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1) 1340b8e80941Smrg{ 1341b8e80941Smrg return nir_build_alu(build, nir_op_vec2, src0, src1, NULL, NULL); 1342b8e80941Smrg} 1343b8e80941Smrgstatic inline nir_ssa_def * 1344b8e80941Smrgnir_vec3(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2) 1345b8e80941Smrg{ 1346b8e80941Smrg return nir_build_alu(build, nir_op_vec3, src0, src1, src2, NULL); 1347b8e80941Smrg} 1348b8e80941Smrgstatic inline nir_ssa_def * 1349b8e80941Smrgnir_vec4(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1, nir_ssa_def *src2, nir_ssa_def *src3) 1350b8e80941Smrg{ 1351b8e80941Smrg return nir_build_alu(build, nir_op_vec4, src0, src1, src2, src3); 1352b8e80941Smrg} 1353b8e80941Smrg 1354b8e80941Smrg/* Generic builder for system values. */ 1355b8e80941Smrgstatic inline nir_ssa_def * 1356b8e80941Smrgnir_load_system_value(nir_builder *build, nir_intrinsic_op op, int index, 1357b8e80941Smrg unsigned bit_size) 1358b8e80941Smrg{ 1359b8e80941Smrg nir_intrinsic_instr *load = nir_intrinsic_instr_create(build->shader, op); 1360b8e80941Smrg load->num_components = nir_intrinsic_infos[op].dest_components; 1361b8e80941Smrg load->const_index[0] = index; 1362b8e80941Smrg nir_ssa_dest_init(&load->instr, &load->dest, 1363b8e80941Smrg nir_intrinsic_infos[op].dest_components, bit_size, NULL); 1364b8e80941Smrg nir_builder_instr_insert(build, &load->instr); 1365b8e80941Smrg return &load->dest.ssa; 1366b8e80941Smrg} 1367b8e80941Smrg 1368b8e80941Smrg 1369b8e80941Smrg 1370b8e80941Smrg 1371b8e80941Smrgstatic inline nir_ssa_def * 1372b8e80941Smrgnir_load_alpha_ref_float(nir_builder *build) 1373b8e80941Smrg{ 1374b8e80941Smrg return nir_load_system_value(build, nir_intrinsic_load_alpha_ref_float, 1375b8e80941Smrg 0, 32); 1376b8e80941Smrg} 1377b8e80941Smrg 1378b8e80941Smrgstatic inline nir_ssa_def * 1379b8e80941Smrgnir_load_base_instance(nir_builder *build) 1380b8e80941Smrg{ 1381b8e80941Smrg return nir_load_system_value(build, nir_intrinsic_load_base_instance, 1382b8e80941Smrg 0, 32); 1383b8e80941Smrg} 1384b8e80941Smrg 1385b8e80941Smrgstatic inline nir_ssa_def * 1386b8e80941Smrgnir_load_base_vertex(nir_builder *build) 1387b8e80941Smrg{ 1388b8e80941Smrg return nir_load_system_value(build, nir_intrinsic_load_base_vertex, 1389b8e80941Smrg 0, 32); 1390b8e80941Smrg} 1391b8e80941Smrg 1392b8e80941Smrgstatic inline nir_ssa_def * 1393b8e80941Smrgnir_load_blend_const_color_a_float(nir_builder *build) 1394b8e80941Smrg{ 1395b8e80941Smrg return nir_load_system_value(build, nir_intrinsic_load_blend_const_color_a_float, 1396b8e80941Smrg 0, 32); 1397b8e80941Smrg} 1398b8e80941Smrg 1399b8e80941Smrgstatic inline nir_ssa_def * 1400b8e80941Smrgnir_load_blend_const_color_aaaa8888_unorm(nir_builder *build) 1401b8e80941Smrg{ 1402b8e80941Smrg return nir_load_system_value(build, nir_intrinsic_load_blend_const_color_aaaa8888_unorm, 1403b8e80941Smrg 0, 32); 1404b8e80941Smrg} 1405b8e80941Smrg 1406b8e80941Smrgstatic inline nir_ssa_def * 1407b8e80941Smrgnir_load_blend_const_color_b_float(nir_builder *build) 1408b8e80941Smrg{ 1409b8e80941Smrg return nir_load_system_value(build, nir_intrinsic_load_blend_const_color_b_float, 1410b8e80941Smrg 0, 32); 1411b8e80941Smrg} 1412b8e80941Smrg 1413b8e80941Smrgstatic inline nir_ssa_def * 1414b8e80941Smrgnir_load_blend_const_color_g_float(nir_builder *build) 1415b8e80941Smrg{ 1416b8e80941Smrg return nir_load_system_value(build, nir_intrinsic_load_blend_const_color_g_float, 1417b8e80941Smrg 0, 32); 1418b8e80941Smrg} 1419b8e80941Smrg 1420b8e80941Smrgstatic inline nir_ssa_def * 1421b8e80941Smrgnir_load_blend_const_color_r_float(nir_builder *build) 1422b8e80941Smrg{ 1423b8e80941Smrg return nir_load_system_value(build, nir_intrinsic_load_blend_const_color_r_float, 1424b8e80941Smrg 0, 32); 1425b8e80941Smrg} 1426b8e80941Smrg 1427b8e80941Smrgstatic inline nir_ssa_def * 1428b8e80941Smrgnir_load_blend_const_color_rgba8888_unorm(nir_builder *build) 1429b8e80941Smrg{ 1430b8e80941Smrg return nir_load_system_value(build, nir_intrinsic_load_blend_const_color_rgba8888_unorm, 1431b8e80941Smrg 0, 32); 1432b8e80941Smrg} 1433b8e80941Smrg 1434b8e80941Smrgstatic inline nir_ssa_def * 1435b8e80941Smrgnir_load_draw_id(nir_builder *build) 1436b8e80941Smrg{ 1437b8e80941Smrg return nir_load_system_value(build, nir_intrinsic_load_draw_id, 1438b8e80941Smrg 0, 32); 1439b8e80941Smrg} 1440b8e80941Smrg 1441b8e80941Smrgstatic inline nir_ssa_def * 1442b8e80941Smrgnir_load_first_vertex(nir_builder *build) 1443b8e80941Smrg{ 1444b8e80941Smrg return nir_load_system_value(build, nir_intrinsic_load_first_vertex, 1445b8e80941Smrg 0, 32); 1446b8e80941Smrg} 1447b8e80941Smrg 1448b8e80941Smrgstatic inline nir_ssa_def * 1449b8e80941Smrgnir_load_frag_coord(nir_builder *build) 1450b8e80941Smrg{ 1451b8e80941Smrg return nir_load_system_value(build, nir_intrinsic_load_frag_coord, 1452b8e80941Smrg 0, 32); 1453b8e80941Smrg} 1454b8e80941Smrg 1455b8e80941Smrgstatic inline nir_ssa_def * 1456b8e80941Smrgnir_load_front_face(nir_builder *build, unsigned bit_size) 1457b8e80941Smrg{ 1458b8e80941Smrg return nir_load_system_value(build, nir_intrinsic_load_front_face, 1459b8e80941Smrg 0, bit_size); 1460b8e80941Smrg} 1461b8e80941Smrg 1462b8e80941Smrgstatic inline nir_ssa_def * 1463b8e80941Smrgnir_load_global_invocation_id(nir_builder *build, unsigned bit_size) 1464b8e80941Smrg{ 1465b8e80941Smrg return nir_load_system_value(build, nir_intrinsic_load_global_invocation_id, 1466b8e80941Smrg 0, bit_size); 1467b8e80941Smrg} 1468b8e80941Smrg 1469b8e80941Smrgstatic inline nir_ssa_def * 1470b8e80941Smrgnir_load_global_invocation_index(nir_builder *build, unsigned bit_size) 1471b8e80941Smrg{ 1472b8e80941Smrg return nir_load_system_value(build, nir_intrinsic_load_global_invocation_index, 1473b8e80941Smrg 0, bit_size); 1474b8e80941Smrg} 1475b8e80941Smrg 1476b8e80941Smrgstatic inline nir_ssa_def * 1477b8e80941Smrgnir_load_helper_invocation(nir_builder *build, unsigned bit_size) 1478b8e80941Smrg{ 1479b8e80941Smrg return nir_load_system_value(build, nir_intrinsic_load_helper_invocation, 1480b8e80941Smrg 0, bit_size); 1481b8e80941Smrg} 1482b8e80941Smrg 1483b8e80941Smrgstatic inline nir_ssa_def * 1484b8e80941Smrgnir_load_instance_id(nir_builder *build) 1485b8e80941Smrg{ 1486b8e80941Smrg return nir_load_system_value(build, nir_intrinsic_load_instance_id, 1487b8e80941Smrg 0, 32); 1488b8e80941Smrg} 1489b8e80941Smrg 1490b8e80941Smrgstatic inline nir_ssa_def * 1491b8e80941Smrgnir_load_invocation_id(nir_builder *build) 1492b8e80941Smrg{ 1493b8e80941Smrg return nir_load_system_value(build, nir_intrinsic_load_invocation_id, 1494b8e80941Smrg 0, 32); 1495b8e80941Smrg} 1496b8e80941Smrg 1497b8e80941Smrgstatic inline nir_ssa_def * 1498b8e80941Smrgnir_load_is_indexed_draw(nir_builder *build) 1499b8e80941Smrg{ 1500b8e80941Smrg return nir_load_system_value(build, nir_intrinsic_load_is_indexed_draw, 1501b8e80941Smrg 0, 32); 1502b8e80941Smrg} 1503b8e80941Smrg 1504b8e80941Smrgstatic inline nir_ssa_def * 1505b8e80941Smrgnir_load_layer_id(nir_builder *build) 1506b8e80941Smrg{ 1507b8e80941Smrg return nir_load_system_value(build, nir_intrinsic_load_layer_id, 1508b8e80941Smrg 0, 32); 1509b8e80941Smrg} 1510b8e80941Smrg 1511b8e80941Smrgstatic inline nir_ssa_def * 1512b8e80941Smrgnir_load_local_group_size(nir_builder *build) 1513b8e80941Smrg{ 1514b8e80941Smrg return nir_load_system_value(build, nir_intrinsic_load_local_group_size, 1515b8e80941Smrg 0, 32); 1516b8e80941Smrg} 1517b8e80941Smrg 1518b8e80941Smrgstatic inline nir_ssa_def * 1519b8e80941Smrgnir_load_local_invocation_id(nir_builder *build) 1520b8e80941Smrg{ 1521b8e80941Smrg return nir_load_system_value(build, nir_intrinsic_load_local_invocation_id, 1522b8e80941Smrg 0, 32); 1523b8e80941Smrg} 1524b8e80941Smrg 1525b8e80941Smrgstatic inline nir_ssa_def * 1526b8e80941Smrgnir_load_local_invocation_index(nir_builder *build) 1527b8e80941Smrg{ 1528b8e80941Smrg return nir_load_system_value(build, nir_intrinsic_load_local_invocation_index, 1529b8e80941Smrg 0, 32); 1530b8e80941Smrg} 1531b8e80941Smrg 1532b8e80941Smrgstatic inline nir_ssa_def * 1533b8e80941Smrgnir_load_num_subgroups(nir_builder *build) 1534b8e80941Smrg{ 1535b8e80941Smrg return nir_load_system_value(build, nir_intrinsic_load_num_subgroups, 1536b8e80941Smrg 0, 32); 1537b8e80941Smrg} 1538b8e80941Smrg 1539b8e80941Smrgstatic inline nir_ssa_def * 1540b8e80941Smrgnir_load_num_work_groups(nir_builder *build) 1541b8e80941Smrg{ 1542b8e80941Smrg return nir_load_system_value(build, nir_intrinsic_load_num_work_groups, 1543b8e80941Smrg 0, 32); 1544b8e80941Smrg} 1545b8e80941Smrg 1546b8e80941Smrgstatic inline nir_ssa_def * 1547b8e80941Smrgnir_load_patch_vertices_in(nir_builder *build) 1548b8e80941Smrg{ 1549b8e80941Smrg return nir_load_system_value(build, nir_intrinsic_load_patch_vertices_in, 1550b8e80941Smrg 0, 32); 1551b8e80941Smrg} 1552b8e80941Smrg 1553b8e80941Smrgstatic inline nir_ssa_def * 1554b8e80941Smrgnir_load_primitive_id(nir_builder *build) 1555b8e80941Smrg{ 1556b8e80941Smrg return nir_load_system_value(build, nir_intrinsic_load_primitive_id, 1557b8e80941Smrg 0, 32); 1558b8e80941Smrg} 1559b8e80941Smrg 1560b8e80941Smrgstatic inline nir_ssa_def * 1561b8e80941Smrgnir_load_sample_id(nir_builder *build) 1562b8e80941Smrg{ 1563b8e80941Smrg return nir_load_system_value(build, nir_intrinsic_load_sample_id, 1564b8e80941Smrg 0, 32); 1565b8e80941Smrg} 1566b8e80941Smrg 1567b8e80941Smrgstatic inline nir_ssa_def * 1568b8e80941Smrgnir_load_sample_id_no_per_sample(nir_builder *build) 1569b8e80941Smrg{ 1570b8e80941Smrg return nir_load_system_value(build, nir_intrinsic_load_sample_id_no_per_sample, 1571b8e80941Smrg 0, 32); 1572b8e80941Smrg} 1573b8e80941Smrg 1574b8e80941Smrgstatic inline nir_ssa_def * 1575b8e80941Smrgnir_load_sample_mask_in(nir_builder *build) 1576b8e80941Smrg{ 1577b8e80941Smrg return nir_load_system_value(build, nir_intrinsic_load_sample_mask_in, 1578b8e80941Smrg 0, 32); 1579b8e80941Smrg} 1580b8e80941Smrg 1581b8e80941Smrgstatic inline nir_ssa_def * 1582b8e80941Smrgnir_load_sample_pos(nir_builder *build) 1583b8e80941Smrg{ 1584b8e80941Smrg return nir_load_system_value(build, nir_intrinsic_load_sample_pos, 1585b8e80941Smrg 0, 32); 1586b8e80941Smrg} 1587b8e80941Smrg 1588b8e80941Smrgstatic inline nir_ssa_def * 1589b8e80941Smrgnir_load_subgroup_eq_mask(nir_builder *build, unsigned bit_size) 1590b8e80941Smrg{ 1591b8e80941Smrg return nir_load_system_value(build, nir_intrinsic_load_subgroup_eq_mask, 1592b8e80941Smrg 0, bit_size); 1593b8e80941Smrg} 1594b8e80941Smrg 1595b8e80941Smrgstatic inline nir_ssa_def * 1596b8e80941Smrgnir_load_subgroup_ge_mask(nir_builder *build, unsigned bit_size) 1597b8e80941Smrg{ 1598b8e80941Smrg return nir_load_system_value(build, nir_intrinsic_load_subgroup_ge_mask, 1599b8e80941Smrg 0, bit_size); 1600b8e80941Smrg} 1601b8e80941Smrg 1602b8e80941Smrgstatic inline nir_ssa_def * 1603b8e80941Smrgnir_load_subgroup_gt_mask(nir_builder *build, unsigned bit_size) 1604b8e80941Smrg{ 1605b8e80941Smrg return nir_load_system_value(build, nir_intrinsic_load_subgroup_gt_mask, 1606b8e80941Smrg 0, bit_size); 1607b8e80941Smrg} 1608b8e80941Smrg 1609b8e80941Smrgstatic inline nir_ssa_def * 1610b8e80941Smrgnir_load_subgroup_id(nir_builder *build) 1611b8e80941Smrg{ 1612b8e80941Smrg return nir_load_system_value(build, nir_intrinsic_load_subgroup_id, 1613b8e80941Smrg 0, 32); 1614b8e80941Smrg} 1615b8e80941Smrg 1616b8e80941Smrgstatic inline nir_ssa_def * 1617b8e80941Smrgnir_load_subgroup_invocation(nir_builder *build) 1618b8e80941Smrg{ 1619b8e80941Smrg return nir_load_system_value(build, nir_intrinsic_load_subgroup_invocation, 1620b8e80941Smrg 0, 32); 1621b8e80941Smrg} 1622b8e80941Smrg 1623b8e80941Smrgstatic inline nir_ssa_def * 1624b8e80941Smrgnir_load_subgroup_le_mask(nir_builder *build, unsigned bit_size) 1625b8e80941Smrg{ 1626b8e80941Smrg return nir_load_system_value(build, nir_intrinsic_load_subgroup_le_mask, 1627b8e80941Smrg 0, bit_size); 1628b8e80941Smrg} 1629b8e80941Smrg 1630b8e80941Smrgstatic inline nir_ssa_def * 1631b8e80941Smrgnir_load_subgroup_lt_mask(nir_builder *build, unsigned bit_size) 1632b8e80941Smrg{ 1633b8e80941Smrg return nir_load_system_value(build, nir_intrinsic_load_subgroup_lt_mask, 1634b8e80941Smrg 0, bit_size); 1635b8e80941Smrg} 1636b8e80941Smrg 1637b8e80941Smrgstatic inline nir_ssa_def * 1638b8e80941Smrgnir_load_subgroup_size(nir_builder *build) 1639b8e80941Smrg{ 1640b8e80941Smrg return nir_load_system_value(build, nir_intrinsic_load_subgroup_size, 1641b8e80941Smrg 0, 32); 1642b8e80941Smrg} 1643b8e80941Smrg 1644b8e80941Smrgstatic inline nir_ssa_def * 1645b8e80941Smrgnir_load_tess_coord(nir_builder *build) 1646b8e80941Smrg{ 1647b8e80941Smrg return nir_load_system_value(build, nir_intrinsic_load_tess_coord, 1648b8e80941Smrg 0, 32); 1649b8e80941Smrg} 1650b8e80941Smrg 1651b8e80941Smrgstatic inline nir_ssa_def * 1652b8e80941Smrgnir_load_tess_level_inner(nir_builder *build) 1653b8e80941Smrg{ 1654b8e80941Smrg return nir_load_system_value(build, nir_intrinsic_load_tess_level_inner, 1655b8e80941Smrg 0, 32); 1656b8e80941Smrg} 1657b8e80941Smrg 1658b8e80941Smrgstatic inline nir_ssa_def * 1659b8e80941Smrgnir_load_tess_level_outer(nir_builder *build) 1660b8e80941Smrg{ 1661b8e80941Smrg return nir_load_system_value(build, nir_intrinsic_load_tess_level_outer, 1662b8e80941Smrg 0, 32); 1663b8e80941Smrg} 1664b8e80941Smrg 1665b8e80941Smrgstatic inline nir_ssa_def * 1666b8e80941Smrgnir_load_user_clip_plane(nir_builder *build, unsigned nir_intrinsic_ucp_id) 1667b8e80941Smrg{ 1668b8e80941Smrg return nir_load_system_value(build, nir_intrinsic_load_user_clip_plane, 1669b8e80941Smrg nir_intrinsic_ucp_id, 32); 1670b8e80941Smrg} 1671b8e80941Smrg 1672b8e80941Smrgstatic inline nir_ssa_def * 1673b8e80941Smrgnir_load_vertex_id(nir_builder *build) 1674b8e80941Smrg{ 1675b8e80941Smrg return nir_load_system_value(build, nir_intrinsic_load_vertex_id, 1676b8e80941Smrg 0, 32); 1677b8e80941Smrg} 1678b8e80941Smrg 1679b8e80941Smrgstatic inline nir_ssa_def * 1680b8e80941Smrgnir_load_vertex_id_zero_base(nir_builder *build) 1681b8e80941Smrg{ 1682b8e80941Smrg return nir_load_system_value(build, nir_intrinsic_load_vertex_id_zero_base, 1683b8e80941Smrg 0, 32); 1684b8e80941Smrg} 1685b8e80941Smrg 1686b8e80941Smrgstatic inline nir_ssa_def * 1687b8e80941Smrgnir_load_view_index(nir_builder *build) 1688b8e80941Smrg{ 1689b8e80941Smrg return nir_load_system_value(build, nir_intrinsic_load_view_index, 1690b8e80941Smrg 0, 32); 1691b8e80941Smrg} 1692b8e80941Smrg 1693b8e80941Smrgstatic inline nir_ssa_def * 1694b8e80941Smrgnir_load_viewport_offset(nir_builder *build) 1695b8e80941Smrg{ 1696b8e80941Smrg return nir_load_system_value(build, nir_intrinsic_load_viewport_offset, 1697b8e80941Smrg 0, 32); 1698b8e80941Smrg} 1699b8e80941Smrg 1700b8e80941Smrgstatic inline nir_ssa_def * 1701b8e80941Smrgnir_load_viewport_scale(nir_builder *build) 1702b8e80941Smrg{ 1703b8e80941Smrg return nir_load_system_value(build, nir_intrinsic_load_viewport_scale, 1704b8e80941Smrg 0, 32); 1705b8e80941Smrg} 1706b8e80941Smrg 1707b8e80941Smrgstatic inline nir_ssa_def * 1708b8e80941Smrgnir_load_viewport_x_scale(nir_builder *build) 1709b8e80941Smrg{ 1710b8e80941Smrg return nir_load_system_value(build, nir_intrinsic_load_viewport_x_scale, 1711b8e80941Smrg 0, 32); 1712b8e80941Smrg} 1713b8e80941Smrg 1714b8e80941Smrgstatic inline nir_ssa_def * 1715b8e80941Smrgnir_load_viewport_y_scale(nir_builder *build) 1716b8e80941Smrg{ 1717b8e80941Smrg return nir_load_system_value(build, nir_intrinsic_load_viewport_y_scale, 1718b8e80941Smrg 0, 32); 1719b8e80941Smrg} 1720b8e80941Smrg 1721b8e80941Smrgstatic inline nir_ssa_def * 1722b8e80941Smrgnir_load_viewport_z_offset(nir_builder *build) 1723b8e80941Smrg{ 1724b8e80941Smrg return nir_load_system_value(build, nir_intrinsic_load_viewport_z_offset, 1725b8e80941Smrg 0, 32); 1726b8e80941Smrg} 1727b8e80941Smrg 1728b8e80941Smrgstatic inline nir_ssa_def * 1729b8e80941Smrgnir_load_viewport_z_scale(nir_builder *build) 1730b8e80941Smrg{ 1731b8e80941Smrg return nir_load_system_value(build, nir_intrinsic_load_viewport_z_scale, 1732b8e80941Smrg 0, 32); 1733b8e80941Smrg} 1734b8e80941Smrg 1735b8e80941Smrgstatic inline nir_ssa_def * 1736b8e80941Smrgnir_load_work_dim(nir_builder *build) 1737b8e80941Smrg{ 1738b8e80941Smrg return nir_load_system_value(build, nir_intrinsic_load_work_dim, 1739b8e80941Smrg 0, 32); 1740b8e80941Smrg} 1741b8e80941Smrg 1742b8e80941Smrgstatic inline nir_ssa_def * 1743b8e80941Smrgnir_load_work_group_id(nir_builder *build) 1744b8e80941Smrg{ 1745b8e80941Smrg return nir_load_system_value(build, nir_intrinsic_load_work_group_id, 1746b8e80941Smrg 0, 32); 1747b8e80941Smrg} 1748b8e80941Smrg 1749b8e80941Smrg#endif /* _NIR_BUILDER_OPCODES_ */ 1750