-----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 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 :-\ .