Mesa (main): aco: do not return an empty string when disassembly is not supported

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Oct 15 08:35:47 UTC 2021


Module: Mesa
Branch: main
Commit: aac4e1f8229e7978310ca81312f0ff925e3485b7
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=aac4e1f8229e7978310ca81312f0ff925e3485b7

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Wed Oct 13 13:05:54 2021 +0200

aco: do not return an empty string when disassembly is not supported

Fixes dEQP-VK.pipeline.executable_properties.* on GFX6-7 when
clrxdisasm isn't found. Other generations are also affected if RADV
is built without LLVM.

Cc: 21.3 mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Tony Wasserka <tony.wasserka at gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13333>

---

 src/amd/compiler/aco_interface.cpp | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/amd/compiler/aco_interface.cpp b/src/amd/compiler/aco_interface.cpp
index 82db67c45cc..d076f9f5031 100644
--- a/src/amd/compiler/aco_interface.cpp
+++ b/src/amd/compiler/aco_interface.cpp
@@ -213,11 +213,12 @@ aco_compile_shader(unsigned shader_count, struct nir_shader* const* shaders,
          size += disasm_size;
          free(data);
       } else {
-         fprintf(stderr, "Shader disassembly is not supported in the current configuration"
+         disasm = "Shader disassembly is not supported in the current configuration"
 #ifndef LLVM_AVAILABLE
-                         " (LLVM not available)"
+                  " (LLVM not available)"
 #endif
-                         ".\n");
+                  ".\n";
+         size += disasm.length();
       }
    }
 



More information about the mesa-commit mailing list