Re: [PATCH] ddraw: add dsurface dimension tests, try 7
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, Thanks for the patch. I'll test it on my Windows boxes as soon as they're done with Linux updates (Gentoo...) and report any failures I find. Am 2014-04-03 17:54, schrieb Patrick Rudolph: + window = CreateWindowA("static", "ddraw_test", WS_OVERLAPPEDWINDOW, + 100, 100, 160, 160, NULL, NULL, NULL, NULL); + + if (!(ddraw = create_ddraw())) + { + skip("Failed to create a ddraw object, skipping test.\n"); + return; + } You no longer need the skip check here. The main functions in ddraw1-ddraw7 check if ddraw creation succeeds and skip all tests if it doesn't + + ret = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); + + ddcaps.dwSize = sizeof(DDCAPS); You're not checking the return value here. I also recommend to rename "ret" to "hr" for consistency with other tests. + ret = IDirectDraw_GetCaps(ddraw, &ddcaps, NULL); + if (ret != DD_OK) + { + skip("IDirectDraw_GetCaps failed with %08x\n", ret); + return; + } Do you have hardware where GetCaps fails? If not, a simple ok(SUCCEEDED(hr), ...) should be enough. +#if _WIN64 || __x86_64__ || __ppc64__ + { + MEMORYSTATUSEX statex; + statex.dwLength = sizeof (statex); + GlobalMemoryStatusEx (&statex); + /* on 64bit surfaces with 2GByte+ are possible */ + if(statex.ullAvailVirtual > 0x80000000LL) + tests[10].ret = DD_OK; + } +#endif Is the #if necessary? Afaics GlobalMemoryStatusEx should work on 32 bit as well. In light of the testbot failures I recommend to check for available physical memory as well. I'm also fine with just dropping the SYSMEM out of memory test until we find an application that depends on this behavior. The parenthesis placement after the function call and if are inconsistent. This applies to a few other ifs as well. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJTPmKGAAoJEN0/YqbEcdMwUwEP/A5NCz4xe855Z9jX6iUBWkhw NDhpM/9Wbk5tdekaR3QcrNyCYGCAHnOl/kUsGXeBDwZxCDzRzpfsdpFp0Nux46m+ L/xtf71bhAMYGikeV9r/C+UVBbCslO4KXFcUmx5K43AXcVQGMq+K1yvzhGtKCGZb 6zNCUmhxI2MlNrU9KDp7W7kNhVWMu2ungAjojT5BmaWDgtvS6TWu10jX1rIwQlYF wMOHSIomIBNvPi2vSr8aXLzPhgFCrMg3g8fERUqS3Vk8LJfmJYWJ87hcfPiMGd5A ntDYedg+mhV0ShTk26XCeKMNBfvjcdwWCnHEi1GYmYQ6H/nRDGxkEO/TskiNLuNn IO/rV2TAO9SfzHzHO/VPCGdb6nISGICAP/oA2ryrhINdXtn6eq1kjqQsGUURlqlk Y46P55qgRleYCtqxHjrjhQXDL4anaKj3ApZjGRa9MVC2/SPvIe3UpjlHjN4oeAix ohiOiq7GL/PXXs0zLOKFeVdUoOYpCIuP7MsR/dX9KcJwYQ2U9GT6OEoQPhZT+/B7 Tpv1maEOnn+UCkvcW6BY2eAt3nsznvlKVb73D5t1tLp/LCbKiSqY+8Dk0f75YTyG hEXkawRFLjhXeA6db8ieb2GdftaAnfq1Vxa7wjF4igAccZIhySInrvdnOFhZ4rp+ djHZm23O6ml1uV8Qt0mW =yrSd -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 2014-04-04 09:43, schrieb Stefan Dösinger:
Hi,
Thanks for the patch. I'll test it on my Windows boxes as soon as they're done with Linux updates (Gentoo...) and report any failures I find. And the test results are in - at least on Windows 7 + Nvidia: The 32 bit tests pass. If built with Win64, test 9 succeeds with D3DFMT_P8. The surface is 4 GB in size, and my machine has 16 GB of physical memory and I think swap is enabled as well. I think the R5G6B5 test should succeed as well, but for some reason it doesn't.
I recommend to drop the out of memory tests from this patch. If I understand the original problem correctly the test is not needed for what you actually want to fix. You can add it in a separate patch if you want to. Unfortunately my 3 Radeon boxes aren't working at the moment :-\ . -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJTPmgHAAoJEN0/YqbEcdMwMwYP/A8Nqv1DNEkqbUQNvfy0cngp S7GO1+kM6gg7ATMZx9aZe6mSKCDMKMgiDmtpNu0YvOQrupWuvQxN7/j8UctdL3Wu 49d9WwnbkHNMV3LrQgYkGd+AwKcPGyNul/Epk/LJUEueBq7AmC/SmWDdlbUQEMd6 rKhgnkibxtXmVd4xHUEMEaAcUeh/PE1HrQtCqFyQnaPoL8SkeCzq6niU7n+qPkd1 AUZhImG3TeSxFR3Go8B1isfmzPc+fUFMIZdIN3JSTdpuJJDy4e6OlcP8Obw3W11V LP5TrHxRoSB7KbeV4r+h90/Z9bkSW9JJBL86X06lW2s2R9njytuuOW6kek7wiJlJ Guz1YetP6FxOb34d3ktAjNsqqO+KB01kJM8MIRgwNt4jxHjyT7MgWbIxA9VJxlbK y/7epq5Ntsfy3ZPbHoATqyAvUSX4EBhQiN7no3i6S5KSLr4djZoQDUomwBwm+kSG H8tmwh5SG+vDunzKC7rkizpgHI2ZOJNXxd7EMP+oYQbwOSXB8nVdQt+2CeuG82iW ExhBuMajISiEAE1kOqHf8X4m1AdXjXlO6Jdgj2RxaBN5zKNYzj4SiMQY60GaG/d0 Nxj2EFh4ORnseMIdg/F+yc4j+zoAqBfM+b1uuTQ15zqcOFuBr46c+9dBo1rZzhg3 2g43P5u9DJHIjUQjIGLP =Ng8h -----END PGP SIGNATURE-----
participants (1)
-
Stefan Dösinger