nir: Add and set info::uses_64bit
[mesa.git] / src / compiler / nir / nir_gather_info.c
index 7eaa4c27c1f224b8d171de20048bcae0f3a8d689..18a74a135d927634f72796ce422652af7a8f4db2 100644 (file)
@@ -307,6 +307,11 @@ gather_alu_info(nir_alu_instr *instr, nir_shader *shader)
       shader->info.uses_fddx_fddy = true;
       break;
    default:
+      shader->info.uses_64bit |= instr->dest.dest.ssa.bit_size == 64;
+      unsigned num_srcs = nir_op_infos[instr->op].num_inputs;
+      for (unsigned i = 0; i < num_srcs; i++) {
+         shader->info.uses_64bit |= nir_src_bit_size(instr->src[i].src) == 64;
+      }
       break;
    }
 }