ddraw: Do not request 3D-usages for DDRAW_NO3D surfaces.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2018-09-26 00:44:38 +03:30 committed by Alexandre Julliard
parent a470045506
commit 8ac639d25c
1 changed files with 9 additions and 6 deletions

View File

@ -6152,12 +6152,15 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_
}
else
{
if (desc->ddsCaps.dwCaps & DDSCAPS_TEXTURE)
wined3d_desc.usage |= WINED3DUSAGE_TEXTURE;
if (desc->ddsCaps.dwCaps & DDSCAPS_ZBUFFER)
wined3d_desc.usage |= WINED3DUSAGE_DEPTHSTENCIL;
else if (desc->ddsCaps.dwCaps & DDSCAPS_3DDEVICE)
wined3d_desc.usage |= WINED3DUSAGE_RENDERTARGET;
if (!(ddraw->flags & DDRAW_NO3D))
{
if (desc->ddsCaps.dwCaps & DDSCAPS_TEXTURE)
wined3d_desc.usage |= WINED3DUSAGE_TEXTURE;
if (desc->ddsCaps.dwCaps & DDSCAPS_ZBUFFER)
wined3d_desc.usage |= WINED3DUSAGE_DEPTHSTENCIL;
else if (desc->ddsCaps.dwCaps & DDSCAPS_3DDEVICE)
wined3d_desc.usage |= WINED3DUSAGE_RENDERTARGET;
}
if (desc->ddsCaps.dwCaps2 & (DDSCAPS2_TEXTUREMANAGE | DDSCAPS2_D3DTEXTUREMANAGE))
{