summaryrefslogtreecommitdiffstats
path: root/src/gallium/include
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2012-09-12 01:36:31 +0200
committerMarek Olšák <[email protected]>2012-09-30 18:57:56 +0200
commitc4df2e333765164e0d4926f03b969a3c9fdca691 (patch)
treeffe02213ffc69fefe2257cfdd659c0870ef03a51 /src/gallium/include
parentb9c9dd4783f77020aaed28b3c2a29b5f1a3a941f (diff)
gallium: add blit into the interface
Tested-by: Michel Dänzer <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/include')
-rw-r--r--src/gallium/include/pipe/p_context.h7
-rw-r--r--src/gallium/include/pipe/p_state.h21
2 files changed, 28 insertions, 0 deletions
diff --git a/src/gallium/include/pipe/p_context.h b/src/gallium/include/pipe/p_context.h
index 5d468127779..3c33bc6cb84 100644
--- a/src/gallium/include/pipe/p_context.h
+++ b/src/gallium/include/pipe/p_context.h
@@ -39,6 +39,7 @@ extern "C" {
struct pipe_blend_color;
struct pipe_blend_state;
+struct pipe_blit_info;
struct pipe_box;
struct pipe_clip_state;
struct pipe_constant_buffer;
@@ -297,6 +298,12 @@ struct pipe_context {
unsigned src_level,
const struct pipe_box *src_box);
+ /* Optimal hardware path for blitting pixels.
+ * Scaling, format conversion, up- and downsampling (resolve) are allowed.
+ */
+ void (*blit)(struct pipe_context *pipe,
+ const struct pipe_blit_info *info);
+
/**
* Resolve a multisampled resource into a non-multisampled one.
* Source and destination must be of the same format.
diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h
index 9ea9c0e3286..1f748cdda4f 100644
--- a/src/gallium/include/pipe/p_state.h
+++ b/src/gallium/include/pipe/p_state.h
@@ -565,6 +565,27 @@ struct pipe_draw_info
/**
+ * Information to describe a blit call.
+ */
+struct pipe_blit_info
+{
+ struct {
+ struct pipe_resource *resource;
+ unsigned level;
+ struct pipe_box box; /**< negative width, height only legal for src */
+ /* For pipe_surface-like format casting: */
+ enum pipe_format format; /**< must be supported for sampling (src)
+ or rendering (dst), ZS is always supported */
+ } dst, src;
+
+ unsigned mask; /**< bitmask of PIPE_MASK_R/G/B/A/Z/S */
+ unsigned filter; /**< PIPE_TEX_FILTER_* */
+
+ boolean scissor_enable;
+ struct pipe_scissor_state scissor;
+};
+
+/**
* Information to describe a resource_resolve call.
*/
struct pipe_resolve_info