diff options
author | Marek Olšák <[email protected]> | 2016-07-19 21:41:03 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-07-26 23:06:46 +0200 |
commit | 6bf81de339289b0d005553414ce568b136a0ca5f (patch) | |
tree | 81b305d0fa4434db18b4caf3789475fa5727d103 /src/gallium/drivers/radeonsi/si_debug.c | |
parent | 9ace2c13550609dfe78164f104500d438821f383 (diff) |
gallium: rework flags for pipe_context::dump_debug_state
The pipelined hang detection mode will not want to dump everything.
(and it's also time consuming) It will only dump shaders after a draw call
and then dump the status registers separately if a hang is detected.
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_debug.c')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_debug.c | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/src/gallium/drivers/radeonsi/si_debug.c b/src/gallium/drivers/radeonsi/si_debug.c index 73e0bfeb344..35d961d34f5 100644 --- a/src/gallium/drivers/radeonsi/si_debug.c +++ b/src/gallium/drivers/radeonsi/si_debug.c @@ -665,24 +665,30 @@ static void si_dump_debug_state(struct pipe_context *ctx, FILE *f, { struct si_context *sctx = (struct si_context*)ctx; - if (flags & PIPE_DEBUG_DEVICE_IS_HUNG) + if (flags & PIPE_DUMP_DEVICE_STATUS_REGISTERS) si_dump_debug_registers(sctx, f); - si_dump_framebuffer(sctx, f); - si_dump_shader(sctx->screen, &sctx->vs_shader, f); - si_dump_shader(sctx->screen, &sctx->tcs_shader, f); - si_dump_shader(sctx->screen, &sctx->tes_shader, f); - si_dump_shader(sctx->screen, &sctx->gs_shader, f); - si_dump_shader(sctx->screen, &sctx->ps_shader, f); + if (flags & PIPE_DUMP_CURRENT_STATES) + si_dump_framebuffer(sctx, f); - si_dump_bo_list(sctx, &sctx->last_gfx, f); - si_dump_last_ib(sctx, f); + if (flags & PIPE_DUMP_CURRENT_SHADERS) { + si_dump_shader(sctx->screen, &sctx->vs_shader, f); + si_dump_shader(sctx->screen, &sctx->tcs_shader, f); + si_dump_shader(sctx->screen, &sctx->tes_shader, f); + si_dump_shader(sctx->screen, &sctx->gs_shader, f); + si_dump_shader(sctx->screen, &sctx->ps_shader, f); + } + + if (flags & PIPE_DUMP_LAST_COMMAND_BUFFER) { + si_dump_bo_list(sctx, &sctx->last_gfx, f); + si_dump_last_ib(sctx, f); - fprintf(f, "Done.\n"); + fprintf(f, "Done.\n"); - /* dump only once */ - radeon_clear_saved_cs(&sctx->last_gfx); - r600_resource_reference(&sctx->last_trace_buf, NULL); + /* dump only once */ + radeon_clear_saved_cs(&sctx->last_gfx); + r600_resource_reference(&sctx->last_trace_buf, NULL); + } } static void si_dump_dma(struct si_context *sctx, |