[2/4] ddraw: Add more tests and fixes for SetSurfaceDesc
Stefan Dösinger
stefandoesinger at gmx.at
Tue Nov 15 16:23:06 CST 2011
On Tuesday 15 November 2011 20:53:43 Henri Verbeet wrote:
> It's probably ok to ignore the more obscure cases of getting an
> earlier interface through QI on a newer interface, but I think we
> should at least test version differences for interfaces originally
> created with a particular version.
Keep in mind that IDirectDrawSurface is created by IDirectDraw and
IDirectDraw2. IDirectDrawSurface2 and IDirectDrawSurface3 are only available
via QueryInterface. One would expect that apps create them via IDirectDraw2,
but nothing in the API suggests that, other than that IDirectDraw2 was
available by the time IDirectDrawSurface2 was introduced.
Even with just one test copy per IDirectDraw*X interface it'll probably triple
the size of overlay.c, ddrawmodes.c and dsurface.c by creating essentially
copypasted versions of all tests(excluding those that exist in higher
interfaces only).
The IDirect3D and IDirect3DDevice tests can only be handled by cloning the
tests because the API differences between the IDirect3DDevice versions are too
big. You can't even QI the IDirect3DDevice interfaces from each other(needs
fixing in Wine).
My idea to systematically test all IDirectDraw and IDirectDrawSurface versions
was writing wrapper functions around their methods that take an IUnknown *
pointer and find out which interface version it is via QueryInterface or with
an extra parameter and call the correct method. But I have doubt that this
will work because of structure size differences and because most surface tests
have to create the surfaces themselves.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20111115/7674671a/attachment.pgp>
More information about the wine-devel
mailing list