Commit c835b00a authored by H. Verbeet's avatar H. Verbeet Committed by Alexandre Julliard

wined3d: Handle depth formats like any other format in CheckDeviceFormat.

Currently depth formats are handled separately from the other formats, but depth formats can support things like filtering as well, so we should check those caps as well.
parent a52224a4
......@@ -2212,7 +2212,9 @@ static BOOL CheckTextureCapability(UINT Adapter, WINED3DFORMAT CheckFormat)
TRACE_(d3d_caps)("[OK]\n");
return TRUE;
/* Depth/stencil is handled using checkDepthStencilCapability, return FALSE here */
/*****
* Supported: Depth/Stencil formats
*/
case WINED3DFMT_D16_LOCKABLE:
case WINED3DFMT_D16:
case WINED3DFMT_D15S1:
......@@ -2222,7 +2224,7 @@ static BOOL CheckTextureCapability(UINT Adapter, WINED3DFORMAT CheckFormat)
case WINED3DFMT_D24FS8:
case WINED3DFMT_D32:
case WINED3DFMT_D32F_LOCKABLE:
return FALSE;
return TRUE;
/*****
* Not supported everywhere(depends on GL_ATI_envmap_bumpmap or
......@@ -2669,10 +2671,16 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
return WINED3DERR_NOTAVAILABLE;
}
}
} else if(CheckDepthStencilCapability(Adapter, AdapterFormat, CheckFormat)) {
if(Usage & WINED3DUSAGE_DEPTHSTENCIL)
if(Usage & WINED3DUSAGE_DEPTHSTENCIL) {
if(CheckDepthStencilCapability(Adapter, AdapterFormat, CheckFormat)) {
UsageCaps |= WINED3DUSAGE_DEPTHSTENCIL;
} else {
TRACE_(d3d_caps)("[FAILED] - No depth stencil support\n");
return WINED3DERR_NOTAVAILABLE;
}
}
} else {
TRACE_(d3d_caps)("[FAILED] - Texture format not supported\n");
return WINED3DERR_NOTAVAILABLE;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment