aco: make validate() usable in tests

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6013>
This commit is contained in:
Rhys Perry
2020-01-30 11:49:20 +00:00
committed by Marge Bot
parent e75946cfef
commit bf4b377b9b
3 changed files with 16 additions and 10 deletions
+2 -5
View File
@@ -46,11 +46,8 @@ void perfwarn(bool cond, const char *msg, Instruction *instr)
}
#endif
void validate(Program* program, FILE * output)
bool validate(Program* program, FILE *output)
{
if (!(debug_flags & DEBUG_VALIDATE))
return;
bool is_valid = true;
auto check = [&output, &is_valid](bool check, const char * msg, aco::Instruction * instr) -> void {
if (!check) {
@@ -439,7 +436,7 @@ void validate(Program* program, FILE * output)
}
}
assert(is_valid);
return is_valid;
}
/* RA validation */