From 0d065a2421d54ab3e95d3c2cd9fa4f3276f9fa1a Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Tue, 28 Oct 2025 16:24:30 +0100 Subject: [PATCH] r600/sfn: Track whether a ALU group has a exec flag update Fixes: 359bfc3138e ("r600/sfn: make sure that kill and update pred are not in the same group") Signed-off-by: Gert Wollny Part-of: --- src/gallium/drivers/r600/sfn/sfn_instr_alugroup.cpp | 5 +++++ src/gallium/drivers/r600/sfn/sfn_instr_alugroup.h | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/r600/sfn/sfn_instr_alugroup.cpp b/src/gallium/drivers/r600/sfn/sfn_instr_alugroup.cpp index d826b015fab..b0ab2a94f19 100644 --- a/src/gallium/drivers/r600/sfn/sfn_instr_alugroup.cpp +++ b/src/gallium/drivers/r600/sfn/sfn_instr_alugroup.cpp @@ -26,6 +26,8 @@ AluGroup::apply_add_instr(AluInstr *instr) instr->set_parent_group(this); instr->pin_dest_to_chan(); m_has_kill_op |= instr->is_kill(); + m_has_pred_update |= instr->has_alu_flag(alu_update_exec); + assert(!(m_has_kill_op && m_has_pred_update)); } bool @@ -130,6 +132,8 @@ AluGroup::add_trans_instructions(AluInstr *instr) * make sure the corresponding vector channel is used */ assert(instr->has_alu_flag(alu_is_trans) || m_slots[instr->dest_chan()]); m_has_kill_op |= instr->is_kill(); + m_has_pred_update |= instr->has_alu_flag(alu_update_exec); + m_slot_assignemnt_order[m_next_slot_assignemnt++] = 4; return true; } @@ -310,6 +314,7 @@ AluGroup::try_readport(AluInstr *instr, AluBankSwizzle cycle) dest->set_pin(pin_chgr); } m_has_kill_op |= instr->is_kill(); + m_has_pred_update |= instr->has_alu_flag(alu_update_exec); m_slot_assignemnt_order[m_next_slot_assignemnt++] = preferred_chan; return true; } diff --git a/src/gallium/drivers/r600/sfn/sfn_instr_alugroup.h b/src/gallium/drivers/r600/sfn/sfn_instr_alugroup.h index f85369fd980..f60bb7e5f93 100644 --- a/src/gallium/drivers/r600/sfn/sfn_instr_alugroup.h +++ b/src/gallium/drivers/r600/sfn/sfn_instr_alugroup.h @@ -83,6 +83,7 @@ public: bool addr_for_src() const { return m_addr_for_src; } bool has_kill_op() const { return m_has_kill_op; } + bool has_update_exec() const { return m_has_pred_update; } void set_origin(AluInstr *o) { m_origin = o;} @@ -101,7 +102,7 @@ private: bool update_indirect_access(AluInstr *instr); bool try_readport(AluInstr *instr, AluBankSwizzle cycle); - void apply_add_instr(AluInstr * instr); + void apply_add_instr(AluInstr *instr); Slots m_slots; uint8_t m_next_slot_assignemnt{0}; @@ -122,6 +123,7 @@ private: bool m_addr_is_index{false}; bool m_addr_for_src{false}; bool m_has_kill_op{false}; + bool m_has_pred_update{false}; AluInstr *m_origin{nullptr}; uint8_t m_free_slots;