diff options
author | Nicolai Hähnle <nicolai.haehnle@amd.com> | 2017-05-08 13:01:37 +0200 |
---|---|---|
committer | Nicolai Hähnle <nicolai.haehnle@amd.com> | 2017-05-10 08:58:48 +0200 |
commit | 571597bf470e8b108395ac6a2a8d33108a40910f (patch) | |
tree | 49806e686372e250304c6bf39b9a1bbf018cab19 | |
parent | fbb288663463a3f10d517d92dd051045c449d09c (diff) |
radeonsi: dump compute shader as part of debug dump
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
-rw-r--r-- | src/gallium/drivers/radeonsi/si_debug.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_debug.c b/src/gallium/drivers/radeonsi/si_debug.c index 2e727f6adb..6e310bb9f5 100644 --- a/src/gallium/drivers/radeonsi/si_debug.c +++ b/src/gallium/drivers/radeonsi/si_debug.c @@ -25,6 +25,7 @@ */ #include "si_pipe.h" +#include "si_compute.h" #include "sid.h" #include "gfx9d.h" #include "sid_tables.h" @@ -55,6 +56,15 @@ static void si_dump_gfx_shader(struct si_screen *sscreen, si_dump_shader(sscreen, state->cso->info.processor, current, f); } +static void si_dump_compute_shader(struct si_screen *sscreen, + const struct si_cs_shader_state *state, FILE *f) +{ + if (!state->program || state->program != state->emitted_program) + return; + + si_dump_shader(sscreen, PIPE_SHADER_COMPUTE, &state->program->shader, f); +} + /** * Shader compiles can be overridden with arbitrary ELF objects by setting * the environment variable RADEON_REPLACE_SHADERS=num1:filename1[;num2:filename2] @@ -769,6 +779,7 @@ static void si_dump_debug_state(struct pipe_context *ctx, FILE *f, si_dump_gfx_shader(sctx->screen, &sctx->tes_shader, f); si_dump_gfx_shader(sctx->screen, &sctx->gs_shader, f); si_dump_gfx_shader(sctx->screen, &sctx->ps_shader, f); + si_dump_compute_shader(sctx->screen, &sctx->cs_shader_state, f); if (flags & PIPE_DUMP_DEVICE_STATUS_REGISTERS) { si_dump_annotated_shaders(sctx, f); |