r600/sfn: Add AluGroup method to update readport validation from scratch

Related: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8374

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21684>
This commit is contained in:
Gert Wollny 2023-02-28 16:22:34 +01:00 committed by Marge Bot
parent ed587ae6ac
commit afa545b926
2 changed files with 37 additions and 0 deletions

View file

@ -251,6 +251,41 @@ AluGroup::add_vec_instructions(AluInstr *instr)
return false;
}
void AluGroup::update_readport_reserver()
{
AluReadportReservation readports_evaluator;
for (int i = 0; i < 4; ++i) {
if (!m_slots[i])
continue;
AluReadportReservation re = readports_evaluator;
AluBankSwizzle bs = alu_vec_012;
while (bs != alu_vec_unknown) {
if (re.schedule_vec_instruction(*m_slots[i], bs)) {
readports_evaluator = re;
break;
}
++bs;
}
if (bs == alu_vec_unknown)
unreachable("Bank swizzle should have been checked before");
}
if (s_max_slots == 5 && m_slots[4]) {
AluReadportReservation re = readports_evaluator;
AluBankSwizzle bs = sq_alu_scl_201;
while (bs != sq_alu_scl_unknown) {
if (re.schedule_vec_instruction(*m_slots[4], bs)) {
readports_evaluator = re;
break;
}
++bs;
}
if (bs == sq_alu_scl_unknown)
unreachable("Bank swizzle should have been checked before");
}
}
bool
AluGroup::try_readport(AluInstr *instr, AluBankSwizzle cycle)
{

View file

@ -86,6 +86,8 @@ public:
m_readports_evaluator = rr;
};
void update_readport_reserver();
static bool has_t() { return s_max_slots == 5; }
bool addr_for_src() const { return m_addr_for_src; }