summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga/svga_pipe_misc.c
diff options
context:
space:
mode:
authorZack Rusin <zackr@vmware.com>2013-05-24 16:08:39 -0400
committerZack Rusin <zackr@vmware.com>2013-05-25 09:49:20 -0400
commiteaabb4ead07ae043ecc789024028e225ebd0f318 (patch)
tree3cd3788f1f6ba45b5855e6858b306f3f6d880500 /src/gallium/drivers/svga/svga_pipe_misc.c
parente6efb900e7a7601797b2e8263388fe72f6820e9b (diff)
downloadexternal_mesa3d-eaabb4ead07ae043ecc789024028e225ebd0f318.zip
external_mesa3d-eaabb4ead07ae043ecc789024028e225ebd0f318.tar.gz
external_mesa3d-eaabb4ead07ae043ecc789024028e225ebd0f318.tar.bz2
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 <zackr@vmware.com> Reviewed-by: Marek Olšák <maraeo@gmail.com> Reviewed-by: José Fonseca<jfonseca@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Diffstat (limited to 'src/gallium/drivers/svga/svga_pipe_misc.c')
-rw-r--r--src/gallium/drivers/svga/svga_pipe_misc.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/gallium/drivers/svga/svga_pipe_misc.c b/src/gallium/drivers/svga/svga_pipe_misc.c
index 7884b6d..f1c007b 100644
--- a/src/gallium/drivers/svga/svga_pipe_misc.c
+++ b/src/gallium/drivers/svga/svga_pipe_misc.c
@@ -31,12 +31,14 @@
#include "svga_surface.h"
-static void svga_set_scissor_state( struct pipe_context *pipe,
- const struct pipe_scissor_state *scissor )
+static void svga_set_scissor_states( struct pipe_context *pipe,
+ unsigned start_slot,
+ unsigned num_scissors,
+ const struct pipe_scissor_state *scissors )
{
struct svga_context *svga = svga_context(pipe);
- memcpy( &svga->curr.scissor, scissor, sizeof(*scissor) );
+ memcpy( &svga->curr.scissor, scissors, sizeof(*scissors) );
svga->dirty |= SVGA_NEW_SCISSOR;
}
@@ -161,12 +163,14 @@ static void svga_set_clip_state( struct pipe_context *pipe,
/* Called when driver state tracker notices changes to the viewport
* matrix:
*/
-static void svga_set_viewport_state( struct pipe_context *pipe,
- const struct pipe_viewport_state *viewport )
+static void svga_set_viewport_states( struct pipe_context *pipe,
+ unsigned start_slot,
+ unsigned num_viewports,
+ const struct pipe_viewport_state *viewports )
{
struct svga_context *svga = svga_context(pipe);
- svga->curr.viewport = *viewport; /* struct copy */
+ svga->curr.viewport = *viewports; /* struct copy */
svga->dirty |= SVGA_NEW_VIEWPORT;
}
@@ -175,11 +179,11 @@ static void svga_set_viewport_state( struct pipe_context *pipe,
void svga_init_misc_functions( struct svga_context *svga )
{
- svga->pipe.set_scissor_state = svga_set_scissor_state;
+ svga->pipe.set_scissor_states = svga_set_scissor_states;
svga->pipe.set_polygon_stipple = svga_set_polygon_stipple;
svga->pipe.set_framebuffer_state = svga_set_framebuffer_state;
svga->pipe.set_clip_state = svga_set_clip_state;
- svga->pipe.set_viewport_state = svga_set_viewport_state;
+ svga->pipe.set_viewport_states = svga_set_viewport_states;
}