diff options
author | Zack Rusin <[email protected]> | 2013-05-24 16:08:39 -0400 |
---|---|---|
committer | Zack Rusin <[email protected]> | 2013-05-25 09:49:20 -0400 |
commit | eaabb4ead07ae043ecc789024028e225ebd0f318 (patch) | |
tree | 3cd3788f1f6ba45b5855e6858b306f3f6d880500 /src/gallium/include/pipe | |
parent | e6efb900e7a7601797b2e8263388fe72f6820e9b (diff) |
gallium: Add support for multiple viewports
Gallium supported only a single viewport/scissor combination. This
commit changes the interface to allow us to add support for multiple
viewports/scissors.
Signed-off-by: Zack Rusin <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Reviewed-by: José Fonseca<[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/gallium/include/pipe')
-rw-r--r-- | src/gallium/include/pipe/p_context.h | 12 | ||||
-rw-r--r-- | src/gallium/include/pipe/p_defines.h | 3 | ||||
-rw-r--r-- | src/gallium/include/pipe/p_shader_tokens.h | 3 | ||||
-rw-r--r-- | src/gallium/include/pipe/p_state.h | 1 |
4 files changed, 13 insertions, 6 deletions
diff --git a/src/gallium/include/pipe/p_context.h b/src/gallium/include/pipe/p_context.h index d1130bc5182..0403d3b3d7f 100644 --- a/src/gallium/include/pipe/p_context.h +++ b/src/gallium/include/pipe/p_context.h @@ -211,11 +211,15 @@ struct pipe_context { void (*set_polygon_stipple)( struct pipe_context *, const struct pipe_poly_stipple * ); - void (*set_scissor_state)( struct pipe_context *, - const struct pipe_scissor_state * ); + void (*set_scissor_states)( struct pipe_context *, + unsigned start_slot, + unsigned num_scissors, + const struct pipe_scissor_state * ); - void (*set_viewport_state)( struct pipe_context *, - const struct pipe_viewport_state * ); + void (*set_viewport_states)( struct pipe_context *, + unsigned start_slot, + unsigned num_viewports, + const struct pipe_viewport_state *); void (*set_fragment_sampler_views)(struct pipe_context *, unsigned num_views, diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h index bb8696895fb..8af1a846a38 100644 --- a/src/gallium/include/pipe/p_defines.h +++ b/src/gallium/include/pipe/p_defines.h @@ -507,7 +507,8 @@ enum pipe_cap { PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER = 80, PIPE_CAP_QUERY_PIPELINE_STATISTICS = 81, PIPE_CAP_TEXTURE_BORDER_COLOR_QUIRK = 82, - PIPE_CAP_MAX_TEXTURE_BUFFER_SIZE = 83 + PIPE_CAP_MAX_TEXTURE_BUFFER_SIZE = 83, + PIPE_CAP_MAX_VIEWPORTS = 84 }; #define PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_NV50 (1 << 0) diff --git a/src/gallium/include/pipe/p_shader_tokens.h b/src/gallium/include/pipe/p_shader_tokens.h index 50de2d370a1..b33cf1d5213 100644 --- a/src/gallium/include/pipe/p_shader_tokens.h +++ b/src/gallium/include/pipe/p_shader_tokens.h @@ -164,7 +164,8 @@ struct tgsi_declaration_interp #define TGSI_SEMANTIC_THREAD_ID 18 /**< block-relative id of the current thread */ #define TGSI_SEMANTIC_TEXCOORD 19 /**< texture or sprite coordinates */ #define TGSI_SEMANTIC_PCOORD 20 /**< point sprite coordinate */ -#define TGSI_SEMANTIC_COUNT 21 /**< number of semantic values */ +#define TGSI_SEMANTIC_VIEWPORT_INDEX 21 /**< viewport index */ +#define TGSI_SEMANTIC_COUNT 22 /**< number of semantic values */ struct tgsi_declaration_semantic { diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h index 262078d09b3..ff0aac78394 100644 --- a/src/gallium/include/pipe/p_state.h +++ b/src/gallium/include/pipe/p_state.h @@ -65,6 +65,7 @@ extern "C" { #define PIPE_MAX_TEXTURE_LEVELS 16 #define PIPE_MAX_SO_BUFFERS 4 #define PIPE_MAX_SO_OUTPUTS 64 +#define PIPE_MAX_VIEWPORTS 16 struct pipe_reference |