wined3d: Round rows up to whole blocks for compressed surface blits in BltFast().
Henri Verbeet
hverbeet at codeweavers.com
Wed Jun 10 02:44:04 CDT 2009
---
dlls/wined3d/surface_base.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/dlls/wined3d/surface_base.c b/dlls/wined3d/surface_base.c
index d487f80..50faf9a 100644
--- a/dlls/wined3d/surface_base.c
+++ b/dlls/wined3d/surface_base.c
@@ -1656,6 +1656,7 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_BltFast(IWineD3DSurface *iface, DWORD dst
UINT block_width;
UINT block_height;
UINT block_byte_size;
+ UINT row_block_count;
TRACE("Fourcc -> Fourcc copy\n");
if (trans)
@@ -1692,9 +1693,10 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_BltFast(IWineD3DSurface *iface, DWORD dst
block_byte_size = This->resource.format_desc->byte_count;
}
+ row_block_count = (w + block_width - 1) / block_width;
for (y = 0; y < h; y += block_height)
{
- memcpy(dbuf, sbuf, (w / block_width) * block_byte_size);
+ memcpy(dbuf, sbuf, row_block_count * block_byte_size);
dbuf += dlock.Pitch;
sbuf += slock.Pitch;
}
--
1.6.0.6
--------------020007070107080801090502--
More information about the wine-patches
mailing list