summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/galahad
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2013-09-20 15:08:29 +0200
committerMarek Olšák <marek.olsak@amd.com>2013-09-20 20:35:55 +0200
commit419cd5f2a24b87d31a2fd9dd9b7d0025b4f5515c (patch)
tree517df295a28d5fc0f0542de5e6f2552886b32e5b /src/gallium/drivers/galahad
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 <marek.olsak@amd.com>
Diffstat (limited to 'src/gallium/drivers/galahad')
-rw-r--r--src/gallium/drivers/galahad/glhd_context.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gallium/drivers/galahad/glhd_context.c b/src/gallium/drivers/galahad/glhd_context.c
index ee9de058bb0..3df22ce332e 100644
--- a/src/gallium/drivers/galahad/glhd_context.c
+++ b/src/gallium/drivers/galahad/glhd_context.c
@@ -783,6 +783,18 @@ galahad_context_blit(struct pipe_context *_pipe,
}
static void
+galahad_context_flush_resource(struct pipe_context *_pipe,
+ struct pipe_resource *_res)
+{
+ struct galahad_context *glhd_pipe = galahad_context(_pipe);
+ struct galahad_resource *glhd_resource_res = galahad_resource(_res);
+ struct pipe_context *pipe = glhd_pipe->pipe;
+ struct pipe_resource *res = glhd_resource_res->resource;
+
+ pipe->flush_resource(pipe, res);
+}
+
+static void
galahad_context_clear(struct pipe_context *_pipe,
unsigned buffers,
const union pipe_color_union *color,
@@ -1096,6 +1108,7 @@ galahad_context_create(struct pipe_screen *_screen, struct pipe_context *pipe)
GLHD_PIPE_INIT(set_stream_output_targets);
GLHD_PIPE_INIT(resource_copy_region);
GLHD_PIPE_INIT(blit);
+ GLHD_PIPE_INIT(flush_resource);
GLHD_PIPE_INIT(clear);
GLHD_PIPE_INIT(clear_render_target);
GLHD_PIPE_INIT(clear_depth_stencil);