aco/scheduler: always respect min_waves on GFX10+

It could theoretically happen that for large workgroups,
the scheduler used more registers than allowed.

No fossil changes.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33644>
This commit is contained in:
Daniel Schürmann
2024-10-09 10:37:10 +02:00
committed by Marge Bot
parent 9befbf54a6
commit 676b39d31f
+6 -2
View File
@@ -1264,8 +1264,12 @@ schedule_program(Program* program)
ctx.num_waves = std::max<uint16_t>(ctx.num_waves / wave_fac, 1);
assert(ctx.num_waves > 0);
ctx.mv.max_registers = {int16_t(get_addr_vgpr_from_waves(program, ctx.num_waves * wave_fac) - 2),
int16_t(get_addr_sgpr_from_waves(program, ctx.num_waves * wave_fac))};
ctx.mv.max_registers = {
int16_t(get_addr_vgpr_from_waves(
program, std::max<uint16_t>(ctx.num_waves * wave_fac, program->min_waves)) -
2),
int16_t(get_addr_sgpr_from_waves(
program, std::max<uint16_t>(ctx.num_waves * wave_fac, program->min_waves)))};
/* NGG culling shaders are very sensitive to position export scheduling.
* Schedule less aggressively when early primitive export is used, and