[PATCH 4/8] d3d9/tests: add test for surface preload

Stefan Dösinger stefandoesinger at gmail.com
Wed Sep 9 15:40:33 CDT 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hi,

I have some nitpicky style comments. I don't demand that they are
addressed, I'm ok with the patch as it is if Henri accepts it.

> +    IDirect3DSurface9 *backbuffer, *stencilsurface, *offscreensurface, *rendertarget, *rendertarget2;
You shouldn't need the two rendertarget variables. In fact, one common
surface variable should do, and I don't think it would make the test
more difficult to read.

> +    hr = IDirect3DDevice9_GetRenderTarget(device, 0, &rendertarget);
> +    ok(SUCCEEDED(hr), "GetRenderTarget failed, hr %#x.\n", hr);
> +    IDirect3DSurface9_PreLoad(rendertarget);
> +    IDirect3DSurface9_Release(rendertarget);
We already know from other tests that on device creation backbuffer 0
is the render target. I don't think it's necessary to explicitly test
render target 0.

> +    hr = IDirect3DDevice9_GetBackBuffer(device, 0, 0, 0, &backbuffer);
"D3DBACKBUFFER_TYPE_MONO" would be better than "0". Yeah, I know many
other tests use 0, and I just sent a patch that shows that this
parameter is just ignored...

Cheers,
Stefan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJV8JlBAAoJEN0/YqbEcdMwNCkP/2aqOA8gTfOb1kE4GkaiKRYk
L6sks0mVbtu0nDG/futVUEFniYzQEJNNOabBi/2vcIWFKIOpGALlKGFxbXc3MRC/
+TEIMYq9p1iOsDL1T3tMx+tR39vfG3nFh+FNcZe0nDzT1PmWU5egAdp+IXzY/rR1
qPMQiyFF3ppbvgPi16WAWvnDqHao4+YGoAUFtiiZEBKF8+xA3LiUimuyJnaHYUWj
6caXL1e/DLE/6o7dlJr1YbDmA6IDUYAi029ANv45Upyhf8VCBknpQ1YShRJ+Wt6m
g96I/lRtLCpYq8Y8lLTrE6ZD9/8eRkUIxt8jzw8s+gpGtg1wwaR4Y+pzUkrqSRfR
OyTzXAFDTI7hNbHfeUHw1EkrT/Ef2H66g9eoMZYVgDJM9ZmfHvgwENPjClTRO2nZ
5jCt14lhZD3Cpdw8+K6AqgPZVtZGyVs4Z0pkO9w7pcfLHTtuWAKh7NfikzXqzyAE
zBJ/PtOxdY5BooCZ7ZPuQ0Dblz7wt11m+t6Y7+Jkni0qeH+EetDXDaL4G+ZbmV4V
1gZu5QOaFwNDTIrOU8W94R66oCeAx2YryQgejk4PmHN3UHO3GuQ5irUQlfOGZi/z
WO2YZcU3+wCAdZXopgE7kIkaBE+Y2VWKtBUgLGPeiglApaq5SfKncALa5iPACpzN
bmSeigvhzA2FKICkLYil
=9uRC
-----END PGP SIGNATURE-----



More information about the wine-devel mailing list