From 5a47abb63e11853bf1f2f72e3c5371a720346b7d Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Thu, 5 Oct 2017 21:29:35 +0200 Subject: radeonsi: don't change viewport for blits, use window-space positions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The viewport state was an identity anyway. Reviewed-by: Nicolai Hähnle --- src/gallium/auxiliary/util/u_blitter.c | 4 +++- src/gallium/auxiliary/util/u_blitter.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'src/gallium/auxiliary/util') diff --git a/src/gallium/auxiliary/util/u_blitter.c b/src/gallium/auxiliary/util/u_blitter.c index a5c1f178a60..72e22e7d826 100644 --- a/src/gallium/auxiliary/util/u_blitter.c +++ b/src/gallium/auxiliary/util/u_blitter.c @@ -650,7 +650,9 @@ void util_blitter_restore_fragment_states(struct blitter_context *blitter) /* 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_states(pipe, 0, 1, &ctx->base.saved_viewport); + + if (!blitter->skip_viewport_restore) + pipe->set_viewport_states(pipe, 0, 1, &ctx->base.saved_viewport); } static void blitter_check_saved_fb_state(struct blitter_context_priv *ctx) diff --git a/src/gallium/auxiliary/util/u_blitter.h b/src/gallium/auxiliary/util/u_blitter.h index 0dd896d3818..dba773906ae 100644 --- a/src/gallium/auxiliary/util/u_blitter.h +++ b/src/gallium/auxiliary/util/u_blitter.h @@ -113,6 +113,7 @@ struct blitter_context struct pipe_stencil_ref saved_stencil_ref; /**< stencil ref */ struct pipe_viewport_state saved_viewport; struct pipe_scissor_state saved_scissor; + bool skip_viewport_restore; bool is_sample_mask_saved; unsigned saved_sample_mask; -- cgit v1.2.3