[PATCH 2/5] wined3d: Fix the block alignment check in surface_cpu_blt().
Henri Verbeet
hverbeet at codeweavers.com
Wed Jul 11 05:19:02 CDT 2012
---
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;
}
--
1.7.8.6
More information about the wine-patches
mailing list