summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util/u_blitter.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/auxiliary/util/u_blitter.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/auxiliary/util/u_blitter.c')
-rw-r--r--src/gallium/auxiliary/util/u_blitter.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/auxiliary/util/u_blitter.c b/src/gallium/auxiliary/util/u_blitter.c
index 2acc5afc2b8..8c871fdf912 100644
--- a/src/gallium/auxiliary/util/u_blitter.c
+++ b/src/gallium/auxiliary/util/u_blitter.c
@@ -504,7 +504,7 @@ static void blitter_restore_fragment_states(struct blitter_context_priv *ctx)
/* XXX check whether these are saved and whether they need to be restored
* (depending on the operation) */
pipe->set_stencil_ref(pipe, &ctx->base.saved_stencil_ref);
- pipe->set_viewport_state(pipe, &ctx->base.saved_viewport);
+ pipe->set_viewport_states(pipe, 0, 1, &ctx->base.saved_viewport);
}
static void blitter_check_saved_fb_state(struct blitter_context_priv *ctx)
@@ -599,7 +599,7 @@ static void blitter_set_rectangle(struct blitter_context_priv *ctx,
ctx->viewport.translate[1] = 0.5f * ctx->dst_height;
ctx->viewport.translate[2] = 0.0f;
ctx->viewport.translate[3] = 0.0f;
- ctx->base.pipe->set_viewport_state(ctx->base.pipe, &ctx->viewport);
+ ctx->base.pipe->set_viewport_states(ctx->base.pipe, 0, 1, &ctx->viewport);
}
static void blitter_set_clear_color(struct blitter_context_priv *ctx,
@@ -1401,7 +1401,7 @@ void util_blitter_blit_generic(struct blitter_context *blitter,
pipe->bind_vertex_elements_state(pipe, ctx->velem_state);
if (scissor) {
- pipe->set_scissor_state(pipe, scissor);
+ pipe->set_scissor_states(pipe, 0, 1, scissor);
}
blitter_set_common_draw_rect_state(ctx, scissor != NULL);
@@ -1496,7 +1496,7 @@ void util_blitter_blit_generic(struct blitter_context *blitter,
blitter_restore_textures(ctx);
blitter_restore_fb_state(ctx);
if (scissor) {
- pipe->set_scissor_state(pipe, &ctx->base.saved_scissor);
+ pipe->set_scissor_states(pipe, 0, 1, &ctx->base.saved_scissor);
}
blitter_restore_render_cond(ctx);
blitter_unset_running_flag(ctx);