mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-16 15:28:23 +02:00
aco: move update(fixed_reg_demand) into update_vgpr_sgpr_demand
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38679>
This commit is contained in:
parent
a932bc40d3
commit
bf56f1efd3
2 changed files with 3 additions and 4 deletions
|
|
@ -680,7 +680,7 @@ max_suitable_waves(Program* program, uint16_t waves)
|
|||
}
|
||||
|
||||
void
|
||||
update_vgpr_sgpr_demand(Program* program, const RegisterDemand new_demand)
|
||||
update_vgpr_sgpr_demand(Program* program, RegisterDemand new_demand)
|
||||
{
|
||||
assert(program->min_waves >= 1);
|
||||
RegisterDemand limit = get_addr_regs_from_waves(program, program->min_waves);
|
||||
|
|
@ -690,6 +690,8 @@ update_vgpr_sgpr_demand(Program* program, const RegisterDemand new_demand)
|
|||
program->num_waves = 0;
|
||||
program->max_reg_demand = new_demand;
|
||||
} else {
|
||||
new_demand.update(program->fixed_reg_demand);
|
||||
|
||||
program->num_waves = program->dev.physical_sgprs / get_sgpr_alloc(program, new_demand.sgpr);
|
||||
uint16_t vgpr_demand =
|
||||
get_vgpr_alloc(program, new_demand.vgpr) + program->config->num_shared_vgprs / 2;
|
||||
|
|
@ -725,8 +727,6 @@ live_var_analysis(Program* program)
|
|||
process_live_temps_per_block(ctx, &program->blocks[ctx.worklist--]);
|
||||
}
|
||||
|
||||
program->max_reg_demand.update(program->fixed_reg_demand);
|
||||
|
||||
/* calculate the program's register demand and number of waves */
|
||||
if (program->progress < CompilationProgress::after_ra)
|
||||
update_vgpr_sgpr_demand(program, program->max_reg_demand);
|
||||
|
|
|
|||
|
|
@ -1354,7 +1354,6 @@ schedule_program(Program* program)
|
|||
for (Block& block : program->blocks) {
|
||||
new_demand.update(block.register_demand);
|
||||
}
|
||||
new_demand.update(program->fixed_reg_demand);
|
||||
assert(!new_demand.exceeds(ctx.mv.max_registers) ||
|
||||
!new_demand.exceeds(program->max_reg_demand));
|
||||
update_vgpr_sgpr_demand(program, new_demand);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue