[PATCH 3/4] wined3d: use BltFast in UpdateSurface when desc.convert is set

Roderick Colenbrander thunderbird2k at gmail.com
Mon May 17 06:11:40 CDT 2010


This fixes a bug similar to another in this series (haven't seen bug reports).
At a later stage we should be able to get rid of d3dfmt_get_conv in UpdateSurface
if we would use the blit_shader here. The main reason for d3dmft_get_conv at this point
is ddraw which relies on it for 'Load' (a helper function for it calls it).
---
 dlls/wined3d/device.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 2b8f231..413d032 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -5235,7 +5235,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_UpdateSurface(IWineD3DDevice *iface,
     UINT src_w, src_h;
     UINT dst_x, dst_y;
     DWORD sampler;
-    struct wined3d_format_desc dummy_desc;
+    struct wined3d_format_desc desc;
 
     TRACE("iface %p, src_surface %p, src_rect %s, dst_surface %p, dst_point %s.\n",
             iface, src_surface, wine_dbgstr_rect(src_rect),
@@ -5264,8 +5264,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_UpdateSurface(IWineD3DDevice *iface,
      * surface to the destination's sysmem copy. If surface conversion is
      * needed, use BltFast instead to copy in sysmem and use regular surface
      * loading. */
-    d3dfmt_get_conv(dst_impl, FALSE, TRUE, &dummy_desc, &convert);
-    if (convert != NO_CONVERSION)
+    d3dfmt_get_conv(dst_impl, FALSE, TRUE, &desc, &convert);
+    if (convert != NO_CONVERSION || desc.convert)
         return IWineD3DSurface_BltFast(dst_surface, dst_x, dst_y, src_surface, src_rect, 0);
 
     context = context_acquire(This, NULL);
-- 
1.6.3.3




More information about the wine-patches mailing list