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/radeonsi/si_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/radeonsi/si_state.c')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index 4556be699cb..82c16411acd 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -263,8 +263,10 @@ static void si_set_clip_state(struct pipe_context *ctx, si_pm4_set_state(rctx, clip, pm4); } -static void si_set_scissor_state(struct pipe_context *ctx, - const struct pipe_scissor_state *state) +static void si_set_scissor_states(struct pipe_context *ctx, + unsigned start_slot, + unsigned num_scissors, + const struct pipe_scissor_state *state) { struct r600_context *rctx = (struct r600_context *)ctx; struct si_pm4_state *pm4 = CALLOC_STRUCT(si_pm4_state); @@ -287,8 +289,10 @@ static void si_set_scissor_state(struct pipe_context *ctx, si_pm4_set_state(rctx, scissor, pm4); } -static void si_set_viewport_state(struct pipe_context *ctx, - const struct pipe_viewport_state *state) +static void si_set_viewport_states(struct pipe_context *ctx, + unsigned start_slot, + unsigned num_viewports, + const struct pipe_viewport_state *state) { struct r600_context *rctx = (struct r600_context *)ctx; struct si_state_viewport *viewport = CALLOC_STRUCT(si_state_viewport); @@ -2705,8 +2709,8 @@ void si_init_state_functions(struct r600_context *rctx) rctx->custom_dsa_flush_inplace = si_create_db_flush_dsa(rctx, false, false); rctx->context.set_clip_state = si_set_clip_state; - rctx->context.set_scissor_state = si_set_scissor_state; - rctx->context.set_viewport_state = si_set_viewport_state; + rctx->context.set_scissor_states = si_set_scissor_states; + rctx->context.set_viewport_states = si_set_viewport_states; rctx->context.set_stencil_ref = si_set_pipe_stencil_ref; rctx->context.set_framebuffer_state = si_set_framebuffer_state; |