From 419cd5f2a24b87d31a2fd9dd9b7d0025b4f5515c Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Fri, 20 Sep 2013 15:08:29 +0200 Subject: gallium: add flush_resource context function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/gallium/drivers/identity/id_context.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/gallium/drivers/identity') diff --git a/src/gallium/drivers/identity/id_context.c b/src/gallium/drivers/identity/id_context.c index 6b342ebd146..6cb7bdfa117 100644 --- a/src/gallium/drivers/identity/id_context.c +++ b/src/gallium/drivers/identity/id_context.c @@ -648,6 +648,16 @@ identity_blit(struct pipe_context *_pipe, pipe->blit(pipe, &blit); } +static void +identity_flush_resource(struct pipe_context *_pipe, + struct pipe_resource *resource) +{ + struct identity_context *id_pipe = identity_context(_pipe); + struct pipe_context *pipe = id_pipe->pipe; + + pipe->flush_resource(pipe, resource); +} + static void identity_clear(struct pipe_context *_pipe, unsigned buffers, @@ -936,6 +946,7 @@ identity_context_create(struct pipe_screen *_screen, struct pipe_context *pipe) id_pipe->base.transfer_flush_region = identity_context_transfer_flush_region; id_pipe->base.transfer_inline_write = identity_context_transfer_inline_write; id_pipe->base.blit = identity_blit; + id_pipe->base.flush_resource = identity_flush_resource; id_pipe->pipe = pipe; -- cgit v1.2.3