d3dx9_36: Align texture dimensions to block size for compressed textures in D3DXCheckTextureRequirements.

Matteo Bruni matteo.mystral at gmail.com
Mon Mar 23 11:08:53 CDT 2015


2015-03-23 16:54 GMT+01:00 Stefan Dösinger <stefandoesinger at gmail.com>:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 03/23/15 15:50, Sebastian Lackner wrote:
>> +        format = D3DFMT_DXT5;
>> +        width = 5; height = 5;
>> ...
>> +        ok(mipmaps == 1, "Returned mipmaps %d, expected %d\n", mipmaps, 1);
> I'm curious, why does it report 1 mipmap level? Maybe because width / 2
> is smaller than the block size, even though the block-size aligned width
> would allow a second level. What does d3dx9 return when you have width =
> height = 10 for example?

It should just be because mipmaps was set to 1 before calling
D3DXCheckTextureRequirements() (it's an input/output parameter). It
would be interesting to check that you get 4 levels if mipmaps is set
to 0 though.



More information about the wine-devel mailing list