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:
@@ -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++)
|
||||
|
||||
Reference in New Issue
Block a user