[PATCH 2/4] wined3d: Check if we can do the blit before messing with surface flags in IWineD3DSurfaceImpl_BltOverride().

Henri Verbeet hverbeet at codeweavers.com
Thu Oct 21 05:40:44 CDT 2010


As an added benefit blit_supported() will now get the rectangles in the
correct coordinate system.
---
 dlls/wined3d/surface.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 6ebffbe..a1587b0 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -3642,6 +3642,14 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *dst_surface,
             return arbfp_blit_surface(device, src_surface, &src_rect, dst_surface, &dst_rect, BLIT_OP_BLIT, Filter);
         }
 
+        if (!device->blitter->blit_supported(gl_info, BLIT_OP_BLIT,
+                &src_rect, src_surface->resource.usage, src_surface->resource.pool, src_surface->resource.format,
+                &dst_rect, dst_surface->resource.usage, dst_surface->resource.pool, dst_surface->resource.format))
+        {
+            FIXME("Unsupported blit operation falling back to software\n");
+            return WINED3DERR_INVALIDCALL;
+        }
+
         /* Color keying: Check if we have to do a color keyed blt,
          * and if not check if a color key is activated.
          *
@@ -3675,14 +3683,6 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *dst_surface,
             dst_rect.bottom = dst_surface->currentDesc.Height - dst_rect.bottom;
         }
 
-        if (!device->blitter->blit_supported(gl_info, BLIT_OP_BLIT,
-                &src_rect, src_surface->resource.usage, src_surface->resource.pool, src_surface->resource.format,
-                &dst_rect, dst_surface->resource.usage, dst_surface->resource.pool, dst_surface->resource.format))
-        {
-            FIXME("Unsupported blit operation falling back to software\n");
-            return WINED3DERR_INVALIDCALL;
-        }
-
         device->blitter->set_shader((IWineD3DDevice *)device, src_surface);
 
         ENTER_GL();
-- 
1.7.2.2




More information about the wine-patches mailing list