Mesa (main): radeonsi: print the shader stage for shader-db dumps
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Nov 26 13:07:22 UTC 2021
Module: Mesa
Branch: main
Commit: 1df7c0ce7e0e48d4466c505a748ede3a208834c9
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1df7c0ce7e0e48d4466c505a748ede3a208834c9
Author: Marek Olšák <marek.olsak at amd.com>
Date: Wed Nov 24 13:56:32 2021 -0500
radeonsi: print the shader stage for shader-db dumps
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13869>
---
src/gallium/drivers/radeonsi/si_shader.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index 29827bce593..728386b9c5b 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -1023,6 +1023,7 @@ void si_shader_dump_stats_for_shader_db(struct si_screen *screen, struct si_shad
struct pipe_debug_callback *debug)
{
const struct ac_shader_config *conf = &shader->config;
+ static const char *stages[] = {"VS", "TCS", "TES", "GS", "PS", "CS"};
if (screen->options.debug_disassembly)
si_shader_dump_disassembly(screen, &shader->binary, shader->selector->info.stage,
@@ -1031,10 +1032,11 @@ void si_shader_dump_stats_for_shader_db(struct si_screen *screen, struct si_shad
pipe_debug_message(debug, SHADER_INFO,
"Shader Stats: SGPRS: %d VGPRS: %d Code Size: %d "
"LDS: %d Scratch: %d Max Waves: %d Spilled SGPRs: %d "
- "Spilled VGPRs: %d PrivMem VGPRs: %d",
+ "Spilled VGPRs: %d PrivMem VGPRs: %d (%s)",
conf->num_sgprs, conf->num_vgprs, si_get_shader_binary_size(screen, shader),
conf->lds_size, conf->scratch_bytes_per_wave, shader->info.max_simd_waves,
- conf->spilled_sgprs, conf->spilled_vgprs, shader->info.private_mem_vgprs);
+ conf->spilled_sgprs, conf->spilled_vgprs, shader->info.private_mem_vgprs,
+ stages[shader->selector->info.stage]);
}
static void si_shader_dump_stats(struct si_screen *sscreen, struct si_shader *shader, FILE *file,
More information about the mesa-commit
mailing list