ddraw: Surfaces with DDSCAPS_3DDEVICE and DDSCAPS_ZBUFFER can't be render targets.

This commit is contained in:
Ričardas Barkauskas 2010-10-24 22:39:31 +03:00 committed by Alexandre Julliard
parent ff659522f6
commit 78e4a096a3
2 changed files with 2 additions and 2 deletions

View File

@ -3517,7 +3517,7 @@ HRESULT ddraw_surface_init(IDirectDrawSurfaceImpl *surface, IDirectDrawImpl *ddr
desc->ddsCaps.dwCaps |= DDSCAPS_VISIBLE; 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; usage |= WINED3DUSAGE_RENDERTARGET;
} }

View File

@ -3181,7 +3181,7 @@ static void SetRenderTargetTest(void)
ok(hr == DD_OK, "IDirect3DDevice7_GetRenderTarget failed, hr=0x%08x\n", hr); ok(hr == DD_OK, "IDirect3DDevice7_GetRenderTarget failed, hr=0x%08x\n", hr);
hr = IDirect3DDevice7_SetRenderTarget(lpD3DDevice, failrt, 0); 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); hr = IDirect3DDevice7_SetRenderTarget(lpD3DDevice, newrt, 0);
ok(hr == D3D_OK, "IDirect3DDevice7_SetRenderTarget failed, hr=0x%08x\n", hr); ok(hr == D3D_OK, "IDirect3DDevice7_SetRenderTarget failed, hr=0x%08x\n", hr);