mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 17:30:12 +01:00
r600/sfn: Do a bit of cleanup with the secondary read port validation
Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20739>
This commit is contained in:
parent
ca5bbff558
commit
adee0e7e53
1 changed files with 17 additions and 8 deletions
|
|
@ -420,8 +420,16 @@ AluInstr::replace_source(PRegister old_src, PVirtualValue new_src)
|
|||
}
|
||||
}
|
||||
|
||||
/* Check the readports */
|
||||
if (m_alu_slots * alu_ops.at(m_opcode).nsrc > 2 || m_parent_group) {
|
||||
/* If we have a parent group, we have to check the readports with the
|
||||
* current constellation of the parent group
|
||||
* REMARK: this is a bit fishy, because the parent group constellation
|
||||
* has the fields for the old sourcess set, so we will reject more
|
||||
* possibilities, but with this is becomes conservative check, and this is
|
||||
* fine.
|
||||
* TODO: handle instructions that have to be greated as a group differently
|
||||
* so we can get rid of this (mostly fp64 instructions that are multi-slot with
|
||||
* more than just one dest value.*/
|
||||
if (m_parent_group) {
|
||||
AluReadportReservation read_port_check =
|
||||
!m_parent_group ? AluReadportReservation() : m_parent_group->readport_reserer();
|
||||
|
||||
|
|
@ -435,7 +443,9 @@ AluInstr::replace_source(PRegister old_src, PVirtualValue new_src)
|
|||
}
|
||||
AluBankSwizzle bs = alu_vec_012;
|
||||
while (bs != alu_vec_unknown) {
|
||||
if (read_port_check.schedule_vec_src(src, nsrc, bs)) {
|
||||
AluReadportReservation rpc = read_port_check;
|
||||
if (rpc.schedule_vec_src(src, nsrc, bs)) {
|
||||
read_port_check = rpc;
|
||||
break;
|
||||
}
|
||||
++bs;
|
||||
|
|
@ -443,8 +453,7 @@ AluInstr::replace_source(PRegister old_src, PVirtualValue new_src)
|
|||
if (bs == alu_vec_unknown)
|
||||
return false;
|
||||
}
|
||||
if (m_parent_group)
|
||||
m_parent_group->set_readport_reserer(read_port_check);
|
||||
m_parent_group->set_readport_reserer(read_port_check);
|
||||
}
|
||||
|
||||
for (unsigned i = 0; i < m_src.size(); ++i) {
|
||||
|
|
@ -577,12 +586,12 @@ AluInstr::pin_sources_to_chan()
|
|||
bool
|
||||
AluInstr::check_readport_validation(PRegister old_src, PVirtualValue new_src) const
|
||||
{
|
||||
bool success = true;
|
||||
AluReadportReservation rpr_sum;
|
||||
|
||||
if (m_src.size() < 3)
|
||||
return true;
|
||||
|
||||
bool success = true;
|
||||
AluReadportReservation rpr_sum;
|
||||
|
||||
unsigned nsrc = alu_ops.at(m_opcode).nsrc;
|
||||
assert(nsrc * m_alu_slots == m_src.size());
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue