r600/sfn: Can't use an indirect array access as source to AR load

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21347>
This commit is contained in:
Gert Wollny
2023-03-07 14:30:06 +01:00
committed by Marge Bot
parent ae55668f77
commit 9f39531743

View File

@@ -509,6 +509,13 @@ bool AluInstr::can_replace_source(PRegister old_src, PVirtualValue new_src)
addr_reg->has_flag(Register::addr_or_idx))
return false;
}
if (m_dest->has_flag(Register::addr_or_idx)) {
if (new_src->pin() == pin_array) {
auto s = static_cast<const LocalArrayValue *>(new_src)->addr();
if (!s->as_inline_const() || !s->as_literal())
return false;
}
}
}
return true;
}