r600/sfn: reuse readport for already loaded registers

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36572>
This commit is contained in:
Gert Wollny 2025-07-02 11:54:20 +02:00 committed by Marge Bot
parent 68d5f1c456
commit 316d3a3f95

View file

@ -163,6 +163,13 @@ AluReadportReservation::AluReadportReservation()
bool
AluReadportReservation::reserve_gpr(int sel, int chan, int cycle)
{
for (int c = 0; c < 3; ++c) {
if (m_hw_gpr[c][chan] == sel) {
if (cycle == c)
return true;
}
}
if (m_hw_gpr[cycle][chan] == -1) {
m_hw_gpr[cycle][chan] = sel;
} else if (m_hw_gpr[cycle][chan] != sel) {