mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 21:50:11 +01:00
aco/ra: Fix off-by-one-error in print_regs
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Fixes:3675aefa84("aco/ra: Fix build with print_regs enabled") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10517> (cherry picked from commit5bfef2de66)
This commit is contained in:
parent
23432781b0
commit
b03dbc2d89
2 changed files with 3 additions and 4 deletions
|
|
@ -922,7 +922,7 @@
|
|||
"description": "aco/ra: Fix off-by-one-error in print_regs",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "3675aefa84e363d820a3e596b9f2795a0d51c39f"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -355,8 +355,7 @@ private:
|
|||
/* helper function for debugging */
|
||||
UNUSED void print_regs(ra_ctx& ctx, bool vgprs, RegisterFile& reg_file)
|
||||
{
|
||||
unsigned max = vgprs ? ctx.program->max_reg_demand.vgpr : ctx.program->max_reg_demand.sgpr;
|
||||
PhysRegInterval regs { vgprs ? PhysReg{256} : PhysReg{0}, max };
|
||||
PhysRegInterval regs = get_reg_bounds(ctx.program, vgprs ? RegType::vgpr : RegType::sgpr);
|
||||
char reg_char = vgprs ? 'v' : 's';
|
||||
|
||||
/* print markers */
|
||||
|
|
@ -387,7 +386,7 @@ UNUSED void print_regs(ra_ctx& ctx, bool vgprs, RegisterFile& reg_file)
|
|||
}
|
||||
printf("\n");
|
||||
|
||||
printf("%u/%u used, %u/%u free\n", max - free_regs, max, free_regs, max);
|
||||
printf("%u/%u used, %u/%u free\n", regs.size - free_regs, regs.size, free_regs, regs.size);
|
||||
|
||||
/* print assignments */
|
||||
prev = 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue