aco: fix printing ASM on GFX6-7 if clrxdisasm is not found
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 19 Jun 2020 14:11:07 +0000 (16:11 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 22 Jun 2020 08:38:33 +0000 (10:38 +0200)
Fixes some dEQP-VK.pipeline.executable_properties.* which expect
a valid string to be returned.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5560>

src/amd/compiler/aco_print_asm.cpp

index f2b924bffe02b1d927ee49eb01a85f40957fceeb..2e6519fe57b357e4e81cfdfcf4f509bc6a39f1a9 100644 (file)
@@ -69,7 +69,9 @@ void print_asm_gfx6_gfx7(Program *program, std::vector<uint32_t>& 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);