r600/sfn: Add method to force-override the dest of an AluInstr

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37321>
This commit is contained in:
Gert Wollny 2025-09-11 23:47:20 +02:00 committed by Marge Bot
parent 6f8841b338
commit 1f58a36abb
2 changed files with 10 additions and 0 deletions

View file

@ -537,6 +537,14 @@ bool AluInstr::do_replace_source(PRegister old_src, PVirtualValue new_src)
return process;
}
void
AluInstr::override_or_clear_dest(PRegister dummy_reg)
{
m_alu_flags.reset(alu_write);
m_fallback_chan = m_dest->chan();
m_dest = m_src.size() < 3 ? nullptr : dummy_reg;
}
bool AluInstr::replace_src(int i, PVirtualValue new_src, uint32_t to_set,
SourceMod to_clear)
{

View file

@ -209,6 +209,8 @@ public:
auto output_modifier() const { return m_output_modifier; }
auto has_output_modifier() const { return m_output_modifier != omod_none; }
void override_or_clear_dest(PRegister dummy_reg);
private:
friend class AluGroup;