[17/19] Catch nop pixel shader changes
Stefan Dösinger
stefan at codeweavers.com
Tue Dec 19 16:22:48 CST 2006
-------------- next part --------------
From 5d68d831343bb8b1e8c4bae9614ca4965bdc1fd3 Mon Sep 17 00:00:00 2001
From: Stefan Doesinger <stefan at codeweavers.com>
Date: Mon, 18 Dec 2006 15:30:48 +0100
Subject: [PATCH] WineD3D: Catch nop pixelshader 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 e39db9d..99f24f7 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -3696,6 +3696,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;
@@ -5999,10 +6004,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;
--
1.4.2.4
More information about the wine-patches
mailing list