mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-03 03:28:09 +02:00
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 <axel.davy@ens.fr>
This commit is contained in:
parent
eba3c390a3
commit
719f124620
1 changed files with 6 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue