Mesa (staging/21.3): aco: do not return an empty string when disassembly is not supported

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat Oct 16 13:03:19 UTC 2021


Module: Mesa
Branch: staging/21.3
Commit: c2a67ded86c54a8c5bb91cae481201cc1b3d373b
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c2a67ded86c54a8c5bb91cae481201cc1b3d373b

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>
(cherry picked from commit aac4e1f8229e7978310ca81312f0ff925e3485b7)

---

 .pick_status.json                  | 2 +-
 src/amd/compiler/aco_interface.cpp | 7 ++++---
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 5e403adfc0f..833f770c72d 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -625,7 +625,7 @@
         "description": "aco: do not return an empty string when disassembly is not supported",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": null
     },
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