summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/nine
diff options
context:
space:
mode:
authorAxel Davy <[email protected]>2015-08-09 19:06:01 +0200
committerAxel Davy <[email protected]>2015-08-21 22:21:48 +0200
commit719f124620d3c9b4d6ce14db3dbfc7af05626e5b (patch)
treecbd984e6603cc69e2b66a3d1053b67f9b132e5d7 /src/gallium/state_trackers/nine
parenteba3c390a3c6221781ca4d9c344c6f448e177b6c (diff)
st/nine: Catch setting the same shader
This is quite rare that an app does set again the same shaders, but it isn't an expensive check either. Signed-off-by: Axel Davy <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/nine')
-rw-r--r--src/gallium/state_trackers/nine/device9.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/nine/device9.c b/src/gallium/state_trackers/nine/device9.c
index 7b2a2f14c8f..f136b048cf7 100644
--- a/src/gallium/state_trackers/nine/device9.c
+++ b/src/gallium/state_trackers/nine/device9.c
@@ -3259,6 +3259,9 @@ NineDevice9_SetVertexShader( struct NineDevice9 *This,
DBG("This=%p pShader=%p\n", This, pShader);
+ if (!This->is_recording && state->vs == (struct NineVertexShader9*)pShader)
+ return D3D_OK;
+
/* ff -> non-ff: commit back non-ff constants */
if (!state->vs && pShader)
state->commit |= NINE_STATE_COMMIT_CONST_VS;
@@ -3612,6 +3615,9 @@ NineDevice9_SetPixelShader( struct NineDevice9 *This,
DBG("This=%p pShader=%p\n", This, pShader);
+ if (!This->is_recording && state->ps == (struct NinePixelShader9*)pShader)
+ return D3D_OK;
+
/* ff -> non-ff: commit back non-ff constants */
if (!state->ps && pShader)
state->commit |= NINE_STATE_COMMIT_CONST_PS;