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/drivers/i915/i915_state.c | |
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/drivers/i915/i915_state.c')
-rw-r--r-- | src/gallium/drivers/i915/i915_state.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/gallium/drivers/i915/i915_state.c b/src/gallium/drivers/i915/i915_state.c index 4a4faa5298c..06d4d3bd1af 100644 --- a/src/gallium/drivers/i915/i915_state.c +++ b/src/gallium/drivers/i915/i915_state.c @@ -534,7 +534,9 @@ static void i915_delete_depth_stencil_state(struct pipe_context *pipe, } -static void i915_set_scissor_state( struct pipe_context *pipe, +static void i915_set_scissor_states( struct pipe_context *pipe, + unsigned start_slot, + unsigned num_scissors, const struct pipe_scissor_state *scissor ) { struct i915_context *i915 = i915_context(pipe); @@ -825,7 +827,9 @@ static void i915_set_clip_state( struct pipe_context *pipe, /* Called when driver state tracker notices changes to the viewport * matrix: */ -static void i915_set_viewport_state( struct pipe_context *pipe, +static void i915_set_viewport_states( struct pipe_context *pipe, + unsigned start_slot, + unsigned num_viewports, const struct pipe_viewport_state *viewport ) { struct i915_context *i915 = i915_context(pipe); @@ -833,7 +837,8 @@ static void i915_set_viewport_state( struct pipe_context *pipe, i915->viewport = *viewport; /* struct copy */ /* pass the viewport info to the draw module */ - draw_set_viewport_state(i915->draw, &i915->viewport); + draw_set_viewport_states(i915->draw, start_slot, num_viewports, + &i915->viewport); i915->dirty |= I915_NEW_VIEWPORT; } @@ -1040,12 +1045,12 @@ i915_init_state_functions( struct i915_context *i915 ) i915->base.set_framebuffer_state = i915_set_framebuffer_state; i915->base.set_polygon_stipple = i915_set_polygon_stipple; - i915->base.set_scissor_state = i915_set_scissor_state; + i915->base.set_scissor_states = i915_set_scissor_states; i915->base.set_fragment_sampler_views = i915_set_fragment_sampler_views; i915->base.set_vertex_sampler_views = i915_set_vertex_sampler_views; i915->base.create_sampler_view = i915_create_sampler_view; i915->base.sampler_view_destroy = i915_sampler_view_destroy; - i915->base.set_viewport_state = i915_set_viewport_state; + i915->base.set_viewport_states = i915_set_viewport_states; i915->base.set_vertex_buffers = i915_set_vertex_buffers; i915->base.set_index_buffer = i915_set_index_buffer; } |