nir: Just return when asked to rewrite uses of an SSA def to itself.
The nir_builder swizzling improvement to not emit extra MOVs resulted in
nir_lower_tex() trying to rewrite an SSA def to itself, triggering the
assert on all texturing in v3d. There's no work to be done in this case,
so just stop asserting.
Fixes: 743700be1f
("nir/builder: Don't emit no-op swizzles")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
@@ -1511,7 +1511,8 @@ void
|
||||
nir_ssa_def_rewrite_uses_after(nir_ssa_def *def, nir_src new_src,
|
||||
nir_instr *after_me)
|
||||
{
|
||||
assert(!new_src.is_ssa || def != new_src.ssa);
|
||||
if (new_src.is_ssa && def == new_src.ssa)
|
||||
return;
|
||||
|
||||
nir_foreach_use_safe(use_src, def) {
|
||||
assert(use_src->parent_instr != def->parent_instr);
|
||||
|
Reference in New Issue
Block a user