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
295c577f
Commit
295c577f
authored
Sep 21, 2022
by
Matteo Bruni
Committed by
Alexandre Julliard
Dec 08, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Add a frametime debug channel.
parent
3fc716c9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
1 deletion
+21
-1
cs.c
dlls/wined3d/cs.c
+18
-0
wined3d_private.h
dlls/wined3d/wined3d_private.h
+3
-1
No files found.
dlls/wined3d/cs.c
View file @
295c577f
...
...
@@ -23,6 +23,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d);
WINE_DECLARE_DEBUG_CHANNEL
(
d3d_perf
);
WINE_DECLARE_DEBUG_CHANNEL
(
d3d_sync
);
WINE_DECLARE_DEBUG_CHANNEL
(
fps
);
WINE_DECLARE_DEBUG_CHANNEL
(
frametime
);
static
NTSTATUS
(
WINAPI
*
pNtAlertThreadByThreadId
)(
HANDLE
tid
);
static
NTSTATUS
(
WINAPI
*
pNtWaitForAlertByThreadId
)(
void
*
addr
,
const
LARGE_INTEGER
*
timeout
);
...
...
@@ -643,11 +644,18 @@ static void wined3d_cs_exec_nop(struct wined3d_cs *cs, const void *data)
static
void
wined3d_cs_exec_present
(
struct
wined3d_cs
*
cs
,
const
void
*
data
)
{
static
LARGE_INTEGER
freq
;
struct
wined3d_texture
*
logo_texture
,
*
cursor_texture
,
*
back_buffer
;
struct
wined3d_rendertarget_view
*
dsv
=
cs
->
state
.
fb
.
depth_stencil
;
const
struct
wined3d_cs_present
*
op
=
data
;
const
struct
wined3d_swapchain_desc
*
desc
;
struct
wined3d_swapchain
*
swapchain
;
LONGLONG
elapsed_time
;
LARGE_INTEGER
time
;
if
(
!
freq
.
QuadPart
)
QueryPerformanceFrequency
(
&
freq
);
swapchain
=
op
->
swapchain
;
desc
=
&
swapchain
->
state
.
desc
;
...
...
@@ -703,6 +711,16 @@ static void wined3d_cs_exec_present(struct wined3d_cs *cs, const void *data)
wined3d_rendertarget_view_validate_location
(
dsv
,
WINED3D_LOCATION_DISCARDED
);
}
if
(
TRACE_ON
(
frametime
))
{
QueryPerformanceCounter
(
&
time
);
if
(
swapchain
->
last_present_time
.
QuadPart
)
{
elapsed_time
=
time
.
QuadPart
-
swapchain
->
last_present_time
.
QuadPart
;
TRACE_
(
frametime
)(
"Frame duration %u μs.
\n
"
,
(
unsigned
int
)(
elapsed_time
*
1000000
/
freq
.
QuadPart
));
}
swapchain
->
last_present_time
=
time
;
}
if
(
TRACE_ON
(
fps
))
{
DWORD
time
=
GetTickCount
();
...
...
dlls/wined3d/wined3d_private.h
View file @
295c577f
...
...
@@ -4029,7 +4029,9 @@ struct wined3d_swapchain
unsigned
int
swap_interval
;
unsigned
int
max_frame_latency
;
LONG
prev_time
,
frames
;
/* Performance tracking */
/* Performance tracking */
LARGE_INTEGER
last_present_time
;
LONG
prev_time
,
frames
;
struct
wined3d_swapchain_state
state
;
HWND
win_handle
;
...
...
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