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
54bf9a93
Commit
54bf9a93
authored
Mar 10, 2023
by
Giovanni Mascellani
Committed by
Alexandre Julliard
Apr 05, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dxgi: Return a duplicate frame latency event.
parent
c6c06581
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
3 deletions
+31
-3
swapchain.c
dlls/dxgi/swapchain.c
+15
-1
dxgi.c
dlls/dxgi/tests/dxgi.c
+16
-2
No files found.
dlls/dxgi/swapchain.c
View file @
54bf9a93
...
...
@@ -2564,10 +2564,24 @@ static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetMaximumFrameLatency(IDXGISwa
static
HANDLE
STDMETHODCALLTYPE
d3d12_swapchain_GetFrameLatencyWaitableObject
(
IDXGISwapChain4
*
iface
)
{
struct
d3d12_swapchain
*
swapchain
=
d3d12_swapchain_from_IDXGISwapChain4
(
iface
);
HANDLE
dup
;
BOOL
ret
;
TRACE
(
"iface %p.
\n
"
,
iface
);
return
swapchain
->
frame_latency_event
;
if
(
!
swapchain
->
frame_latency_event
)
return
NULL
;
ret
=
DuplicateHandle
(
GetCurrentProcess
(),
swapchain
->
frame_latency_event
,
GetCurrentProcess
(),
&
dup
,
0
,
FALSE
,
DUPLICATE_SAME_ACCESS
);
if
(
!
ret
)
{
ERR
(
"Cannot duplicate handle, last error %lu.
\n
"
,
GetLastError
());
return
NULL
;
}
return
dup
;
}
static
HRESULT
STDMETHODCALLTYPE
d3d12_swapchain_SetMatrixTransform
(
IDXGISwapChain4
*
iface
,
...
...
dlls/dxgi/tests/dxgi.c
View file @
54bf9a93
...
...
@@ -6981,13 +6981,14 @@ static void test_frame_latency_event(IUnknown *device, BOOL is_d3d12)
IDXGISwapChain1
*
swapchain1
;
IDXGIFactory2
*
factory2
;
IDXGIFactory
*
factory
;
HANDLE
event
,
event2
;
UINT
frame_latency
;
DWORD
wait_result
;
ULONG
ref_count
;
unsigned
int
i
;
HANDLE
event
;
HWND
window
;
HRESULT
hr
;
BOOL
ret
;
get_factory
(
device
,
is_d3d12
,
&
factory
);
...
...
@@ -7052,7 +7053,20 @@ static void test_frame_latency_event(IUnknown *device, BOOL is_d3d12)
IDXGISwapChain1_Release
(
swapchain1
);
event
=
IDXGISwapChain2_GetFrameLatencyWaitableObject
(
swapchain2
);
ok
(
!!
event
,
"Got unexpected event %p.
\n
"
,
event
);
ok
(
!!
event
,
"Got unexpected NULL event.
\n
"
);
/* a new duplicate handle is returned each time */
event2
=
IDXGISwapChain2_GetFrameLatencyWaitableObject
(
swapchain2
);
ok
(
!!
event2
,
"Got unexpected NULL event.
\n
"
);
ok
(
event
!=
event2
,
"Got the same event twice %p.
\n
"
,
event
);
ret
=
CloseHandle
(
event
);
ok
(
!!
ret
,
"Failed to close handle, last error %lu.
\n
"
,
GetLastError
());
ret
=
CloseHandle
(
event2
);
ok
(
!!
ret
,
"Failed to close handle, last error %lu.
\n
"
,
GetLastError
());
event
=
IDXGISwapChain2_GetFrameLatencyWaitableObject
(
swapchain2
);
ok
(
!!
event
,
"Got unexpected NULL event.
\n
"
);
/* auto-reset event */
wait_result
=
WaitForSingleObject
(
event
,
0
);
...
...
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