summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/galahad
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2012-09-13 00:12:22 +0200
committerMarek Olšák <maraeo@gmail.com>2012-09-30 18:57:56 +0200
commit2a309dc2b4e78c9e49d5b679cae5cf802b772469 (patch)
tree716465b867b2048f335240bc621605f22c9fea67 /src/gallium/drivers/galahad
parentab3070c5fa6d32521c867887288c30231ec5a688 (diff)
downloadexternal_mesa3d-2a309dc2b4e78c9e49d5b679cae5cf802b772469.zip
external_mesa3d-2a309dc2b4e78c9e49d5b679cae5cf802b772469.tar.gz
external_mesa3d-2a309dc2b4e78c9e49d5b679cae5cf802b772469.tar.bz2
gallium: implement blit in driver wrappers
Tested-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'src/gallium/drivers/galahad')
-rw-r--r--src/gallium/drivers/galahad/glhd_context.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/gallium/drivers/galahad/glhd_context.c b/src/gallium/drivers/galahad/glhd_context.c
index 601081b..e20986f 100644
--- a/src/gallium/drivers/galahad/glhd_context.c
+++ b/src/gallium/drivers/galahad/glhd_context.c
@@ -722,6 +722,31 @@ galahad_context_resource_copy_region(struct pipe_context *_pipe,
}
static void
+galahad_context_blit(struct pipe_context *_pipe,
+ const struct pipe_blit_info *info)
+{
+ struct galahad_context *glhd_pipe = galahad_context(_pipe);
+ struct pipe_context *pipe = glhd_pipe->pipe;
+
+ if (info->dst.box.width < 0 ||
+ info->dst.box.height < 0)
+ glhd_error("Destination dimensions are negative");
+
+ if (info->filter != PIPE_TEX_FILTER_NEAREST &&
+ info->src.resource->target != PIPE_TEXTURE_3D &&
+ info->dst.box.depth != info->src.box.depth)
+ glhd_error("Filtering in z-direction on non-3D texture");
+
+ if (util_format_is_depth_or_stencil(info->dst.format) !=
+ util_format_is_depth_or_stencil(info->src.format))
+ glhd_error("Invalid format conversion: %s <- %s\n",
+ util_format_name(info->dst.format),
+ util_format_name(info->src.format));
+
+ pipe->blit(pipe, info);
+}
+
+static void
galahad_context_clear(struct pipe_context *_pipe,
unsigned buffers,
const union pipe_color_union *color,
@@ -1054,6 +1079,7 @@ galahad_context_create(struct pipe_screen *_screen, struct pipe_context *pipe)
//GLHD_PIPE_INIT(stream_output_target_destroy);
//GLHD_PIPE_INIT(set_stream_output_targets);
GLHD_PIPE_INIT(resource_copy_region);
+ GLHD_PIPE_INIT(blit);
//GLHD_PIPE_INIT(resource_resolve);
GLHD_PIPE_INIT(clear);
GLHD_PIPE_INIT(clear_render_target);