radv: include LLVM IR in the VK_AMD_shader_info "disassembly"
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Wed, 7 Nov 2018 11:10:21 +0000 (12:10 +0100)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Fri, 9 Nov 2018 13:54:37 +0000 (14:54 +0100)
Helpful for debugging compiler backend problems: this allows us to
easily retrieve the LLVM IR from RenderDoc.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/amd/vulkan/radv_shader.c

index f98ca6b4eddeb958188a54d7b54f41b4f7800184..456c462a2301e192253b952c815e3c7220d951dd 100644 (file)
@@ -860,6 +860,7 @@ radv_GetShaderInfoAMD(VkDevice _device,
                buf = _mesa_string_buffer_create(NULL, 1024);
 
                _mesa_string_buffer_printf(buf, "%s:\n", radv_get_shader_name(variant, stage));
+               _mesa_string_buffer_printf(buf, "%s\n\n", variant->llvm_ir_string);
                _mesa_string_buffer_printf(buf, "%s\n\n", variant->disasm_string);
                generate_shader_stats(device, variant, stage, buf);