mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 04:58:05 +02:00
i965: Make split_virtual_grfs() call compact_virtual_grfs().
Post-splitting, VGRFs have a maximum size (MAX_VGRF_SIZE). This is
required by the register allocator, as we have to create classes for
each size of VGRF.
We can (and do) allocate virtual registers larger than MAX_VGRF_SIZE,
but we must ensure that they are splittable. split_virtual_grfs()
asserts that the post-splitting register size is in range.
Unfortunately, these trip for completely dead registers which are too
large - we only set split points for live registers. So dead ones are
never split, and if they happened to be too large, they'd trip asserts.
To fix this, call compact_virtual_grfs() to eliminate dead registers
before splitting.
v2: Add a comment written by Iago.
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
(cherry picked from commit 27715c73ff)
This commit is contained in:
parent
188a866fd0
commit
de826a10a7
1 changed files with 6 additions and 0 deletions
|
|
@ -1687,6 +1687,12 @@ fs_visitor::assign_gs_urb_setup()
|
|||
void
|
||||
fs_visitor::split_virtual_grfs()
|
||||
{
|
||||
/* Compact the register file so we eliminate dead vgrfs. This
|
||||
* only defines split points for live registers, so if we have
|
||||
* too large dead registers they will hit assertions later.
|
||||
*/
|
||||
compact_virtual_grfs();
|
||||
|
||||
int num_vars = this->alloc.count;
|
||||
|
||||
/* Count the total number of registers */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue