Henri Verbeet : wined3d: Round rows up to whole blocks for compressed surface blits in BltFast().
Alexandre Julliard
julliard at winehq.org
Wed Jun 10 10:16:58 CDT 2009
Module: wine
Branch: master
Commit: 9d71a5f1e09420bc91d1e5d167f3e5bc0fa97d3b
URL: http://source.winehq.org/git/wine.git/?a=commit;h=9d71a5f1e09420bc91d1e5d167f3e5bc0fa97d3b
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Wed Jun 10 09:44:04 2009 +0200
wined3d: Round rows up to whole blocks for compressed surface blits in BltFast().
---
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;
}
More information about the wine-cvs
mailing list