Stefan Dösinger : wined3d: Catch nop pixel shader changes.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Dec 20 12:24:52 CST 2006
Module: wine
Branch: master
Commit: a008003ccc330a69212e4fd6c1c5e5780bd68c23
URL: http://source.winehq.org/git/wine.git/?a=commit;h=a008003ccc330a69212e4fd6c1c5e5780bd68c23
Author: Stefan Dösinger <stefan at codeweavers.com>
Date: Tue Dec 19 23:22:48 2006 +0100
wined3d: Catch nop pixel shader changes.
---
dlls/wined3d/device.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 1bc25c2..dd42bf7 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -3700,6 +3700,11 @@ static HRESULT WINAPI IWineD3DDeviceImpl
return WINED3D_OK;
}
+ if(pShader == oldShader) {
+ TRACE("App is setting the old pixel shader over, nothing to do\n");
+ return WINED3D_OK;
+ }
+
TRACE("(%p) : setting pShader(%p)\n", This, pShader);
IWineD3DDeviceImpl_MarkStateDirty(This, STATE_PIXELSHADER);
return WINED3D_OK;
@@ -6033,10 +6038,13 @@ static void device_reapply_stateblock(IW
/* Temporaryily mark all render states dirty to force reapplication
* until the context management for is integrated with the state management
+ * The same for the pixel shader, sampler states and texture stage states are marked
+ * dirty my StateBlock::Apply already
*/
for(i = 1; i < WINEHIGHEST_RENDER_STATE; i++) {
IWineD3DDeviceImpl_MarkStateDirty(This, STATE_RENDER(i));
}
+ IWineD3DDeviceImpl_MarkStateDirty(This, STATE_PIXELSHADER);
/* Restore recording */
This->isRecordingState = oldRecording;
More information about the wine-cvs
mailing list