[3/8] WineD3D: Catch nop pixel shader changes
Stefan Dösinger
stefan at codeweavers.com
Wed Jan 3 17:07:45 CST 2007
From 76d60fdff79839ea663cc4af5688efb6648cdd56 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Stefan_D=C3=B6singer?= <stefan at imac.local>
Date: Wed, 3 Jan 2007 01:34:30 +0100
Subject: [PATCH] WineD3D: Catch NOP setVertexShader changes
---
dlls/wined3d/device.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index ac3e62a..a98ddb4 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -3260,6 +3260,11 @@ static HRESULT WINAPI IWineD3DDeviceImpl
if (This->isRecordingState) {
TRACE("Recording... not performing anything\n");
+ return WINED3D_OK;
+ } else if(oldShader == pShader) {
+ /* Checked here to allow proper stateblock recording */
+ TRACE("App is setting the old shader over, nothing to do\n");
+ return WINED3D_OK;
}
if (NULL != pShader) {
@@ -5832,7 +5837,7 @@ 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, vertex declaration
+ * The same for the pixel shader, vertex declaration and vertex shader
* Sampler states and texture stage states are marked
* dirty my StateBlock::Apply already.
*/
@@ -5841,6 +5846,7 @@ static void device_reapply_stateblock(IW
}
IWineD3DDeviceImpl_MarkStateDirty(This, STATE_PIXELSHADER);
IWineD3DDeviceImpl_MarkStateDirty(This, STATE_VDECL);
+ IWineD3DDeviceImpl_MarkStateDirty(This, STATE_VSHADER);
/* Restore recording */
This->isRecordingState = oldRecording;
--
1.4.2.4
More information about the wine-patches
mailing list