summaryrefslogtreecommitdiffstats
path: root/src/gallium/include/pipe
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2016-06-11 11:35:01 -0400
committerIlia Mirkin <[email protected]>2016-06-18 12:59:12 -0400
commit82fab73246810332bb238e96335ba81d4d2182d6 (patch)
treeaa3af2ac815d60acd7cba5086d651ac302361982 /src/gallium/include/pipe
parentd68c1e2ac28bbf0ac6259e9619fb73958fc598b8 (diff)
gallium: add API for setting window rectangles
Window rectangles apply to all framebuffer operations, either in inclusive or exclusive mode. They may also be specified as part of a blit operation. In exclusive mode, any fragment inside any of the specified rectangles will be discarded. In inclusive mode, any fragment outside every rectangle will be discarded. The no-op state is to have 0 rectangles in exclusive mode. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/include/pipe')
-rw-r--r--src/gallium/include/pipe/p_context.h5
-rw-r--r--src/gallium/include/pipe/p_state.h6
2 files changed, 11 insertions, 0 deletions
diff --git a/src/gallium/include/pipe/p_context.h b/src/gallium/include/pipe/p_context.h
index 9d7a8eb76a9..6fde8753a72 100644
--- a/src/gallium/include/pipe/p_context.h
+++ b/src/gallium/include/pipe/p_context.h
@@ -274,6 +274,11 @@ struct pipe_context {
unsigned num_scissors,
const struct pipe_scissor_state * );
+ void (*set_window_rectangles)( struct pipe_context *,
+ boolean include,
+ unsigned num_rectangles,
+ const struct pipe_scissor_state * );
+
void (*set_viewport_states)( struct pipe_context *,
unsigned start_slot,
unsigned num_viewports,
diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h
index 396f563bd79..9c693555c7e 100644
--- a/src/gallium/include/pipe/p_state.h
+++ b/src/gallium/include/pipe/p_state.h
@@ -69,6 +69,7 @@ extern "C" {
#define PIPE_MAX_VIEWPORTS 16
#define PIPE_MAX_CLIP_OR_CULL_DISTANCE_COUNT 8
#define PIPE_MAX_CLIP_OR_CULL_DISTANCE_ELEMENT_COUNT 2
+#define PIPE_MAX_WINDOW_RECTANGLES 8
struct pipe_reference
@@ -710,6 +711,11 @@ struct pipe_blit_info
boolean scissor_enable;
struct pipe_scissor_state scissor;
+ /* Window rectangles can either be inclusive or exclusive. */
+ boolean window_rectangle_include;
+ unsigned num_window_rectangles;
+ struct pipe_scissor_state window_rectangles[PIPE_MAX_WINDOW_RECTANGLES];
+
boolean render_condition_enable; /**< whether the blit should honor the
current render condition */
boolean alpha_blend; /* dst.rgb = src.rgb * src.a + dst.rgb * (1 - src.a) */