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
551b535c
Commit
551b535c
authored
Dec 10, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Apr 09, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winevulkan: Move vkQueuePresent FPS trace out of the drivers.
parent
de4edeaa
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
54 deletions
+25
-54
vulkan.c
dlls/winemac.drv/vulkan.c
+1
-26
vulkan.c
dlls/winevulkan/vulkan.c
+23
-0
vulkan.c
dlls/winex11.drv/vulkan.c
+1
-28
No files found.
dlls/winemac.drv/vulkan.c
View file @
551b535c
...
...
@@ -46,8 +46,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(vulkan);
#ifdef SONAME_LIBVULKAN
WINE_DECLARE_DEBUG_CHANNEL
(
fps
);
typedef
VkFlags
VkMacOSSurfaceCreateFlagsMVK
;
#define VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK 1000123000
...
...
@@ -248,30 +246,7 @@ static VkResult macdrv_vkGetSwapchainImagesKHR(VkDevice device,
static
VkResult
macdrv_vkQueuePresentKHR
(
VkQueue
queue
,
const
VkPresentInfoKHR
*
present_info
)
{
TRACE
(
"%p, %p
\n
"
,
queue
,
present_info
);
VkResult
res
=
pvkQueuePresentKHR
(
queue
,
present_info
);
if
(
TRACE_ON
(
fps
))
{
static
unsigned
long
frames
,
frames_total
;
static
long
prev_time
,
start_time
;
DWORD
time
;
time
=
NtGetTickCount
();
frames
++
;
frames_total
++
;
if
(
time
-
prev_time
>
1500
)
{
TRACE_
(
fps
)(
"%p @ approx %.2ffps, total %.2ffps
\n
"
,
queue
,
1000
.
0
*
frames
/
(
time
-
prev_time
),
1000
.
0
*
frames_total
/
(
time
-
start_time
));
prev_time
=
time
;
frames
=
0
;
if
(
!
start_time
)
start_time
=
time
;
}
}
return
res
;
return
pvkQueuePresentKHR
(
queue
,
present_info
);
}
static
const
char
*
macdrv_get_host_surface_extension
(
void
)
...
...
dlls/winevulkan/vulkan.c
View file @
551b535c
...
...
@@ -31,6 +31,7 @@
#include "ntuser.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
vulkan
);
WINE_DECLARE_DEBUG_CHANNEL
(
fps
);
static
PFN_vkCreateInstance
p_vkCreateInstance
;
static
PFN_vkEnumerateInstanceVersion
p_vkEnumerateInstanceVersion
;
...
...
@@ -1705,6 +1706,28 @@ VkResult wine_vkQueuePresentKHR(VkQueue queue_handle, const VkPresentInfoKHR *pr
if
(
swapchains
!=
swapchains_buffer
)
free
(
swapchains
);
if
(
TRACE_ON
(
fps
))
{
static
unsigned
long
frames
,
frames_total
;
static
long
prev_time
,
start_time
;
DWORD
time
;
time
=
NtGetTickCount
();
frames
++
;
frames_total
++
;
if
(
time
-
prev_time
>
1500
)
{
TRACE_
(
fps
)(
"%p @ approx %.2ffps, total %.2ffps
\n
"
,
queue
,
1000
.
0
*
frames
/
(
time
-
prev_time
),
1000
.
0
*
frames_total
/
(
time
-
start_time
));
prev_time
=
time
;
frames
=
0
;
if
(
!
start_time
)
start_time
=
time
;
}
}
return
res
;
}
...
...
dlls/winex11.drv/vulkan.c
View file @
551b535c
...
...
@@ -47,7 +47,6 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
vulkan
);
#ifdef SONAME_LIBVULKAN
WINE_DECLARE_DEBUG_CHANNEL
(
fps
);
static
pthread_mutex_t
vulkan_mutex
;
...
...
@@ -263,34 +262,8 @@ static VkResult X11DRV_vkGetSwapchainImagesKHR(VkDevice device,
static
VkResult
X11DRV_vkQueuePresentKHR
(
VkQueue
queue
,
const
VkPresentInfoKHR
*
present_info
)
{
VkResult
res
;
TRACE
(
"%p, %p
\n
"
,
queue
,
present_info
);
res
=
pvkQueuePresentKHR
(
queue
,
present_info
);
if
(
TRACE_ON
(
fps
))
{
static
unsigned
long
frames
,
frames_total
;
static
long
prev_time
,
start_time
;
DWORD
time
;
time
=
NtGetTickCount
();
frames
++
;
frames_total
++
;
if
(
time
-
prev_time
>
1500
)
{
TRACE_
(
fps
)(
"%p @ approx %.2ffps, total %.2ffps
\n
"
,
queue
,
1000
.
0
*
frames
/
(
time
-
prev_time
),
1000
.
0
*
frames_total
/
(
time
-
start_time
));
prev_time
=
time
;
frames
=
0
;
if
(
!
start_time
)
start_time
=
time
;
}
}
return
res
;
return
pvkQueuePresentKHR
(
queue
,
present_info
);
}
static
const
char
*
X11DRV_get_host_surface_extension
(
void
)
...
...
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