wined3d: Check for locked surfaces in wined3d_surface_blt().

This commit is contained in:
Henri Verbeet 2011-08-01 21:35:43 +02:00 committed by Alexandre Julliard
parent 50d883c37e
commit 4bdd4ef45b

View File

@ -1293,12 +1293,6 @@ static HRESULT surface_blt(struct wined3d_surface *dst_surface, const RECT *dst_
flags, fx, debug_d3dtexturefiltertype(filter));
TRACE("Usage is %s.\n", debug_d3dusage(dst_surface->resource.usage));
if ((dst_surface->flags & SFLAG_LOCKED) || (src_surface && (src_surface->flags & SFLAG_LOCKED)))
{
WARN(" Surface is busy, returning DDERR_SURFACEBUSY\n");
return WINEDDERR_SURFACEBUSY;
}
dst_ds_flags = dst_surface->resource.format->flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL);
if (src_surface)
src_ds_flags = src_surface->resource.format->flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL);
@ -3412,6 +3406,12 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
dst_surface, wine_dbgstr_rect(dst_rect_in), src_surface, wine_dbgstr_rect(src_rect_in),
flags, fx, debug_d3dtexturefiltertype(filter));
if ((dst_surface->flags & SFLAG_LOCKED) || (src_surface && (src_surface->flags & SFLAG_LOCKED)))
{
WARN("Surface is busy, returning WINEDDERR_SURFACEBUSY.\n");
return WINEDDERR_SURFACEBUSY;
}
surface_get_rect(dst_surface, dst_rect_in, &dst_rect);
if (src_surface)
surface_get_rect(src_surface, src_rect_in, &src_rect);
@ -6439,12 +6439,6 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *
dst_surface, wine_dbgstr_rect(dst_rect), src_surface, wine_dbgstr_rect(src_rect),
flags, fx, debug_d3dtexturefiltertype(filter));
if ((dst_surface->flags & SFLAG_LOCKED) || (src_surface && (src_surface->flags & SFLAG_LOCKED)))
{
WARN("Surface is busy, returning WINEDDERR_SURFACEBUSY\n");
return WINEDDERR_SURFACEBUSY;
}
/* First check for the validity of source / destination rectangles.
* This was verified using a test application and by MSDN. */
if (src_rect)