radeonsi: add radeonsi_aux_debug option for aux context debug dumps

Enabling this option will create ddebug-style dumps for the aux context,
except that instead of intercepting the pipe_context layer
we just dump the IB contents on flush.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
Nicolai Hähnle
2019-03-14 09:51:43 +01:00
parent fea3dcb844
commit ca95adf8ff
3 changed files with 33 additions and 1 deletions

View File

@@ -482,6 +482,23 @@ void si_log_hw_flush(struct si_context *sctx)
return;
si_log_cs(sctx, sctx->log, true);
if (&sctx->b == sctx->screen->aux_context) {
/* The aux context isn't captured by the ddebug wrapper,
* so we dump it on a flush-by-flush basis here.
*/
FILE *f = dd_get_debug_file(false);
if (!f) {
fprintf(stderr, "radeonsi: error opening aux context dump file.\n");
} else {
dd_write_header(f, &sctx->screen->b, 0);
fprintf(f, "Aux context dump:\n\n");
u_log_new_page_print(sctx->log, f);
fclose(f);
}
}
}
static const char *priority_to_string(enum radeon_bo_priority priority)