aco: align scratch size after isel

Make it safe for VGPR spilling if it's not a multiple of 4.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36406>
This commit is contained in:
Rhys Perry 2025-03-04 17:44:25 +00:00 committed by Marge Bot
parent ab10604924
commit 44ab4ad732

View file

@ -760,7 +760,7 @@ setup_isel_context(Program* program, unsigned shader_count, struct nir_shader* c
for (unsigned i = 0; i < shader_count; i++)
scratch_size = std::max(scratch_size, shaders[i]->scratch_size);
ctx.program->config->scratch_bytes_per_wave = scratch_size * ctx.program->wave_size;
ctx.program->config->scratch_bytes_per_wave = align(scratch_size, 4) * ctx.program->wave_size;
unsigned nir_num_blocks = 0;
for (unsigned i = 0; i < shader_count; i++)