Commit 4bdd4ef4 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Check for locked surfaces in wined3d_surface_blt().

parent 50d883c3
...@@ -1293,12 +1293,6 @@ static HRESULT surface_blt(struct wined3d_surface *dst_surface, const RECT *dst_ ...@@ -1293,12 +1293,6 @@ static HRESULT surface_blt(struct wined3d_surface *dst_surface, const RECT *dst_
flags, fx, debug_d3dtexturefiltertype(filter)); flags, fx, debug_d3dtexturefiltertype(filter));
TRACE("Usage is %s.\n", debug_d3dusage(dst_surface->resource.usage)); 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); dst_ds_flags = dst_surface->resource.format->flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL);
if (src_surface) if (src_surface)
src_ds_flags = src_surface->resource.format->flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL); 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 ...@@ -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), dst_surface, wine_dbgstr_rect(dst_rect_in), src_surface, wine_dbgstr_rect(src_rect_in),
flags, fx, debug_d3dtexturefiltertype(filter)); 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); surface_get_rect(dst_surface, dst_rect_in, &dst_rect);
if (src_surface) if (src_surface)
surface_get_rect(src_surface, src_rect_in, &src_rect); 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 * ...@@ -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), dst_surface, wine_dbgstr_rect(dst_rect), src_surface, wine_dbgstr_rect(src_rect),
flags, fx, debug_d3dtexturefiltertype(filter)); 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. /* First check for the validity of source / destination rectangles.
* This was verified using a test application and by MSDN. */ * This was verified using a test application and by MSDN. */
if (src_rect) if (src_rect)
......
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