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
b55a469c
Commit
b55a469c
authored
Dec 05, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Dec 12, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winevulkan: Skip asserts for some critical functions.
parent
83708f7c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
3 deletions
+21
-3
loader_thunks.c
dlls/winevulkan/loader_thunks.c
+0
-0
make_vulkan
dlls/winevulkan/make_vulkan
+21
-3
No files found.
dlls/winevulkan/loader_thunks.c
View file @
b55a469c
This source diff could not be displayed because it is too large. You can
view the blob
instead.
dlls/winevulkan/make_vulkan
View file @
b55a469c
...
...
@@ -150,6 +150,13 @@ ALLOWED_X_EXTENSIONS = [
"VK_NVX_image_view_handle"
,
]
# Some frequently called functions skip traces and checks for performance reasons.
PERF_CRITICAL_FUNCTIONS
=
[
"vkUpdateDescriptorSets"
,
"vkUpdateDescriptorSetWithTemplate"
,
"vkGetDescriptorEXT"
,
]
# Functions part of our winevulkan graphics driver interface.
# DRIVER_VERSION should be bumped on any change to driver interface
# in FUNCTION_OVERRIDES
...
...
@@ -674,6 +681,12 @@ class VkFunction(object):
# The function needs exposed if at-least one extension isn't both UNSUPPORTED and UNEXPOSED
return
self
.
is_required
()
and
(
not
self
.
extensions
or
not
self
.
extensions
.
issubset
(
UNEXPOSED_EXTENSIONS
))
def
is_perf_critical
(
self
):
# vkCmd* functions are frequently called, do not trace for performance
if
self
.
name
.
startswith
(
"vkCmd"
)
and
self
.
type
==
"void"
:
return
True
return
self
.
name
in
PERF_CRITICAL_FUNCTIONS
def
pfn
(
self
,
prefix
=
"p"
,
call_conv
=
None
):
""" Create function pointer. """
...
...
@@ -733,13 +746,18 @@ class VkFunction(object):
def
loader_body
(
self
):
body
=
" struct {0}_params params;
\n
"
.
format
(
self
.
name
)
body
+=
" NTSTATUS status;
\n
"
if
not
self
.
is_perf_critical
():
body
+=
" NTSTATUS status;
\n
"
for
p
in
self
.
params
:
body
+=
" params.{0} = {0};
\n
"
.
format
(
p
.
name
)
# Call the Unix function.
body
+=
" status = UNIX_CALL({0}, ¶ms);
\n
"
.
format
(
self
.
name
)
body
+=
" assert(!status);
\n
"
if
self
.
is_perf_critical
():
body
+=
" UNIX_CALL({0}, ¶ms);
\n
"
.
format
(
self
.
name
)
else
:
body
+=
" status = UNIX_CALL({0}, ¶ms);
\n
"
.
format
(
self
.
name
)
body
+=
" assert(!status);
\n
"
if
self
.
type
!=
"void"
:
body
+=
" return params.result;
\n
"
return
body
...
...
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