Ričardas Barkauskas : ddraw: Surfaces with DDSCAPS_3DDEVICE and DDSCAPS_ZBUFFER can't be render targets .
Alexandre Julliard
julliard at winehq.org
Mon Oct 25 10:58:31 CDT 2010
Module: wine
Branch: master
Commit: 78e4a096a3af4ef000ac5251b39716066980340a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=78e4a096a3af4ef000ac5251b39716066980340a
Author: Ričardas Barkauskas <miegalius at gmail.com>
Date: Sun Oct 24 22:39:31 2010 +0300
ddraw: Surfaces with DDSCAPS_3DDEVICE and DDSCAPS_ZBUFFER can't be render targets.
---
dlls/ddraw/surface.c | 2 +-
dlls/ddraw/tests/d3d.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c
index 2878a56..6a12cdf 100644
--- a/dlls/ddraw/surface.c
+++ b/dlls/ddraw/surface.c
@@ -3517,7 +3517,7 @@ HRESULT ddraw_surface_init(IDirectDrawSurfaceImpl *surface, IDirectDrawImpl *ddr
desc->ddsCaps.dwCaps |= DDSCAPS_VISIBLE;
}
- if (desc->ddsCaps.dwCaps & DDSCAPS_3DDEVICE)
+ if ((desc->ddsCaps.dwCaps & DDSCAPS_3DDEVICE) && !(desc->ddsCaps.dwCaps & DDSCAPS_ZBUFFER))
{
usage |= WINED3DUSAGE_RENDERTARGET;
}
diff --git a/dlls/ddraw/tests/d3d.c b/dlls/ddraw/tests/d3d.c
index f144543..87a368c 100644
--- a/dlls/ddraw/tests/d3d.c
+++ b/dlls/ddraw/tests/d3d.c
@@ -3181,7 +3181,7 @@ static void SetRenderTargetTest(void)
ok(hr == DD_OK, "IDirect3DDevice7_GetRenderTarget failed, hr=0x%08x\n", hr);
hr = IDirect3DDevice7_SetRenderTarget(lpD3DDevice, failrt, 0);
- todo_wine ok(hr != D3D_OK, "IDirect3DDevice7_SetRenderTarget succeeded\n");
+ ok(hr != D3D_OK, "IDirect3DDevice7_SetRenderTarget succeeded\n");
hr = IDirect3DDevice7_SetRenderTarget(lpD3DDevice, newrt, 0);
ok(hr == D3D_OK, "IDirect3DDevice7_SetRenderTarget failed, hr=0x%08x\n", hr);
More information about the wine-cvs
mailing list