Module: wine Branch: master Commit: 8e7c99f7ab2c687bc69d257cf1398e9531b4751d URL: https://gitlab.winehq.org/wine/wine/-/commit/8e7c99f7ab2c687bc69d257cf1398e9...
Author: Sven Baars sbaars@codeweavers.com Date: Fri Dec 16 11:19:13 2022 +0100
wined3d: Do not explicitly check 3D depth/stencil capabilities in wined3d_check_device_format().
This reapplies the change from 67d0038e49323523b745c4a728069d8195273d23 that was reverted in 06b19322187e5ef8ffc06504c322ce9bcdaaa6ee, causing a regression.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53785
---
dlls/wined3d/directx.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 9d7c4769cb8..9b6901d25c0 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -2109,13 +2109,6 @@ HRESULT CDECL wined3d_check_device_format(const struct wined3d *wined3d, if (gl_type == WINED3D_GL_RES_TYPE_TEX_2D && !(bind_flags & WINED3D_BIND_SHADER_RESOURCE)) caps |= format->caps[WINED3D_GL_RES_TYPE_RB];
- if ((caps & format_caps) != format_caps) - { - TRACE("Requested format caps %#x, but format %s only has %#x.\n", - format_caps, debug_d3dformat(check_format_id), caps); - return WINED3DERR_NOTAVAILABLE; - } - if ((bind_flags & WINED3D_BIND_RENDER_TARGET) && !adapter->adapter_ops->adapter_check_format(adapter, adapter_format, format, NULL)) { @@ -2143,6 +2136,13 @@ HRESULT CDECL wined3d_check_device_format(const struct wined3d *wined3d, return WINED3DERR_NOTAVAILABLE; }
+ if ((caps & format_caps) != format_caps) + { + TRACE("Requested format caps %#x, but format %s only has %#x.\n", + format_caps, debug_d3dformat(check_format_id), caps); + return WINED3DERR_NOTAVAILABLE; + } + if (!(caps & WINED3D_FORMAT_CAP_GEN_MIPMAP)) mipmap_gen_supported = FALSE; }