intel/xe2+: Round up size to reg_unit() in fs_reg_alloc::alloc_spill_reg().

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25020>
This commit is contained in:
Francisco Jerez 2023-01-11 00:20:36 -08:00 committed by Jordan Justen
parent fe3d90aedf
commit cef4d53daf

View file

@ -1123,7 +1123,7 @@ fs_reg_alloc::alloc_scratch_header()
fs_reg
fs_reg_alloc::alloc_spill_reg(unsigned size, int ip)
{
int vgrf = fs->alloc.allocate(size);
int vgrf = fs->alloc.allocate(ALIGN(size, reg_unit(devinfo)));
int class_idx = DIV_ROUND_UP(size, reg_unit(devinfo)) - 1;
int n = ra_add_node(g, compiler->fs_reg_sets[rsi].classes[class_idx]);
assert(n == first_vgrf_node + vgrf);