summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/nine/device9.c
diff options
context:
space:
mode:
authorAxel Davy <[email protected]>2015-03-24 11:06:22 +0100
committerAxel Davy <[email protected]>2015-08-21 22:21:47 +0200
commit87ec6b56b28c25d4184422c40f576c24ebe7cd75 (patch)
treeb90934ffe56642f8d5d6bc6772b4b2f3c0f0710b /src/gallium/state_trackers/nine/device9.c
parent993e68fa6a431a7c7c451c738e07d02a84ea40e4 (diff)
st/nine: Rework ff constant buffers
Always use a user constant buffer for ff. It means we have to: . commit the user constant buffer for ff when we use it . commit back the non-ff constant buffer when we stop using it 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.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/nine/device9.c b/src/gallium/state_trackers/nine/device9.c
index c5687615be8..8023f785e10 100644
--- a/src/gallium/state_trackers/nine/device9.c
+++ b/src/gallium/state_trackers/nine/device9.c
@@ -3244,6 +3244,10 @@ NineDevice9_SetVertexShader( struct NineDevice9 *This,
DBG("This=%p pShader=%p\n", This, pShader);
+ /* ff -> non-ff: commit back non-ff constants */
+ if (!state->vs && pShader)
+ state->commit |= NINE_STATE_COMMIT_CONST_VS;
+
nine_bind(&state->vs, pShader);
state->changed.group |= NINE_STATE_VS;
@@ -3572,6 +3576,10 @@ NineDevice9_SetPixelShader( struct NineDevice9 *This,
DBG("This=%p pShader=%p\n", This, pShader);
+ /* ff -> non-ff: commit back non-ff constants */
+ if (!state->ps && pShader)
+ state->commit |= NINE_STATE_COMMIT_CONST_PS;
+
nine_bind(&state->ps, pShader);
state->changed.group |= NINE_STATE_PS;