r600/sfn: Add function to check whether a group loads a index register

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-02-10 16:36:24 +01:00 committed by Marge Bot
parent d21054b4bc
commit 8e1cf2d439
2 changed files with 11 additions and 0 deletions

View file

@ -391,6 +391,15 @@ AluGroup::update_indirect_access(AluInstr *instr)
return true;
}
bool AluGroup::index_mode_load()
{
if (!m_slots[0] || !m_slots[0]->dest())
return false;
Register *dst = m_slots[0]->dest();
return dst->has_flag(Register::addr_or_idx) && dst->sel() > 0;
}
void
AluGroup::accept(ConstInstrVisitor& visitor) const
{

View file

@ -79,6 +79,8 @@ public:
return m_slots[0] ? m_slots[0]->has_alu_flag(alu_lds_group_start) : false;
}
bool index_mode_load();
bool has_lds_group_end() const;
const auto& readport_reserer() const { return m_readports_evaluator; }