wined3d: Fix mipmap level count.

This commit is contained in:
Ivan Gyurdiev 2006-04-21 04:21:47 -04:00 committed by Alexandre Julliard
parent 744f3ae1c4
commit 1e86752812
1 changed files with 2 additions and 2 deletions

View File

@ -811,7 +811,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateTexture(IWineD3DDevice *iface, UINT Wid
object->baseTexture.levels++;
tmpW = Width;
tmpH = Height;
while (tmpW > 1 && tmpH > 1) {
while (tmpW > 1 || tmpH > 1) {
tmpW = max(1, tmpW >> 1);
tmpH = max(1, tmpH >> 1);
object->baseTexture.levels++;
@ -889,7 +889,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateVolumeTexture(IWineD3DDevice *iface,
tmpW = Width;
tmpH = Height;
tmpD = Depth;
while (tmpW > 1 && tmpH > 1 && tmpD > 1) {
while (tmpW > 1 || tmpH > 1 || tmpD > 1) {
tmpW = max(1, tmpW >> 1);
tmpH = max(1, tmpH >> 1);
tmpD = max(1, tmpD >> 1);