[PATCH 3/6] wined3d: Allow FBO blits between INTZ and D24_UNORM_S8_UINT.

Matteo Bruni mbruni at codeweavers.com
Tue Oct 20 17:24:06 CDT 2015


Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
---
This fixes the RESZ test on core contexts, otherwise broken by the INTZ
fixup in the next patch.

I was thinking about sending this patch without signing it, since I'm
doubtful this is how we want to handle the issue. But in the off chance
that this is okay after all...

 dlls/wined3d/surface.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 320f269..2af5d7a 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -988,6 +988,13 @@ static void surface_blt_fbo(const struct wined3d_device *device,
         context_restore(context, restore_rt);
 }
 
+static enum wined3d_format_id get_actual_wined3d_format(enum wined3d_format_id id)
+{
+    if (id == WINED3DFMT_INTZ)
+        return WINED3DFMT_D24_UNORM_S8_UINT;
+    return id;
+}
+
 static BOOL fbo_blit_supported(const struct wined3d_gl_info *gl_info, enum wined3d_blit_op blit_op,
         const RECT *src_rect, DWORD src_usage, enum wined3d_pool src_pool, const struct wined3d_format *src_format,
         const RECT *dst_rect, DWORD dst_usage, enum wined3d_pool dst_pool, const struct wined3d_format *dst_format)
@@ -1021,7 +1028,7 @@ static BOOL fbo_blit_supported(const struct wined3d_gl_info *gl_info, enum wined
             return FALSE;
     }
 
-    if (!(src_format->id == dst_format->id
+    if (!(get_actual_wined3d_format(src_format->id) == get_actual_wined3d_format(dst_format->id)
             || (is_identity_fixup(src_format->color_fixup)
             && is_identity_fixup(dst_format->color_fixup))))
         return FALSE;
-- 
2.4.10




More information about the wine-patches mailing list