Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Fotios Valasiadis
wine
Commits
551b535c
Commit
551b535c
authored
1 year ago
by
Rémi Bernon
Committed by
Alexandre Julliard
11 months ago
Browse files
Options
Downloads
Patches
Plain Diff
winevulkan: Move vkQueuePresent FPS trace out of the drivers.
parent
de4edeaa
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dlls/winemac.drv/vulkan.c
+1
-26
1 addition, 26 deletions
dlls/winemac.drv/vulkan.c
dlls/winevulkan/vulkan.c
+23
-0
23 additions, 0 deletions
dlls/winevulkan/vulkan.c
dlls/winex11.drv/vulkan.c
+1
-28
1 addition, 28 deletions
dlls/winex11.drv/vulkan.c
with
25 additions
and
54 deletions
dlls/winemac.drv/vulkan.c
+
1
−
26
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
)
...
...
This diff is collapsed.
Click to expand it.
dlls/winevulkan/vulkan.c
+
23
−
0
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
;
}
...
...
This diff is collapsed.
Click to expand it.
dlls/winex11.drv/vulkan.c
+
1
−
28
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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment