[PATCH 6/6] ddraw/tests: Add some color key tests for complex surfaces.

Stefan Dösinger stefandoesinger at gmail.com
Thu Jan 9 06:06:59 CST 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am 2014-01-09 12:17, schrieb Henri Verbeet:
> +    hr = IDirectDrawSurface7_GetAttachedSurface(surface, &caps,
> &tmp); +    ok(SUCCEEDED(hr), "Failed to get attached surface, hr
> %#x.\n", hr); +    hr = IDirectDrawSurface7_GetColorKey(tmp,
> DDCKEY_SRCBLT, &color_key); +    ok(hr == DDERR_NOCOLORKEY, "Got
> unexpected hr %#x, i %u.\n", hr, i); + +
> color_key.dwColorSpaceLowValue = 0x0000ff00; +
> color_key.dwColorSpaceHighValue = 0x0000ff00; +    hr =
> IDirectDrawSurface7_SetColorKey(surface, DDCKEY_SRCBLT,
> &color_key); +    ok(SUCCEEDED(hr), "Failed to set color key, hr
> %#x.\n", hr); +    memset(&color_key, 0, sizeof(color_key)); +
> hr = IDirectDrawSurface7_GetColorKey(surface, DDCKEY_SRCBLT,
> &color_key); +    ok(SUCCEEDED(hr), "Failed to get color key, hr
> %#x.\n", hr); +    ok(color_key.dwColorSpaceLowValue == 0x0000ff00,
> "Got unexpected value 0x%08x.\n", +
> color_key.dwColorSpaceLowValue); +
> ok(color_key.dwColorSpaceHighValue == 0x0000ff00, "Got unexpected
> value 0x%08x.\n", +            color_key.dwColorSpaceHighValue); + 
> +    IDirectDrawSurface_Release(tmp);
Did you mean to call SetColorKey and GetColorKey on tmp instead of
surface here?

For the sake of completion it might be interesting to test SetColorKey
on cube textures. 5 of the faces are attached to a root surface but
aren't mipmap sublevels. (I guess it'll still return
DDERR_NOTONMIPMAPSUBLEVEL.)

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJSzpDjAAoJEN0/YqbEcdMwyl0P/3OHO0kK93dh6XdY1RU9IvNv
BASe8YHhv1a6rRxYNGDzGoX5bsnefWLcqUnsWsGGjlxdA13BxAB4NCenaMecu49v
d3egCH547Bd94K/9wqqlDxl+aEe0Hh86Ig9t0LNBuruNh1hNKTG9OdohzJBuX1VD
TcVYRv6S8wEwM2Gb24RL8wN359497vn58G3fAVxK7PiK/edqxlDTg+6oi6P0/L+x
HLGFlSVL9bgtxpwAUVh3i9SRsnA6iS07qPmSHOXdoCz/OhoY29Lx7HLFRCOgUbJS
XAo00HKWP+qB4myqt3Iir9QgtiFLFZiyBBn0HQQEWGeRsDpZTazH/EMZrbUPhP03
f9AiW/r7XX5fOoRG5HBv7i/eXdOw6XexVLEyXb57sEilNJfBF3ux2wDw/E34AiGT
wUTkgY2VwjgaxNl022qsFYz6fboORwbQm0VyvWzxbKw7326pdt6Y3Q2WTvPEQ5Rk
JvlVJ8McRzkrYU5hXjRW1D7/2rVmV8z+xGGi6IU1JoS3PBWIYMKjUDRlFg0n+JQG
UzLnJcnxm/js8Ah4R8MWje1v4cq3TlKnc7WrMIwNtu3Wmvwjo34s4A84xdVPneY/
jIqgUGFBOeH/XnK+FAdU+ZFuUn4k/ttVNOuSrPe5HsZxc1uxGnec5OtuZB8FTjFH
EH0rn+AxEiyaGPON+4w6
=GtY2
-----END PGP SIGNATURE-----



More information about the wine-devel mailing list