[18/19] WineD3D: Do not change the states if render target locking is disabled

Stefan Dösinger stefan at codeweavers.com
Tue Dec 19 16:27:25 CST 2006


There is no point in messing with the states if we aren't going to draw 
anything anyway.
-------------- next part --------------
From f7fc287c6ffb0eb24494df8613c88c70f833e307 Mon Sep 17 00:00:00 2001
From: Stefan Doesinger <stefan at codeweavers.com>
Date: Mon, 18 Dec 2006 16:11:12 +0100
Subject: [PATCH] WineD3D: Do not setup states for blitting if render target locking is disabled

---
 dlls/wined3d/surface.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 780f2f6..65e956e 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -1141,7 +1141,7 @@ static HRESULT WINAPI IWineD3DSurfaceImp
         IWineD3DSwapChainImpl *implSwapChain;
         IWineD3DDevice_GetSwapChain((IWineD3DDevice *)myDevice, 0, (IWineD3DSwapChain **)&implSwapChain);
 
-        if (backbuf || iface ==  implSwapChain->frontBuffer || iface == myDevice->renderTarget) {
+        if ((backbuf || iface ==  implSwapChain->frontBuffer || iface == myDevice->renderTarget) && wined3d_settings.rendertargetlock_mode != RTL_DISABLE) {
             int tex;
 
             ENTER_GL();
@@ -1221,7 +1221,7 @@ static HRESULT WINAPI IWineD3DSurfaceImp
             /** restore clean dirty state */
             IWineD3DSurface_CleanDirtyRect(iface);
 
-        } else {
+        } else if(wined3d_settings.rendertargetlock_mode != RTL_DISABLE) {
             FIXME("unsupported unlocking to Rendering surface surf@%p usage(%s)\n", This, debug_d3dusage(This->resource.usage));
         }
         IWineD3DSwapChain_Release((IWineD3DSwapChain *)implSwapChain);
-- 
1.4.2.4



More information about the wine-patches mailing list