if (f) {
fprintf(f, "dd: %s.\n", cause);
- dd_dump_driver_state(dctx, f, PIPE_DEBUG_DEVICE_IS_HUNG);
+ dd_dump_driver_state(dctx, f,
+ PIPE_DUMP_DEVICE_STATUS_REGISTERS |
+ PIPE_DUMP_CURRENT_STATES |
+ PIPE_DUMP_CURRENT_SHADERS |
+ PIPE_DUMP_LAST_COMMAND_BUFFER);
dd_close_file_stream(f);
}
case DD_DETECT_HANGS:
if (!dscreen->no_flush &&
dd_flush_and_check_hang(dctx, NULL, 0)) {
- dd_dump_call(dctx, call, PIPE_DEBUG_DEVICE_IS_HUNG);
+ dd_dump_call(dctx, call,
+ PIPE_DUMP_DEVICE_STATUS_REGISTERS |
+ PIPE_DUMP_CURRENT_STATES |
+ PIPE_DUMP_CURRENT_SHADERS |
+ PIPE_DUMP_LAST_COMMAND_BUFFER);
/* Terminate the process to prevent future hangs. */
dd_kill_process();
{
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,