Commit 67d0038e authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Do not explicitly check 3D depth/stencil capabilities in wined3d_check_device_format().

WINED3D_RTYPE_NONE checks both 2D and 3D resource capabilities, but has special handling for 3D depth/stencil capabilities. For WINED3D_RTYPE_TEXTURE_3D, WINED3D_BIND_DEPTH_STENCIL is not an allowed bind flag, so we never get here. This fixes a regression introduced by commit 9b8847ed. Signed-off-by: 's avatarHenri Verbeet <hverbeet@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 77bf4d49
......@@ -1679,13 +1679,6 @@ HRESULT CDECL wined3d_check_device_format(const struct wined3d *wined3d,
for (; gl_type <= gl_type_end; ++gl_type)
{
if ((format->flags[gl_type] & format_flags) != format_flags)
{
TRACE("Requested format flags %#x, but format %s only has %#x.\n",
format_flags, debug_d3dformat(check_format_id), format->flags[gl_type]);
return WINED3DERR_NOTAVAILABLE;
}
if ((bind_flags & WINED3D_BIND_RENDER_TARGET)
&& !adapter->adapter_ops->adapter_check_format(adapter, adapter_format, format, NULL))
{
......@@ -1706,6 +1699,13 @@ HRESULT CDECL wined3d_check_device_format(const struct wined3d *wined3d,
return WINED3DERR_NOTAVAILABLE;
}
if ((format->flags[gl_type] & format_flags) != format_flags)
{
TRACE("Requested format flags %#x, but format %s only has %#x.\n",
format_flags, debug_d3dformat(check_format_id), format->flags[gl_type]);
return WINED3DERR_NOTAVAILABLE;
}
if (!(format->flags[gl_type] & WINED3DFMT_FLAG_GEN_MIPMAP))
mipmap_gen_supported = FALSE;
}
......
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