wined3d: Pitch alignment for the pow2Size.
This commit is contained in:
parent
d45c16ba98
commit
6bcc5ae9f7
|
@ -1053,7 +1053,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateSurface(IWineD3DDevice *iface, U
|
||||||
|
|
||||||
if (WINED3DFMT_UNKNOWN != Format) {
|
if (WINED3DFMT_UNKNOWN != Format) {
|
||||||
object->bytesPerPixel = tableEntry->bpp;
|
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 {
|
} else {
|
||||||
object->bytesPerPixel = 0;
|
object->bytesPerPixel = 0;
|
||||||
object->pow2Size = 0;
|
object->pow2Size = 0;
|
||||||
|
|
Loading…
Reference in New Issue