[WINESYNC] d3dx9: Correctly align texture dimensions to block size in D3DXCheckTextureRequirements().

Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id f6f90daa3117cf493e0815c42bb0fa1740d31308 by Christian Costa <titan.costa@gmail.com>
This commit is contained in:
winesync 2020-09-21 23:00:51 +02:00 committed by Jérôme Gardou
parent d2eac4cdbf
commit 03f8174d97
3 changed files with 17 additions and 9 deletions

View file

@ -448,6 +448,15 @@ static void test_D3DXCheckTextureRequirements(IDirect3DDevice9 *device)
ok(width == 4, "Got unexpected width %d.\n", width);
ok(height == 4, "Got unexpected height %d.\n", height);
ok(format == D3DFMT_DXT5, "Got unexpected format %u.\n", format);
width = 9;
height = 9;
hr = D3DXCheckTextureRequirements(device, &width, &height, &mipmaps, 0, &format, D3DPOOL_DEFAULT);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
ok(width == 12, "Got unexpected width %u.\n", width);
ok(height == 12, "Got unexpected height %u.\n", height);
ok(mipmaps == 1, "Got unexpected level count %u.\n", mipmaps);
ok(format == D3DFMT_DXT5, "Got unexpected format %u.\n", format);
}
else
{