diff options
author | Nicolai Hähnle <nicolai.haehnle@amd.com> | 2017-09-06 10:11:40 +0200 |
---|---|---|
committer | Nicolai Hähnle <nicolai.haehnle@amd.com> | 2017-09-13 18:24:18 +0200 |
commit | 81f398dcb1ae10c9adf891df8218bba23bb62898 (patch) | |
tree | c1a0299bf588348f18c6f4a1ed35293af8554a8d | |
parent | 000e2958f59a8d8e07f06e384546aa942d49b15f (diff) |
ddebug: write out final driver log messages with GALLIUM_DDEBUG=always
If the last operation happens to be a non-draw, such as a
transfer_map that triggers a decompress blit, there may be
interesting messages left in the driver log.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
-rw-r--r-- | src/gallium/drivers/ddebug/dd_context.c | 13 | ||||
-rw-r--r-- | src/gallium/drivers/ddebug/dd_draw.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/ddebug/dd_pipe.h | 2 |
3 files changed, 15 insertions, 2 deletions
diff --git a/src/gallium/drivers/ddebug/dd_context.c b/src/gallium/drivers/ddebug/dd_context.c index fc44a4bd1b..2abbff933f 100644 --- a/src/gallium/drivers/ddebug/dd_context.c +++ b/src/gallium/drivers/ddebug/dd_context.c @@ -584,8 +584,19 @@ dd_context_destroy(struct pipe_context *_pipe) pipe_resource_reference(&dctx->fence, NULL); } - if (pipe->set_log_context) + if (pipe->set_log_context) { pipe->set_log_context(pipe, NULL); + + if (dd_screen(dctx->base.screen)->mode == DD_DUMP_ALL_CALLS) { + FILE *f = dd_get_file_stream(dd_screen(dctx->base.screen), 0); + if (f) { + fprintf(f, "Remainder of driver log:\n\n"); + } + + u_log_new_page_print(&dctx->log, f); + fclose(f); + } + } u_log_context_destroy(&dctx->log); pipe->destroy(pipe); diff --git a/src/gallium/drivers/ddebug/dd_draw.c b/src/gallium/drivers/ddebug/dd_draw.c index 4bf13bd7e4..aec9332d90 100644 --- a/src/gallium/drivers/ddebug/dd_draw.c +++ b/src/gallium/drivers/ddebug/dd_draw.c @@ -39,7 +39,7 @@ #include <inttypes.h> -static FILE * +FILE * dd_get_file_stream(struct dd_screen *dscreen, unsigned apitrace_call_number) { struct pipe_screen *screen = dscreen->screen; diff --git a/src/gallium/drivers/ddebug/dd_pipe.h b/src/gallium/drivers/ddebug/dd_pipe.h index 70b9ae8ae8..252dbffac8 100644 --- a/src/gallium/drivers/ddebug/dd_pipe.h +++ b/src/gallium/drivers/ddebug/dd_pipe.h @@ -274,6 +274,8 @@ dd_init_draw_functions(struct dd_context *dctx); int dd_thread_pipelined_hang_detect(void *input); +FILE * +dd_get_file_stream(struct dd_screen *dscreen, unsigned apitrace_call_number); static inline struct dd_context * dd_context(struct pipe_context *pipe) |