Commit 57416917 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Check if we can do the blit before messing with surface flags in…

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.
parent b0c8b4dd
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment