Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
1356f253
Commit
1356f253
authored
Aug 29, 2023
by
Stefan Dösinger
Committed by
Alexandre Julliard
Sep 05, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9/tests: Skip big test_query loops if the d3d implementation is too slow.
parent
b3edb269
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
0 deletions
+36
-0
device.c
dlls/d3d9/tests/device.c
+36
-0
No files found.
dlls/d3d9/tests/device.c
View file @
1356f253
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment