[PATCH 2/5] ddraw/tests: Add Direct3D3 test section
stefandoesinger at gmail.com
Mon Oct 5 13:47:56 CDT 2015
-----BEGIN PGP SIGNED MESSAGE-----
Am 2015-10-05 um 20:05 schrieb Andrew D'Addesio:
> Sure, I can do that. By a quick eyeballing I see that lots of tests
> are duplicated across ddraw*.c (test_palette_gdi,
> test_palette_alpha, ...). Currently FindDevice is a Direct3D1 test;
> would you want me to duplicate that test for Direct3D 1, 2, 3, & 7
> into ddraw(1|2|3|7).c?
Yes please, if the function exists in all versions. In this particular
case it is especially interesting to test all versions because the bug
you're fixing is related to how the different versions interact.
Note that we put IDirectDraw, IDirect3D, IDirect3DDevice (version 1)
into ddraw1, version 2 into ddraw2. IDirectDraw4 + IDirect3D3 /
IDirect3DDevice3 go into ddraw4, and everything 7 into ddraw7.
One example where all versions doesn't make sense is
test_private_data. The functionality it tests only exists in 4 and 7.
> With this change I can remove patch #3 ("ddraw/tests: Restore
> strings modified by D3D7EnumLifetimeTest"). I wrote patch #3
> because my D3D*EnumTest tests depend on the device strings being
> unchanged (so either D3D7EnumLifetimeTest must occur after my
> EnumTest tests or it must be changed to restore the device strings
> it modifies). If I move the EnumDevices test into ddraw*.c, then I
> no longer need to modify D3D7EnumLifetimeTest, so I can remove
> patch #3.
> I wrote patch #1 ("ddraw/tests: Don't skip d3d1-2 tests if
> DirectDrawCreateEx isn't present") mainly to simplify the
> START_TEST(d3d) function a little bit, in order to keep patch #2
> clear, but it also has the benefit of doing the correct thing (I
> believe currently none of the tests in d3d.c are running in
> systems with DirectX < 7.0; this patch fixes this). So patch #1
> still seems kind of important, but moving CreateDirect3D to
> ddraw1.c would mean moving all of the Direct3D1 tests to ddraw1.c,
> which is a little excessive for my first patchset. So I might want
> to resubmit patch #1 separately.
We don't really care about pre-XP systems anymore, and the testbot
doesn't run anything before Windows 2000. Those always have ddraw7.
However, as this example kinda shows, Windows 98 behavior is sometimes
relevant for games, so keeping the tests runable on Win98 may be a
good idea. But I think Windows 98 can be upgraded to DirectX9, so the
version checks shouldn't be needed there either.
As far as official policy is concerned you can remove all the version
checks from d3d.c, but it doesn't really matter because d3d.c should
go away in the long run.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
-----END PGP SIGNATURE-----
More information about the wine-devel