Henri Verbeet : wined3d: Setting render target 0 to NULL in an application error.

Alexandre Julliard julliard at winehq.org
Wed Jul 28 10:45:04 CDT 2010


Module: wine
Branch: master
Commit: 41346a1dae53bd941d97d7ec58e240557a37d4e8
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=41346a1dae53bd941d97d7ec58e240557a37d4e8

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Tue Jul 27 12:54:52 2010 +0200

wined3d: Setting render target 0 to NULL in an application error.

---

 dlls/wined3d/device.c |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index be473d7..11a6b9a 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -5758,14 +5758,13 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderTarget(IWineD3DDevice *iface,
         return WINED3DERR_INVALIDCALL;
     }
 
-    /* MSDN says that null disables the render target
-    but a device must always be associated with a render target
-    nope MSDN says that we return invalid call to a null rendertarget with an index of 0
-    */
-    if (RenderTargetIndex == 0 && pRenderTarget == NULL) {
-        FIXME("Trying to set render target 0 to NULL\n");
+    /* Render target 0 can't be set to NULL. */
+    if (!pRenderTarget && !RenderTargetIndex)
+    {
+        WARN("Trying to set render target 0 to NULL.\n");
         return WINED3DERR_INVALIDCALL;
     }
+
     if (pRenderTarget && !(((IWineD3DSurfaceImpl *)pRenderTarget)->resource.usage & WINED3DUSAGE_RENDERTARGET)) {
         FIXME("(%p)Trying to set the render target to a surface(%p) that wasn't created with a usage of WINED3DUSAGE_RENDERTARGET\n",This ,pRenderTarget);
         return WINED3DERR_INVALIDCALL;




More information about the wine-cvs mailing list