}
NIR_PASS(progress, s, nir_opt_undef);
+ NIR_PASS(progress, s, nir_lower_undef_to_zero);
} while (progress);
nir_move_options sink_opts =
}
static void
-ntq_emit_ssa_undef(struct v3d_compile *c, nir_ssa_undef_instr *instr)
-{
- struct qreg *qregs = ntq_init_ssa_def(c, &instr->def);
-
- /* VIR needs there to be *some* value, so pick 0 (same as for
- * ntq_setup_registers().
- */
- for (int i = 0; i < instr->def.num_components; i++)
- qregs[i] = vir_uniform_ui(c, 0);
-}
-
-static void
ntq_emit_image_size(struct v3d_compile *c, nir_intrinsic_instr *instr)
{
unsigned image_index = nir_src_as_uint(instr->src[0]);
break;
case nir_instr_type_ssa_undef:
- ntq_emit_ssa_undef(c, nir_instr_as_ssa_undef(instr));
+ unreachable("Should've been lowered by nir_lower_undef_to_zero");
break;
case nir_instr_type_tex: