The issue can be reproduced with LIBGL_ALWAYS_SOFTWARE=1 on Mesa. The Gitlab machines are affected.
-- v2: d3d9/tests: Skip big test_query loops if the d3d implementation is too slow.
From: Stefan Dösinger stefan@codeweavers.com
--- dlls/d3d9/tests/device.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+)
diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c index 8ab52c7d5e4..8284e3365c8 100644 --- a/dlls/d3d9/tests/device.c +++ b/dlls/d3d9/tests/device.c @@ -6431,6 +6431,7 @@ static void test_occlusion_query(void) }; unsigned int data_size, i, count; struct device_desc device_desc; + LARGE_INTEGER start, end, freq; IDirect3DQuery9 *query = NULL; IDirect3DDevice9 *device; IDirect3DSurface9 *rt; @@ -6438,6 +6439,7 @@ static void test_occlusion_query(void) D3DVIEWPORT9 vp; ULONG refcount; D3DCAPS9 caps; + DWORD elapsed; HWND window; HRESULT hr; union @@ -6448,6 +6450,7 @@ static void test_occlusion_query(void) } data, expected; BOOL broken_occlusion = FALSE; expected.uint = registry_mode.dmPelsWidth * registry_mode.dmPelsHeight; + QueryPerformanceFrequency(&freq);
window = create_window(); d3d9 = Direct3DCreate9(D3D_SDK_VERSION); @@ -6578,6 +6581,39 @@ static void test_occlusion_query(void) if (broken_occlusion) goto done;
+ /* On my system (MacBookPro14,3 - Radeon 560M, i7-7920HQ), this loop + * takes about 20 ms with HW rendering and 160 ms with mesa software. + * I can't reliably read timings smaller than 20 ms though, so don't + * reduce the test count too much. + * + * wait_query() times out after 5 seconds, so if the 1000 iteration + * loop takes more than 100 ms the full test is bound to fail. I put + * it to 70 ms below to avoid flaky failures if e.g. a CI machine + * has CPU load from other processes. */ + QueryPerformanceCounter(&start); + hr = IDirect3DDevice9_BeginScene(device); + ok(hr == D3D_OK, "Failed to begin scene, hr %#lx.\n", hr); + for (i = 0; i < 1000; ++i) + { + hr = IDirect3DQuery9_Issue(query, D3DISSUE_BEGIN); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); + hr = IDirect3DQuery9_Issue(query, D3DISSUE_END); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); + } + hr = IDirect3DDevice9_EndScene(device); + ok(hr == D3D_OK, "Failed to end scene, hr %#lx.\n", hr); + + wait_query(query); + QueryPerformanceCounter(&end); + + elapsed = (end.QuadPart - start.QuadPart) * 1000 / freq.QuadPart; + + if (elapsed > 70) + { + skip("Test loop took too long (%lu ms), skipping large query tests.\n", elapsed); + goto done; + } + hr = IDirect3DDevice9_BeginScene(device); ok(hr == D3D_OK, "Failed to begin scene, hr %#lx.\n", hr); for (i = 0; i < 50000; ++i)
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=136865
Your paranoid android.
=== w10pro64 (32 bit report) ===
d3d9: device.c:4159: Test failed: Expected message 0x46 for window 0x1, but didn't receive it, i=0. device.c:4203: Test failed: Expected message 0x7e for window 0, but didn't receive it, i=0. device.c:4207: Test failed: The device window is active, i=0. device.c:4212: Test failed: Got unexpected hr 0x88760869. device.c:4216: Test failed: Got unexpected screen size 800x600. device.c:4242: Test failed: Expected message 0x1c for window 0x1, but didn't receive it, i=0. device.c:4251: Test failed: Got unexpected screen size 800x600. device.c:4268: Test failed: Expected message 0x7e for window 0, but didn't receive it, i=0. device.c:4276: Test failed: Got unexpected width 640. device.c:4277: Test failed: Got unexpected height 480. device.c:4358: Test failed: Expected message 0x7e for window 0x1, but didn't receive it, i=0. device.c:4365: Test failed: Expected IsIconic 1, got 0, i=0. device.c:4369: Test failed: Got unexpected hr 0. device.c:4377: Test failed: Expected message 0x46 for window 0x1, but didn't receive it, i=0. device.c:4415: Test failed: Expected message 0x1c for window 0x1, but didn't receive it, i=0. device.c:4425: Test failed: Got unexpected hr 0.
This merge request was approved by Zebediah Figura.
This merge request was approved by Jan Sikorski.