diff options
author | Marek Olšák <[email protected]> | 2016-04-07 21:41:34 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-04-12 14:29:46 +0200 |
commit | 466aa5718594a1188460856840be324f84553730 (patch) | |
tree | 24c9b99465f9223a178207df595b9bd6d31a5e27 /src/gallium/drivers/radeonsi/si_state.c | |
parent | f3eebb84ebd4c1dd7bd9b69b0b65273635443740 (diff) |
radeonsi: fix mask checking when emitting scissors and viewports
Reviewed-by: Nicolai Hähnle <[email protected]>
Reviewed-by: Grigori Goronzy <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_state.c')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index 6e406718d65..0c46425be9b 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -912,8 +912,10 @@ static void si_emit_scissors(struct si_context *sctx, struct r600_atom *atom) bool scissor_enable = sctx->queued.named.rasterizer->scissor_enable; /* The simple case: Only 1 viewport is active. */ - if (mask & 1 && - !si_get_vs_info(sctx)->writes_viewport_index) { + if (!si_get_vs_info(sctx)->writes_viewport_index) { + if (!(mask & 1)) + return; + radeon_set_context_reg_seq(cs, R_028250_PA_SC_VPORT_SCISSOR_0_TL, 2); si_emit_one_scissor(cs, &sctx->viewports.states[0], scissor_enable ? &states[0] : NULL); @@ -960,8 +962,10 @@ static void si_emit_viewports(struct si_context *sctx, struct r600_atom *atom) unsigned mask = sctx->viewports.dirty_mask; /* The simple case: Only 1 viewport is active. */ - if (mask & 1 && - !si_get_vs_info(sctx)->writes_viewport_index) { + if (!si_get_vs_info(sctx)->writes_viewport_index) { + if (!(mask & 1)) + return; + radeon_set_context_reg_seq(cs, R_02843C_PA_CL_VPORT_XSCALE, 6); radeon_emit(cs, fui(states[0].scale[0])); radeon_emit(cs, fui(states[0].translate[0])); |