radv: fix dumping disassembly with RADV_DEBUG=shaders
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 23 Jul 2019 07:55:24 +0000 (09:55 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 23 Jul 2019 08:22:29 +0000 (10:22 +0200)
Fixes: a20a9d0c5e7 ("radv: dont store disasm string unless keep_shader_info flag set")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_shader.c

index 3adaf52e1523bd933cc6b5c005c3ca8958408adb..736388c555cb871f30b099cd990404375c6a2cd4 100644 (file)
@@ -1013,7 +1013,8 @@ radv_shader_variant_create(struct radv_device *device,
                        return NULL;
                }
 
-               if (device->keep_shader_info) {
+               if (device->keep_shader_info ||
+                   (device->instance->debug_flags & RADV_DEBUG_DUMP_SHADERS)) {
                        const char *disasm_data;
                        size_t disasm_size;
                        if (!ac_rtld_get_section_by_name(&rtld_binary, ".AMDGPU.disasm", &disasm_data, &disasm_size)) {