Module: wine Branch: master Commit: 574169174ec479317986176e635d4d3bf5afb7be URL: http://source.winehq.org/git/wine.git/?a=commit;h=574169174ec479317986176e63...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Thu Oct 21 12:40:44 2010 +0200
wined3d: Check if we can do the blit before messing with surface flags in IWineD3DSurfaceImpl_BltOverride().
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();