mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 19:20:08 +01:00
aco: stop get_reg_simple after reaching max_used_gpr
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4573>
This commit is contained in:
parent
2796cb4c24
commit
5a3c1f4f0b
1 changed files with 7 additions and 1 deletions
|
|
@ -408,10 +408,16 @@ std::pair<PhysReg, bool> get_reg_simple(ra_ctx& ctx,
|
|||
unsigned last_pos = 0xFFFF;
|
||||
|
||||
for (unsigned current_reg = lb; current_reg < ub; current_reg++) {
|
||||
|
||||
if (reg_file[current_reg] == 0 && !ctx.war_hint[current_reg]) {
|
||||
if (last_pos == 0xFFFF)
|
||||
last_pos = current_reg;
|
||||
continue;
|
||||
|
||||
/* stop searching after max_used_gpr */
|
||||
if (current_reg == ctx.max_used_sgpr + 1 || current_reg == 256 + ctx.max_used_vgpr + 1)
|
||||
break;
|
||||
else
|
||||
continue;
|
||||
}
|
||||
|
||||
if (last_pos == 0xFFFF)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue