summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/rbug
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/rbug
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/rbug')
-rw-r--r--src/gallium/drivers/rbug/rbug_context.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gallium/drivers/rbug/rbug_context.c b/src/gallium/drivers/rbug/rbug_context.c
index 721419750bb..a103dfb5a7e 100644
--- a/src/gallium/drivers/rbug/rbug_context.c
+++ b/src/gallium/drivers/rbug/rbug_context.c
@@ -873,6 +873,20 @@ rbug_resource_copy_region(struct pipe_context *_pipe,
}
static void
+rbug_flush_resource(struct pipe_context *_pipe,
+ struct pipe_resource *_res)
+{
+ struct rbug_context *rb_pipe = rbug_context(_pipe);
+ struct rbug_resource *rb_resource_res = rbug_resource(_res);
+ struct pipe_context *pipe = rb_pipe->pipe;
+ struct pipe_resource *res = rb_resource_res->resource;
+
+ pipe_mutex_lock(rb_pipe->call_mutex);
+ pipe->flush_resource(pipe, res);
+ pipe_mutex_unlock(rb_pipe->call_mutex);
+}
+
+static void
rbug_clear(struct pipe_context *_pipe,
unsigned buffers,
const union pipe_color_union *color,
@@ -1181,6 +1195,7 @@ rbug_context_create(struct pipe_screen *_screen, struct pipe_context *pipe)
rb_pipe->base.set_index_buffer = rbug_set_index_buffer;
rb_pipe->base.set_sample_mask = rbug_set_sample_mask;
rb_pipe->base.resource_copy_region = rbug_resource_copy_region;
+ rb_pipe->base.flush_resource = rbug_flush_resource;
rb_pipe->base.clear = rbug_clear;
rb_pipe->base.clear_render_target = rbug_clear_render_target;
rb_pipe->base.clear_depth_stencil = rbug_clear_depth_stencil;