[PATCH 7/7] wined3d: Drop the special case for "converted" surfaces in wined3d_surface_blt().

Henri Verbeet hverbeet at codeweavers.com
Mon Jul 17 07:01:42 CDT 2017


We still want to avoid invalidating the system memory copy for these surfaces,
but we've become a lot better at preserving the current location for
resources, to the point that the special case actually hurts. In particular,
if the resource wasn't already current on the CPU, using the CPU blitter would
cause us to read it back, which is what we're trying to avoid.

Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
---
 dlls/wined3d/surface.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index c143256..584c511 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -3621,16 +3621,6 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
         goto cpu;
     }
 
-    /* We want to avoid invalidating the sysmem location for converted
-     * surfaces, since otherwise we'd have to convert the data back when
-     * locking them. */
-    if (dst_texture->flags & WINED3D_TEXTURE_CONVERTED || dst_texture->resource.format->convert
-            || wined3d_format_get_color_key_conversion(dst_texture, TRUE))
-    {
-        WARN_(d3d_perf)("Converted surface, using CPU blit.\n");
-        goto cpu;
-    }
-
     if (flags & ~simple_blit)
     {
         WARN_(d3d_perf)("Using fallback for complex blit (%#x).\n", flags);
-- 
2.1.4




More information about the wine-patches mailing list