[PATCH 1/5] d3d8/tests: Add cnd instruction test.

Henri Verbeet hverbeet at gmail.com
Tue Sep 3 06:20:52 CDT 2013


On 2 September 2013 23:04, Matteo Bruni <mbruni at codeweavers.com> wrote:
> +    float quad1[] = {
> +        -1.0,   -1.0,   0.1,     0.0,    0.0,    1.0,
> +         0.0,   -1.0,   0.1,     1.0,    0.0,    1.0,
> +        -1.0,    0.0,   0.1,     0.0,    1.0,    0.0,
> +         0.0,    0.0,   0.1,     1.0,    1.0,    0.0
> +    };
I think that should be static const, and could do with an 'f' suffix
on the literals.

> +    ok(hr == D3D_OK, "IDirect3DDevice8_BeginScene returned %08x\n", hr);
> +    if(SUCCEEDED(hr))
> +    {
I think the if block is pointless.

> +    /* 1.1 shader. All 3 components get set, based on the .w comparison */
> +    color = getPixelColor(device, 158, 358);
> +    ok(color == 0x00ffffff, "pixel 158, 358 has color %08x, expected 0x00ffffff\n", color);
> +    color = getPixelColor(device, 162, 358);
> +    ok( (((color & 0x00ff0000) >> 16) <= 0x01) && (((color & 0x0000ff00) >> 8) <= 0x01) && ((color & 0x000000ff) <= 0x01),
> +        "pixel 162, 358 has color %08x, expected 0x00000000\n", color);
I think that should use color_match().

I realize those are all present in the original test, but that's more
of a reason to fix the original instead of copying it.



More information about the wine-devel mailing list