From 5c57b53a6c6038f8d25178ce77b781e68561cf11 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Thu, 8 Sep 2011 23:50:36 +0200 Subject: [PATCH] wined3d: Use the CPU blitter for blitting to converted surfaces. --- dlls/wined3d/surface.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index d62e31cc7c6..b92a1a157c8 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -1554,6 +1554,15 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC 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_surface->flags & SFLAG_CONVERTED) + { + WARN("Converted surface, using CPU blit.\n"); + return surface_cpu_blt(dst_surface, &dst_rect, src_surface, &src_rect, flags, fx, filter); + } + if (flags & ~simple_blit) { WARN("Using fallback for complex blit (%#x).\n", flags); @@ -2181,7 +2190,7 @@ static void surface_download_data(struct wined3d_surface *surface, const struct /* Only support read back of converted P8 surfaces. */ if (surface->flags & SFLAG_CONVERTED && format->id != WINED3DFMT_P8_UINT) { - FIXME("Readback conversion not supported for format %s.\n", debug_d3dformat(format->id)); + ERR("Trying to read back converted surface %p with format %s.\n", surface, debug_d3dformat(format->id)); return; } -- 2.11.4.GIT