From c95d258d1bcde8d29e28aa182050a5da33a74456 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Fri, 19 Jun 2020 16:11:07 +0200 Subject: [PATCH] aco: fix printing ASM on GFX6-7 if clrxdisasm is not found MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes some dEQP-VK.pipeline.executable_properties.* which expect a valid string to be returned. Signed-off-by: Samuel Pitoiset Reviewed-by: Daniel Schürmann Part-of: --- src/amd/compiler/aco_print_asm.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/amd/compiler/aco_print_asm.cpp b/src/amd/compiler/aco_print_asm.cpp index f2b924bffe0..2e6519fe57b 100644 --- a/src/amd/compiler/aco_print_asm.cpp +++ b/src/amd/compiler/aco_print_asm.cpp @@ -69,7 +69,9 @@ void print_asm_gfx6_gfx7(Program *program, std::vector& binary, sprintf(command, "clrxdisasm --gpuType=%s -r %s", gpu_type, path); p = popen(command, "r"); - if (p) { + if (!p || errno == ENOENT) { + out << "clrxdisasm not found\n"; + } else { while (fgets(line, sizeof(line), p)) out << line; pclose(p);