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

Alexandre Julliard julliard at winehq.org
Mon Jun 15 15:03:06 CDT 2020


Module: wine
Branch: master
Commit: 67d0038e49323523b745c4a728069d8195273d23
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=67d0038e49323523b745c4a728069d8195273d23

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Mon Jun 15 21:24:02 2020 +0430

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
9b8847ed7b0f15c444c34034d311a8d79b3b06c8.

Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 f4094c8fba..efae3444ee 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -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;
     }




More information about the wine-cvs mailing list