Commit 6bcc5ae9 authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

wined3d: Pitch alignment for the pow2Size.

parent d45c16ba
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment