Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
e1cdc487
Commit
e1cdc487
authored
Mar 31, 2023
by
Giovanni Mascellani
Committed by
Alexandre Julliard
Jul 04, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dxgi/tests: Test that the present count is updated when Present() is called.
parent
1a0c2d6b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
0 deletions
+39
-0
dxgi.c
dlls/dxgi/tests/dxgi.c
+39
-0
No files found.
dlls/dxgi/tests/dxgi.c
View file @
e1cdc487
...
...
@@ -7727,7 +7727,10 @@ static void test_swapchain_present_count(IUnknown *device, BOOL is_d3d12)
};
UINT
present_count
,
expected
;
ID3D12Device
*
d3d12_device
;
ID3D12CommandQueue
*
queue
;
IDXGISwapChain
*
swapchain
;
ID3D12Fence
*
fence
;
unsigned
int
i
;
HWND
window
;
HRESULT
hr
;
...
...
@@ -7785,6 +7788,42 @@ static void test_swapchain_present_count(IUnknown *device, BOOL is_d3d12)
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
ok
(
present_count
==
expected
,
"Got unexpected present count %u, expected %u.
\n
"
,
present_count
,
expected
);
if
(
is_d3d12
)
{
hr
=
IUnknown_QueryInterface
(
device
,
&
IID_ID3D12CommandQueue
,
(
void
**
)
&
queue
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
hr
=
ID3D12CommandQueue_GetDevice
(
queue
,
&
IID_ID3D12Device
,
(
void
**
)
&
d3d12_device
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
hr
=
ID3D12Device_CreateFence
(
d3d12_device
,
0
,
0
,
&
IID_ID3D12Fence
,
(
void
**
)
&
fence
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
hr
=
ID3D12CommandQueue_Wait
(
queue
,
fence
,
1
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
/* The present count is updated when Present() is called,
* not when frames are presented. */
hr
=
IDXGISwapChain_Present
(
swapchain
,
0
,
0
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
expected
=
present_count
+
1
;
hr
=
IDXGISwapChain_GetLastPresentCount
(
swapchain
,
&
present_count
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
ok
(
present_count
==
expected
,
"Got unexpected present count %u, expected %u.
\n
"
,
present_count
,
expected
);
hr
=
ID3D12Fence_Signal
(
fence
,
1
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
expected
=
present_count
;
hr
=
IDXGISwapChain_GetLastPresentCount
(
swapchain
,
&
present_count
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
ok
(
present_count
==
expected
,
"Got unexpected present count %u, expected %u.
\n
"
,
present_count
,
expected
);
ID3D12Fence_Release
(
fence
);
ID3D12Device_Release
(
d3d12_device
);
ID3D12CommandQueue_Release
(
queue
);
}
IDXGISwapChain_Release
(
swapchain
);
}
...
...
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