wined3d: Pitch alignment for the pow2Size.

This commit is contained in:
Stefan Dösinger 2006-10-05 21:38:00 +02:00 committed by Alexandre Julliard
parent d45c16ba98
commit 6bcc5ae9f7
1 changed files with 2 additions and 1 deletions

View File

@ -1053,7 +1053,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateSurface(IWineD3DDevice *iface, U
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;