From ce10624e9e827921b503962e2eb04ce0eb06246a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Fri, 26 Oct 2012 15:05:14 +0100 Subject: [PATCH] trace: Flush before drawing. --- src/gallium/drivers/trace/tr_context.c | 2 ++ src/gallium/drivers/trace/tr_dump.c | 8 ++++++++ src/gallium/drivers/trace/tr_dump.h | 1 + 3 files changed, 11 insertions(+) diff --git a/src/gallium/drivers/trace/tr_context.c b/src/gallium/drivers/trace/tr_context.c index a1333e5a132..a5110bec487 100644 --- a/src/gallium/drivers/trace/tr_context.c +++ b/src/gallium/drivers/trace/tr_context.c @@ -94,6 +94,8 @@ trace_context_draw_vbo(struct pipe_context *_pipe, trace_dump_arg(ptr, pipe); trace_dump_arg(draw_info, info); + trace_dump_trace_flush(); + pipe->draw_vbo(pipe, info); trace_dump_call_end(); diff --git a/src/gallium/drivers/trace/tr_dump.c b/src/gallium/drivers/trace/tr_dump.c index ecc5bbcc2cf..90befb09b6b 100644 --- a/src/gallium/drivers/trace/tr_dump.c +++ b/src/gallium/drivers/trace/tr_dump.c @@ -214,6 +214,14 @@ trace_dump_tag_end(const char *name) trace_dump_writes(">"); } +void +trace_dump_trace_flush(void) +{ + if(stream) { + fflush(stream); + } +} + static void trace_dump_trace_close(void) { diff --git a/src/gallium/drivers/trace/tr_dump.h b/src/gallium/drivers/trace/tr_dump.h index 62b4fe429b1..5739e8694a0 100644 --- a/src/gallium/drivers/trace/tr_dump.h +++ b/src/gallium/drivers/trace/tr_dump.h @@ -49,6 +49,7 @@ struct pipe_box; */ boolean trace_dump_trace_begin(void); boolean trace_dump_trace_enabled(void); +void trace_dump_trace_flush(void); void trace_dump_trace_end(void); /* -- 2.30.2