Henri Verbeet : wined3d: Fix the block alignment check in surface_cpu_blt() .
Alexandre Julliard
julliard at winehq.org
Wed Jul 11 17:39:19 CDT 2012
Module: wine
Branch: master
Commit: d26a3858d918520c58b5d1e597dabe428a58898a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d26a3858d918520c58b5d1e597dabe428a58898a
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Wed Jul 11 12:19:02 2012 +0200
wined3d: Fix the block alignment check in surface_cpu_blt().
---
dlls/wined3d/surface.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 91ebcca..ea0baa4 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -6699,9 +6699,16 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *
goto release;
}
- if (srcwidth & (src_format->block_width - 1) || srcheight & (src_format->block_height - 1))
+ if (!surface_check_block_align(src_surface, src_rect))
{
- WARN("Rectangle not block-aligned.\n");
+ WARN("Source rectangle not block-aligned.\n");
+ hr = WINED3DERR_INVALIDCALL;
+ goto release;
+ }
+
+ if (!surface_check_block_align(dst_surface, dst_rect))
+ {
+ WARN("Destination rectangle not block-aligned.\n");
hr = WINED3DERR_INVALIDCALL;
goto release;
}
More information about the wine-cvs
mailing list