From: José Fonseca Date: Fri, 26 Oct 2012 14:05:14 +0000 (+0100) Subject: trace: Flush before drawing. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ce10624e9e827921b503962e2eb04ce0eb06246a;p=mesa.git trace: Flush before drawing. --- 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); /*