It's basically the same code in all three.
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24658>
}
static bool
-check_64_bit_op_dest(nir_dest *dest, void *state)
+check_64_bit_op_def(nir_def *def, void *state)
{
- if (nir_dest_bit_size(*dest) == 64) {
+ if (def->bit_size == 64) {
*(bool *)state = true;
return false;
}
bool is_64bit_op = false;
nir_foreach_src(&alu->instr, check_64_bit_op_src, &is_64bit_op);
if (!is_64bit_op)
- nir_foreach_dest(&alu->instr, check_64_bit_op_dest, &is_64bit_op);
+ nir_foreach_def(&alu->instr, check_64_bit_op_def, &is_64bit_op);
if (is_64bit_op) {
switch (alu->op) {
static bool
-dest_is_64bit(nir_dest *dest, void *state)
+def_is_64bit(nir_def *def, void *state)
{
bool *lower = (bool *)state;
- if (dest && (nir_dest_bit_size(*dest) == 64)) {
+ if (def && (def->bit_size == 64)) {
*lower = true;
return false;
}
* doesn't have const variants, so do the ugly const_cast here. */
nir_instr *instr = (nir_instr *)const_instr;
- nir_foreach_dest(instr, dest_is_64bit, &lower);
+ nir_foreach_def(instr, def_is_64bit, &lower);
if (lower)
return true;
nir_foreach_src(instr, src_is_64bit, &lower);
}
static bool
-dest_is_64bit(nir_dest *dest, void *state)
+def_is_64bit(nir_def *def, void *state)
{
bool *lower = (bool *)state;
- if (dest && (nir_dest_bit_size(*dest) == 64)) {
+ if (def && (def->bit_size == 64)) {
*lower = true;
return false;
}
* doesn't have const variants, so do the ugly const_cast here. */
nir_instr *instr = const_cast<nir_instr *>(const_instr);
- nir_foreach_dest(instr, dest_is_64bit, &lower);
+ nir_foreach_def(instr, def_is_64bit, &lower);
if (lower)
return true;
nir_foreach_src(instr, src_is_64bit, &lower);