Zebediah Figura : d3d9/tests: Reorder two occlusion query tests to work around a timeout with llvmpipe.
Alexandre Julliard
julliard at winehq.org
Mon Nov 4 16:40:26 CST 2019
Module: wine
Branch: master
Commit: b2165875771a3a2f9173ccddc8f36d17829f3519
URL: https://source.winehq.org/git/wine.git/?a=commit;h=b2165875771a3a2f9173ccddc8f36d17829f3519
Author: Zebediah Figura <z.figura12 at gmail.com>
Date: Sun Nov 3 20:44:07 2019 -0600
d3d9/tests: Reorder two occlusion query tests to work around a timeout with llvmpipe.
llvmpipe is extraordinarily slow to execute glBeginQuery() [as much as 10ms per
call] when the regression test for bug 45932 is run after the previous test
drawing a 33-bit number of samples. Swap the two tests to work around this.
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/d3d9/tests/device.c | 40 ++++++++++++++++++++--------------------
1 file changed, 20 insertions(+), 20 deletions(-)
diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c
index 40ca639001..75cddbb6db 100644
--- a/dlls/d3d9/tests/device.c
+++ b/dlls/d3d9/tests/device.c
@@ -6007,6 +6007,26 @@ static void test_occlusion_query(void)
if (broken_occlusion)
goto done;
+ hr = IDirect3DDevice9_BeginScene(device);
+ ok(hr == D3D_OK, "Failed to begin scene, hr %#x.\n", hr);
+ for (i = 0; i < 50000; ++i)
+ {
+ hr = IDirect3DQuery9_Issue(query, D3DISSUE_BEGIN);
+ ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
+ hr = IDirect3DQuery9_Issue(query, D3DISSUE_END);
+ ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
+ }
+ hr = IDirect3DDevice9_EndScene(device);
+ ok(hr == D3D_OK, "Failed to end scene, hr %#x.\n", hr);
+
+ wait_query(query);
+
+ memset(&data, 0xff, sizeof(data));
+ hr = IDirect3DQuery9_GetData(query, &data, sizeof(data), D3DGETDATA_FLUSH);
+ ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(data.dword[0] == 0 && data.dword[1] == 0,
+ "Got unexpected query result 0x%08x%08x.\n", data.dword[1], data.dword[0]);
+
hr = IDirect3DDevice9_GetDeviceCaps(device, &caps);
ok(SUCCEEDED(hr), "Failed to get device caps, hr %#x.\n", hr);
@@ -6062,26 +6082,6 @@ static void test_occlusion_query(void)
|| broken(data.dword[0] < 0xffffffff && !data.dword[1]),
"Got unexpected query result 0x%08x%08x.\n", data.dword[1], data.dword[0]);
- hr = IDirect3DDevice9_BeginScene(device);
- ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr);
- for (i = 0; i < 50000; ++i)
- {
- hr = IDirect3DQuery9_Issue(query, D3DISSUE_BEGIN);
- ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
- hr = IDirect3DQuery9_Issue(query, D3DISSUE_END);
- ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
- }
- hr = IDirect3DDevice9_EndScene(device);
- ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr);
-
- wait_query(query);
-
- memset(&data, 0xff, sizeof(data));
- hr = IDirect3DQuery9_GetData(query, &data, sizeof(data), D3DGETDATA_FLUSH);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
- ok(data.dword[0] == 0 && data.dword[1] == 0,
- "Got unexpected query result 0x%08x%08x.\n", data.dword[1], data.dword[0]);
-
IDirect3DSurface9_Release(rt);
done:
More information about the wine-cvs
mailing list