radeonsi/gfx9: dump previous stage LLVM IR for merged shaders
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Fri, 14 Jul 2017 11:32:20 +0000 (13:32 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Thu, 27 Jul 2017 19:16:45 +0000 (21:16 +0200)
Reviewed: Marek Olšák <marek.olsak@amd.com>

src/gallium/drivers/radeonsi/si_shader.c

index cd0b4a2d82f66f5e1e8f534cb163f9f2ff9e0b1f..98f2be76ddd2fa013e01740652dc519110575b56 100644 (file)
@@ -5038,6 +5038,13 @@ void si_shader_dump(struct si_screen *sscreen, const struct si_shader *shader,
                si_dump_shader_key(processor, shader, file);
 
        if (!check_debug_option && shader->binary.llvm_ir_string) {
+               if (shader->previous_stage &&
+                   shader->previous_stage->binary.llvm_ir_string) {
+                       fprintf(file, "\n%s - previous stage - LLVM IR:\n\n",
+                               si_get_shader_name(shader, processor));
+                       fprintf(file, "%s\n", shader->previous_stage->binary.llvm_ir_string);
+               }
+
                fprintf(file, "\n%s - main shader part - LLVM IR:\n\n",
                        si_get_shader_name(shader, processor));
                fprintf(file, "%s\n", shader->binary.llvm_ir_string);