summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/draw
diff options
context:
space:
mode:
authorZack Rusin <[email protected]>2013-05-24 16:08:39 -0400
committerZack Rusin <[email protected]>2013-05-25 09:49:20 -0400
commiteaabb4ead07ae043ecc789024028e225ebd0f318 (patch)
tree3cd3788f1f6ba45b5855e6858b306f3f6d880500 /src/gallium/auxiliary/draw
parente6efb900e7a7601797b2e8263388fe72f6820e9b (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/auxiliary/draw')
-rw-r--r--src/gallium/auxiliary/draw/draw_context.c7
-rw-r--r--src/gallium/auxiliary/draw/draw_context.h6
2 files changed, 9 insertions, 4 deletions
diff --git a/src/gallium/auxiliary/draw/draw_context.c b/src/gallium/auxiliary/draw/draw_context.c
index 78190388ef1..b555c65e858 100644
--- a/src/gallium/auxiliary/draw/draw_context.c
+++ b/src/gallium/auxiliary/draw/draw_context.c
@@ -311,9 +311,12 @@ void draw_set_clip_state( struct draw_context *draw,
/**
* Set the draw module's viewport state.
*/
-void draw_set_viewport_state( struct draw_context *draw,
- const struct pipe_viewport_state *viewport )
+void draw_set_viewport_states( struct draw_context *draw,
+ unsigned start_slot,
+ unsigned num_viewports,
+ const struct pipe_viewport_state *vps )
{
+ const struct pipe_viewport_state *viewport = vps;
draw_do_flush(draw, DRAW_FLUSH_PARAMETER_CHANGE);
draw->viewport = *viewport; /* struct copy */
draw->identity_viewport = (viewport->scale[0] == 1.0f &&
diff --git a/src/gallium/auxiliary/draw/draw_context.h b/src/gallium/auxiliary/draw/draw_context.h
index 47bad0d73d4..2d843b7a047 100644
--- a/src/gallium/auxiliary/draw/draw_context.h
+++ b/src/gallium/auxiliary/draw/draw_context.h
@@ -71,8 +71,10 @@ void draw_destroy( struct draw_context *draw );
void draw_flush(struct draw_context *draw);
-void draw_set_viewport_state( struct draw_context *draw,
- const struct pipe_viewport_state *viewport );
+void draw_set_viewport_states( struct draw_context *draw,
+ unsigned start_slot,
+ unsigned num_viewports,
+ const struct pipe_viewport_state *viewports );
void draw_set_clip_state( struct draw_context *pipe,
const struct pipe_clip_state *clip );