Henri Verbeet : wined3d: Check for locked surfaces in wined3d_surface_blt() .
Alexandre Julliard
julliard at winehq.org
Tue Aug 2 14:18:24 CDT 2011
Module: wine
Branch: master
Commit: 4bdd4ef45ba59e7add4f611ca67ab5995d7bf85b
URL: http://source.winehq.org/git/wine.git/?a=commit;h=4bdd4ef45ba59e7add4f611ca67ab5995d7bf85b
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Mon Aug 1 21:35:43 2011 +0200
wined3d: Check for locked surfaces in wined3d_surface_blt().
---
dlls/wined3d/surface.c | 18 ++++++------------
1 files changed, 6 insertions(+), 12 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 617704e..beafa3a 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -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)
More information about the wine-cvs
mailing list