[PATCH 4/5] d3d9/tests: Add a test for ATI1N and ATI2N texture formats.

Henri Verbeet hverbeet at gmail.com
Thu Oct 30 05:45:41 CDT 2014


On 29 October 2014 18:01, Matteo Bruni <mbruni at codeweavers.com> wrote:
> @@ -6145,6 +6145,7 @@ static void test_lockrect_offset(void)
>          {D3DFMT_DXT3,                 "D3DFMT_DXT3", 4, 4, 16},
>          {D3DFMT_DXT4,                 "D3DFMT_DXT4", 4, 4, 16},
>          {D3DFMT_DXT5,                 "D3DFMT_DXT5", 4, 4, 16},
> +        {MAKEFOURCC('A','T','I','1'), "ATI1N",       1, 1,  1},
>          {MAKEFOURCC('A','T','I','2'), "ATI2N",       1, 1,  1},
Mostly just curiosity, but there are other tests in device.c for
ATI2N, any reason for not adding ATI1N coverage to those as well?

> +    static const DWORD expected_colors_ati[] = {0x003f3f3f, 0x003f3f3f, 0x00007fff, 0x007f00ff};
> +    static const DWORD expected_colors_nvidia[] = {0x007f0000, 0x007f0000, 0x00007fff, 0x007f00ff};
Conceptually I might have preferred this as

    static const struct
    {
       struct vec2 position;
       D3DCOLOR amd;
       D3DCOLOR nvidia;
    }
    expected_colors[]
    {
       ...
    }

but it's not a big deal.

> +    for (i = 0; i < 4; ++i)
> +    {
> +        color = getPixelColor(device, 80 + 160 * i, 240);
> +        trace("Got 0x%08x.\n", color);
Is this leftover debug code?



More information about the wine-devel mailing list