From cecfb452ab941cd3b67b871758dfa850788a2cdc Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Wed, 12 Sep 2012 23:45:49 +0200 Subject: gallium/u_blitter: add helper for blitting via resource_copy_region v2: fix off-by-one error in is_box_inside_resource, add comments Reviewed-by: Brian Paul --- src/gallium/auxiliary/util/u_blitter.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/gallium/auxiliary/util/u_blitter.h') diff --git a/src/gallium/auxiliary/util/u_blitter.h b/src/gallium/auxiliary/util/u_blitter.h index 026e88b5154..40636c61619 100644 --- a/src/gallium/auxiliary/util/u_blitter.h +++ b/src/gallium/auxiliary/util/u_blitter.h @@ -142,6 +142,18 @@ void util_blitter_draw_rectangle(struct blitter_context *blitter, enum blitter_attrib_type type, const union pipe_color_union *attrib); +/** + * Try to do a blit using resource_copy_region. The function calls + * resource_copy_region if the blit description is compatible with it. + * + * It returns TRUE if the blit was done using resource_copy_region. + * + * It returns FALSE otherwise and the caller must fall back to a more generic + * codepath for the blit operation. (e.g. by using u_blitter) + */ +boolean util_try_blit_via_copy_region(struct pipe_context *ctx, + const struct pipe_blit_info *blit); + /* * These states must be saved before any of the following functions are called: * - vertex buffers -- cgit v1.2.3