aco: rework the way various compilation/validation errors are reported
[mesa.git] / src / amd / compiler / aco_interface.cpp
index 6d54cc895629adabf93c57c48cf1027f2653fc12..4dfba2618ccb2d3c52a034426dc8b6b9298f4a33 100644 (file)
@@ -25,8 +25,6 @@
 #include "aco_ir.h"
 #include "vulkan/radv_shader.h"
 #include "vulkan/radv_shader_args.h"
-#include "c11/threads.h"
-#include "util/debug.h"
 
 #include <iostream>
 #include <sstream>
@@ -47,10 +45,10 @@ static radv_compiler_statistic_info statistic_infos[] = {
 
 static void validate(aco::Program *program)
 {
-   if (!(aco::debug_flags & aco::DEBUG_VALIDATE))
+   if (!(aco::debug_flags & aco::DEBUG_VALIDATE_IR))
       return;
 
-   bool is_valid = aco::validate(program, stderr);
+   bool is_valid = aco::validate_ir(program);
    assert(is_valid);
 }
 
@@ -123,7 +121,7 @@ void aco_compile_shader(unsigned shader_count,
       aco_print_program(program.get(), stderr);
    }
 
-   if (aco::validate_ra(program.get(), args->options, stderr)) {
+   if (aco::validate_ra(program.get(), args->options)) {
       std::cerr << "Program after RA validation failure:\n";
       aco_print_program(program.get(), stderr);
       abort();