diff options
author | Marek Olšák <[email protected]> | 2017-10-05 21:29:35 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-10-07 18:26:35 +0200 |
commit | 5a47abb63e11853bf1f2f72e3c5371a720346b7d (patch) | |
tree | efc8b6a9515e7fd7553bd170cd7de91933c2ad0e /src/gallium/auxiliary/util | |
parent | 76ef08f6eee6abc9eb9b66b7b183927e4aed8d64 (diff) |
radeonsi: don't change viewport for blits, use window-space positions
The viewport state was an identity anyway.
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/util')
-rw-r--r-- | src/gallium/auxiliary/util/u_blitter.c | 4 | ||||
-rw-r--r-- | src/gallium/auxiliary/util/u_blitter.h | 1 |
2 files changed, 4 insertions, 1 deletions
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; |