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

Author: Rhys Perry <[email protected]>
Date:   Tue Sep 24 15:25:07 2019 +0100

radv/aco: return a correct name and description for the backend IR

Signed-off-by: Rhys Perry <[email protected]>
Reviewed-by: Daniel Schürmann <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>

---

 src/amd/vulkan/radv_pipeline.c | 9 +++++++--
 src/amd/vulkan/radv_shader.c   | 1 +
 src/amd/vulkan/radv_shader.h   | 1 +
 3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
index 70ffc2412b3..21d37313cb2 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -5244,8 +5244,13 @@ VkResult 
radv_GetPipelineExecutableInternalRepresentationsKHR(
        /* LLVM IR */
        if (p < end) {
                p->isText = true;
-               desc_copy(p->name, "LLVM IR");
-               desc_copy(p->description, "The LLVM IR after some 
optimizations");
+               if (shader->aco_used) {
+                       desc_copy(p->name, "ACO IR");
+                       desc_copy(p->description, "The ACO IR after some 
optimizations");
+               } else {
+                       desc_copy(p->name, "LLVM IR");
+                       desc_copy(p->description, "The LLVM IR after some 
optimizations");
+               }
                if (radv_copy_representation(p->pData, &p->dataSize, 
shader->llvm_ir_string) != VK_SUCCESS)
                        result = VK_INCOMPLETE;
        }
diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c
index b9e83c911af..10cce9c2768 100644
--- a/src/amd/vulkan/radv_shader.c
+++ b/src/amd/vulkan/radv_shader.c
@@ -1160,6 +1160,7 @@ shader_variant_compile(struct radv_device *device,
                free(binary);
                return NULL;
        }
+       variant->aco_used = use_aco;
 
        if (options->dump_shader) {
                fprintf(stderr, "disasm:\n%s\n", variant->disasm_string);
diff --git a/src/amd/vulkan/radv_shader.h b/src/amd/vulkan/radv_shader.h
index 459ff863a91..37ff74b6f0b 100644
--- a/src/amd/vulkan/radv_shader.h
+++ b/src/amd/vulkan/radv_shader.h
@@ -360,6 +360,7 @@ struct radv_shader_variant {
        struct radv_shader_info info;
 
        /* debug only */
+       bool aco_used;
        uint32_t *spirv;
        uint32_t spirv_size;
        char *nir_string;

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to