summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/si_pipe.c
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2019-03-14 09:51:43 +0100
committerNicolai Hähnle <[email protected]>2019-04-25 12:35:27 +0200
commitca95adf8ff0986ae4b40aeb9afb13e02f7e88f98 (patch)
treeabfdec4832b6922262669a3909478a0743abae8c /src/gallium/drivers/radeonsi/si_pipe.c
parentfea3dcb844af03231f7aa6d1ede93a7733733641 (diff)
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 <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_pipe.c')
-rw-r--r--src/gallium/drivers/radeonsi/si_pipe.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c
index 938e2342aaf..07642246ab6 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.c
+++ b/src/gallium/drivers/radeonsi/si_pipe.c
@@ -705,6 +705,14 @@ static void si_destroy_screen(struct pipe_screen* pscreen)
return;
mtx_destroy(&sscreen->aux_context_lock);
+
+ struct u_log_context *aux_log = ((struct si_context *)sscreen->aux_context)->log;
+ if (aux_log) {
+ sscreen->aux_context->set_log_context(sscreen->aux_context, NULL);
+ u_log_context_destroy(aux_log);
+ FREE(aux_log);
+ }
+
sscreen->aux_context->destroy(sscreen->aux_context);
util_queue_destroy(&sscreen->shader_compiler_queue);
@@ -1190,7 +1198,13 @@ struct pipe_screen *radeonsi_screen_create(struct radeon_winsys *ws,
si_init_compiler(sscreen, &sscreen->compiler_lowp[i]);
/* Create the auxiliary context. This must be done last. */
- sscreen->aux_context = si_create_context(&sscreen->b, 0);
+ sscreen->aux_context = si_create_context(
+ &sscreen->b, sscreen->options.aux_debug ? PIPE_CONTEXT_DEBUG : 0);
+ if (sscreen->options.aux_debug) {
+ struct u_log_context *log = CALLOC_STRUCT(u_log_context);
+ u_log_context_init(log);
+ sscreen->aux_context->set_log_context(sscreen->aux_context, log);
+ }
if (sscreen->debug_flags & DBG(TEST_DMA))
si_test_dma(sscreen);