aco: add and use Program::progress
This is used when printing the program and to avoid updating register demand during post-RA liveness analysis. 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/10315>
This commit is contained in:
@@ -82,10 +82,8 @@ void aco_compile_shader(unsigned shader_count,
|
||||
aco::select_trap_handler_shader(program.get(), shaders[0], &config, args);
|
||||
else
|
||||
aco::select_program(program.get(), shader_count, shaders, &config, args);
|
||||
if (args->options->dump_preoptir) {
|
||||
std::cerr << "After Instruction Selection:\n";
|
||||
if (args->options->dump_preoptir)
|
||||
aco_print_program(program.get(), stderr);
|
||||
}
|
||||
|
||||
aco::live live_vars;
|
||||
if (!args->is_trap_handler_shader) {
|
||||
@@ -142,15 +140,12 @@ void aco_compile_shader(unsigned shader_count,
|
||||
|
||||
/* Register Allocation */
|
||||
aco::register_allocation(program.get(), live_vars.live_out);
|
||||
if (args->options->dump_shader) {
|
||||
std::cerr << "After RA:\n";
|
||||
aco_print_program(program.get(), stderr);
|
||||
}
|
||||
|
||||
if (aco::validate_ra(program.get())) {
|
||||
std::cerr << "Program after RA validation failure:\n";
|
||||
aco_print_program(program.get(), stderr);
|
||||
abort();
|
||||
} else if (args->options->dump_shader) {
|
||||
aco_print_program(program.get(), stderr);
|
||||
}
|
||||
|
||||
validate(program.get());
|
||||
|
||||
Reference in New Issue
Block a user