summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/nine/device9.c
diff options
context:
space:
mode:
authorAxel Davy <[email protected]>2016-10-19 21:47:02 +0200
committerAxel Davy <[email protected]>2016-12-20 23:44:22 +0100
commit9498613607aa9bf42a36db0462f5e38b1d1f4c60 (patch)
tree7d016772e4de46a89bba1dd0d1b09bb2a4e27c07 /src/gallium/state_trackers/nine/device9.c
parent7f6e01052b77ee825ec681ee5d9b65f5d182ca4f (diff)
st/nine: Back scissor to nine_context
Part of the refactor to move all gallium calls to nine_state.c, and have all internal states required for those calls in nine_context. Signed-off-by: Axel Davy <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/nine/device9.c')
-rw-r--r--src/gallium/state_trackers/nine/device9.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/nine/device9.c b/src/gallium/state_trackers/nine/device9.c
index 7b0009d9349..8f9872c1560 100644
--- a/src/gallium/state_trackers/nine/device9.c
+++ b/src/gallium/state_trackers/nine/device9.c
@@ -105,6 +105,8 @@ NineDevice9_SetDefaultState( struct NineDevice9 *This, boolean is_reset )
This->state.scissor.maxx = refSurf->desc.Width;
This->state.scissor.maxy = refSurf->desc.Height;
+ nine_context_set_scissor(This, &This->state.scissor);
+
if (This->nswapchains && This->swapchains[0]->params.EnableAutoDepthStencil) {
nine_context_set_render_state(This, D3DRS_ZENABLE, TRUE);
This->state.rs_advertised[D3DRS_ZENABLE] = TRUE;
@@ -2711,7 +2713,10 @@ NineDevice9_SetScissorRect( struct NineDevice9 *This,
state->scissor.maxx = pRect->right;
state->scissor.maxy = pRect->bottom;
- state->changed.group |= NINE_STATE_SCISSOR;
+ if (unlikely(This->is_recording))
+ state->changed.group |= NINE_STATE_SCISSOR;
+ else
+ nine_context_set_scissor(This, &state->scissor);
return D3D_OK;
}