Re: [PATCH 2/5] ddraw/tests: Add Direct3D3 test section
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Hi, Your mails ended up in my spam folder for some reason. Google says it has large similarities to other known spam mail, which seems unlikely to me. Am 2015-10-04 um 19:52 schrieb Andrew D'Addesio:
To avoid confusion, CreateDirect3D/ReleaseDirect3D is also renamed to CreateDirect3D7/ReleaseDirect3D7. --- dlls/ddraw/tests/d3d.c | 167 +++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 154 insertions(+), 13 deletions(-) New tests should be added to ddraw*.c, ideally in all ddraw versions that offer the tested feature. The long term goal for d3d.c, dsurface.c, etc is to be migrated to those files.
If you want to modify an existing test in d3d.c please move the existing code to ddraw*.c, then add your new test features to it. These files have some exising helper functions like create_device, so you don't have to take stuff like d3d3_create_objects along. Cheers, Stefan -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJWEh67AAoJEN0/YqbEcdMwGUEQAIskKamXUC/+Kik99/eqbcpp 3SohARAHPivs+bf2GM68dBBeON9SbzlllfH/cIog9Z9oAUr2fGWDUMLQnyb96ANH +g39WlGO/HFEvqBI9B+mLrZO1VQaePwNH6Sv6p4d09OLWlyRa0PfGrImdqxBNwS2 /Z9j9PmHMQ2oV2KAM3vyqAGAX7VrLH+kr/fQqQofLhHGidHhXUZgkpOT67Drwp4/ 98B3QzFgFyo58Z1AWJ2hAJt4PZQ/uLIn3zQdnYzgsC2H3a9maLC2iB0l3CvXeMgi N8Sb+Nazvjtlu7ut6sNc7cOaharjnYLzKjTpqC0IV0TjFysa0BcwXAm1dj660KzK 2RAy6HeTbE4OpgbT+jU482GNTzhKtRX0EmyCIWD1YZV6li5SO4/mkqPp54D14pHK jgnMV689ZCayn+TpdbO2Q30USJD1tI3HwvXFWyweTFeB59ERmtruLJNDUQ3TtWct Wvcg9AMY8PaSFha/fhGis8/HUFmwWnRWt/E4rhVGmA5wLUD9NO7k0sGOxdRja6mE mNs/dE9ibLn3WB9K9NNLylI2W/4ATbUZoypdEb5H4hyejzfvsbj4LK+772qvLEkS +CEqcT5JwXVF2/XaGrXEkIWt1hz8CnGPHDFrylDoXdXBO5LYKkgKuXmBfFV7DU7Y HM8/Zo1J7TZ9r3yZjmm+ =cNFg -----END PGP SIGNATURE-----
On 10/05/2015 01:54 AM, Stefan Dösinger wrote:
Hi,
Your mails ended up in my spam folder for some reason. Google says it has large similarities to other known spam mail, which seems unlikely to me.
Hmm, I hope it's not a problem with my SMTP server having a bad reputation. On 10/05/2015 01:54 AM, Stefan Dösinger wrote:
Am 2015-10-04 um 19:52 schrieb Andrew D'Addesio:
To avoid confusion, CreateDirect3D/ReleaseDirect3D is also renamed to CreateDirect3D7/ReleaseDirect3D7. --- dlls/ddraw/tests/d3d.c | 167 +++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 154 insertions(+), 13 deletions(-) New tests should be added to ddraw*.c, ideally in all ddraw versions that offer the tested feature. The long term goal for d3d.c, dsurface.c, etc is to be migrated to those files.
If you want to modify an existing test in d3d.c please move the existing code to ddraw*.c, then add your new test features to it. These files have some exising helper functions like create_device, so you don't have to take stuff like d3d3_create_objects along.
Cheers, Stefan
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? 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. Unless we just don't care about systems that old; in that case patch #1 is not important and I can remove it as well. Regards, Andrew
-----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-----
participants (2)
-
Andrew D'Addesio -
Stefan Dösinger