summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe/lp_state_clip.c
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/drivers/llvmpipe/lp_state_clip.c
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/drivers/llvmpipe/lp_state_clip.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_state_clip.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_state_clip.c b/src/gallium/drivers/llvmpipe/lp_state_clip.c
index 32ae079cc15..a26c79f72f6 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_clip.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_clip.c
@@ -44,28 +44,33 @@ llvmpipe_set_clip_state(struct pipe_context *pipe,
static void
-llvmpipe_set_viewport_state(struct pipe_context *pipe,
- const struct pipe_viewport_state *viewport)
+llvmpipe_set_viewport_states(struct pipe_context *pipe,
+ unsigned start_slot,
+ unsigned num_viewports,
+ const struct pipe_viewport_state *viewports)
{
struct llvmpipe_context *llvmpipe = llvmpipe_context(pipe);
/* pass the viewport info to the draw module */
- draw_set_viewport_state(llvmpipe->draw, viewport);
+ draw_set_viewport_states(llvmpipe->draw, start_slot, num_viewports,
+ viewports);
- llvmpipe->viewport = *viewport; /* struct copy */
+ llvmpipe->viewport = *viewports; /* struct copy */
llvmpipe->dirty |= LP_NEW_VIEWPORT;
}
static void
-llvmpipe_set_scissor_state(struct pipe_context *pipe,
- const struct pipe_scissor_state *scissor)
+llvmpipe_set_scissor_states(struct pipe_context *pipe,
+ unsigned start_slot,
+ unsigned num_scissors,
+ const struct pipe_scissor_state *scissors)
{
struct llvmpipe_context *llvmpipe = llvmpipe_context(pipe);
draw_flush(llvmpipe->draw);
- llvmpipe->scissor = *scissor; /* struct copy */
+ llvmpipe->scissor = *scissors; /* struct copy */
llvmpipe->dirty |= LP_NEW_SCISSOR;
}
@@ -89,6 +94,6 @@ llvmpipe_init_clip_funcs(struct llvmpipe_context *llvmpipe)
{
llvmpipe->pipe.set_clip_state = llvmpipe_set_clip_state;
llvmpipe->pipe.set_polygon_stipple = llvmpipe_set_polygon_stipple;
- llvmpipe->pipe.set_scissor_state = llvmpipe_set_scissor_state;
- llvmpipe->pipe.set_viewport_state = llvmpipe_set_viewport_state;
+ llvmpipe->pipe.set_scissor_states = llvmpipe_set_scissor_states;
+ llvmpipe->pipe.set_viewport_states = llvmpipe_set_viewport_states;
}