summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util/u_blitter.h
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2012-09-12 23:45:49 +0200
committerMarek Olšák <[email protected]>2012-09-30 18:57:56 +0200
commitcecfb452ab941cd3b67b871758dfa850788a2cdc (patch)
tree685f35511e306b0805846e1290052dbb680e687e /src/gallium/auxiliary/util/u_blitter.h
parent0b0697e80dd442d7e7cb23641ad8f58f82df120d (diff)
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 <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/util/u_blitter.h')
-rw-r--r--src/gallium/auxiliary/util/u_blitter.h12
1 files changed, 12 insertions, 0 deletions
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