diff options
-rw-r--r-- | src/gallium/drivers/radeonsi/si_debug.c | 1 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader.c | 12 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader.h | 1 |
3 files changed, 9 insertions, 5 deletions
diff --git a/src/gallium/drivers/radeonsi/si_debug.c b/src/gallium/drivers/radeonsi/si_debug.c index 35d961d34f5..d9d4890b90e 100644 --- a/src/gallium/drivers/radeonsi/si_debug.c +++ b/src/gallium/drivers/radeonsi/si_debug.c @@ -40,7 +40,6 @@ static void si_dump_shader(struct si_screen *sscreen, if (!state->cso || !state->current) return; - si_dump_shader_key(state->cso->type, &state->current->key, f); si_shader_dump(sscreen, state->current, NULL, state->cso->info.processor, f); } diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index adf706c877e..cb270e087f3 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -151,6 +151,9 @@ static void si_llvm_emit_barrier(const struct lp_build_tgsi_action *action, struct lp_build_tgsi_context *bld_base, struct lp_build_emit_data *emit_data); +static void si_dump_shader_key(unsigned shader, union si_shader_key *key, + FILE *f); + /* Ideally pass the sample mask input to the PS epilog as v13, which * is its usual location, so that the shader doesn't have to add v_mov. */ @@ -6244,6 +6247,10 @@ void si_shader_dump(struct si_screen *sscreen, struct si_shader *shader, struct pipe_debug_callback *debug, unsigned processor, FILE *file) { + if (file != stderr || + r600_can_dump_shader(&sscreen->b, processor)) + si_dump_shader_key(processor, &shader->key, file); + if (file != stderr && shader->binary.llvm_ir_string) { fprintf(file, "\n%s - main shader part - LLVM IR:\n\n", si_get_shader_name(shader, processor)); @@ -6440,7 +6447,8 @@ static int si_generate_gs_copy_shader(struct si_screen *sscreen, return r; } -void si_dump_shader_key(unsigned shader, union si_shader_key *key, FILE *f) +static void si_dump_shader_key(unsigned shader, union si_shader_key *key, + FILE *f) { int i; @@ -6613,8 +6621,6 @@ int si_compile_tgsi_shader(struct si_screen *sscreen, * conversion fails. */ if (r600_can_dump_shader(&sscreen->b, sel->info.processor) && !(sscreen->b.debug_flags & DBG_NO_TGSI)) { - if (is_monolithic) - si_dump_shader_key(sel->type, &shader->key, stderr); tgsi_dump(sel->tokens, 0); si_dump_streamout(&sel->so); } diff --git a/src/gallium/drivers/radeonsi/si_shader.h b/src/gallium/drivers/radeonsi/si_shader.h index 29069316548..6073296ac9f 100644 --- a/src/gallium/drivers/radeonsi/si_shader.h +++ b/src/gallium/drivers/radeonsi/si_shader.h @@ -488,7 +488,6 @@ int si_compile_tgsi_shader(struct si_screen *sscreen, int si_shader_create(struct si_screen *sscreen, LLVMTargetMachineRef tm, struct si_shader *shader, struct pipe_debug_callback *debug); -void si_dump_shader_key(unsigned shader, union si_shader_key *key, FILE *f); int si_compile_llvm(struct si_screen *sscreen, struct radeon_shader_binary *binary, struct si_shader_config *conf, |