From 82fab73246810332bb238e96335ba81d4d2182d6 Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Sat, 11 Jun 2016 11:35:01 -0400 Subject: gallium: add API for setting window rectangles MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Brian Paul Reviewed-by: Nicolai Hähnle --- src/gallium/include/pipe/p_state.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/gallium/include/pipe/p_state.h') 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) */ -- cgit v1.2.3