Module: wine Branch: master Commit: 6bcc5ae9f75ce4adc8650329f76b5aff7d654cdd URL: http://source.winehq.org/git/wine.git/?a=commit;h=6bcc5ae9f75ce4adc8650329f7...
Author: Stefan Dösinger stefan@codeweavers.com Date: Thu Oct 5 21:38:00 2006 +0200
wined3d: Pitch alignment for the pow2Size.
---
dlls/wined3d/device.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 3ad28f8..13ea67a 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1053,7 +1053,8 @@ static HRESULT WINAPI IWineD3DDeviceImp
if (WINED3DFMT_UNKNOWN != Format) { object->bytesPerPixel = tableEntry->bpp; - object->pow2Size = (pow2Width * object->bytesPerPixel) * pow2Height; + object->pow2Size = ((pow2Width * object->bytesPerPixel) + SURFACE_ALIGNMENT - 1) & ~(SURFACE_ALIGNMENT - 1); + object->pow2Size *= pow2Height; } else { object->bytesPerPixel = 0; object->pow2Size = 0;