aco: don't abort() if disassembly fails

We used that to catch assembly errors in the past,
but now, there are too many hardware features we
use in ACO that are not supported by the LLVM disassembler,
that it is not really suited anymore as a debugging tool.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8921>
This commit is contained in:
Daniel Schürmann 2021-02-08 17:30:26 +01:00 committed by Marge Bot
parent 171fbe3ae1
commit 112f389261

View file

@ -184,16 +184,9 @@ void aco_compile_shader(unsigned shader_count,
struct u_memstream mem;
if (u_memstream_open(&mem, &data, &disasm_size)) {
FILE *const memf = u_memstream_get(&mem);
bool fail = aco::print_asm(program.get(), code, exec_size / 4u, memf);
aco::print_asm(program.get(), code, exec_size / 4u, memf);
fputc(0, memf);
u_memstream_close(&mem);
if (fail) {
fprintf(stderr, "Failed to disassemble program:\n");
aco_print_program(program.get(), stderr);
fputs(data, stderr);
abort();
}
}
disasm = std::string(data, data + disasm_size);