[PATCH 2/5] ddraw/tests: Add Direct3D3 test section

Stefan Dösinger stefandoesinger at gmail.com
Mon Oct 5 13:47:56 CDT 2015


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

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.
Yup

> 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

iQIcBAEBCAAGBQJWEsXcAAoJEN0/YqbEcdMwzKAP/3v8KtDH+Ml3WcC4mc6irV5a
pF4HaysUFh2MMZIEP0Mgb/JCjtO2F73JBwhxA259WGi0Nxk1YOmsnaP8Qm7ufH/l
JP7FEbfa+RKsuttN+FhwJ/GlRfwxRf/y7GUJHcfUqo/a2WdOfS8jZ1WUB03AivGa
RHJBrmAgmgf3tH4Gfah0y0cEaYKoWYYLc+rhzv0YXtyD4PF2Epay6m3QX5QEacw8
FkEWMdyw9FX0mGDopjl4iW3Yp8LqF9sdV/xefvgOcnKULA5PPJbe+tYuEpSgfICJ
0Jbm7x6g4B5p6ntPK+q7NKVh6Z7bk8fnbqMilBGRXx0rt7JSHqXG9vS901eL4FcV
E4lDDtFcBF4CDRMaB/sp4zuCUFpjzMjHA/nBEAYJhdB56KlkWR6UEkKJPajLT3a9
sWqC1ovU/1Cj+4cX6o3uluCPeBRcg0Iu06XC/vOX2Zfw7zPBqkgbkB5Y1AHlwbPB
xYhfvmHDzHmA8++bJ7asbyJcpEuPS15bgFzutVAkMNZ6zIeyc7uZ7qA+svaXN3nC
b7XT6YumWmx387JA4Xdv/x4dr1eP6QNNJTqem7eEPJyhhrtEWRUlxsC2vLv2mhDf
XX5BXMRobh663jA91jPEdurEMqbo1iOTZw/WqnkjbmVNH3TFGToZ1jvRm6o95MOl
nsQ84G5FB8GOhJx2pJoH
=cY30
-----END PGP SIGNATURE-----



More information about the wine-devel mailing list