summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/trace/tr_context.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2013-09-20 15:08:29 +0200
committerMarek Olšák <[email protected]>2013-09-20 20:35:55 +0200
commit419cd5f2a24b87d31a2fd9dd9b7d0025b4f5515c (patch)
tree517df295a28d5fc0f0542de5e6f2552886b32e5b /src/gallium/drivers/trace/tr_context.c
parentd2bd63433a252c84488023e9877e70d69223da42 (diff)
gallium: add flush_resource context function
r600g needs explicit flushing before DRI2 buffers are presented on the screen. v2: add (stub) implementations for all drivers, fix frontbuffer flushing v3: fix galahad Signed-off-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers/trace/tr_context.c')
-rw-r--r--src/gallium/drivers/trace/tr_context.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/gallium/drivers/trace/tr_context.c b/src/gallium/drivers/trace/tr_context.c
index 26df3713208..fdd5a7a1285 100644
--- a/src/gallium/drivers/trace/tr_context.c
+++ b/src/gallium/drivers/trace/tr_context.c
@@ -1206,6 +1206,26 @@ trace_context_blit(struct pipe_context *_pipe,
}
+static void
+trace_context_flush_resource(struct pipe_context *_pipe,
+ struct pipe_resource *resource)
+{
+ struct trace_context *tr_ctx = trace_context(_pipe);
+ struct pipe_context *pipe = tr_ctx->pipe;
+
+ resource = trace_resource_unwrap(tr_ctx, resource);
+
+ trace_dump_call_begin("pipe_context", "flush_resource");
+
+ trace_dump_arg(ptr, pipe);
+ trace_dump_arg(ptr, resource);
+
+ pipe->flush_resource(pipe, resource);
+
+ trace_dump_call_end();
+}
+
+
static INLINE void
trace_context_clear(struct pipe_context *_pipe,
unsigned buffers,
@@ -1604,6 +1624,7 @@ trace_context_create(struct trace_screen *tr_scr,
TR_CTX_INIT(set_stream_output_targets);
TR_CTX_INIT(resource_copy_region);
TR_CTX_INIT(blit);
+ TR_CTX_INIT(flush_resource);
TR_CTX_INIT(clear);
TR_CTX_INIT(clear_render_target);
TR_CTX_INIT(clear_depth_stencil);