mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +02:00
nak: Bias RA to find clear spaces for vector dests
Try to find a space where the entire vec will fit when allocating one of its components. Totals: CodeSize: 5750619392 -> 5654953920 (-1.66%); split: -1.75%, +0.09% Static cycle count: 1497053946 -> 1493196467 (-0.26%); split: -0.43%, +0.18% Totals from 163626 (83.27% of 196502) affected shaders: CodeSize: 5498993328 -> 5403327856 (-1.74%); split: -1.83%, +0.09% Static cycle count: 1423951803 -> 1420094324 (-0.27%); split: -0.46%, +0.19% Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35033>
This commit is contained in:
parent
a24a001209
commit
61d9911bba
1 changed files with 5 additions and 3 deletions
|
|
@ -459,10 +459,12 @@ impl RegAllocator {
|
|||
}
|
||||
|
||||
// We weren't able to pair it with an already allocated
|
||||
// register but maybe we can at least find an aligned one.
|
||||
if let Some(reg) =
|
||||
self.try_find_unused_reg_range(0, 1, align, 0)
|
||||
// register but maybe we can at least find a place the vec
|
||||
// would fit
|
||||
if let Some(base_reg) =
|
||||
self.try_find_unused_reg_range(0, vec.comps(), align, 0)
|
||||
{
|
||||
let reg = base_reg + u32::from(comp);
|
||||
self.assign_reg(ssa, reg);
|
||||
return reg;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue