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
8d1bdb5f
Commit
8d1bdb5f
authored
Sep 23, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 26, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winevulkan: Merge body and body_conversion.
parent
a5e39c42
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
37 deletions
+11
-37
make_vulkan
dlls/winevulkan/make_vulkan
+11
-37
vulkan_thunks.c
dlls/winevulkan/vulkan_thunks.c
+0
-0
No files found.
dlls/winevulkan/make_vulkan
View file @
8d1bdb5f
...
...
@@ -754,27 +754,6 @@ class VkFunction(object):
return
proto
def
body
(
self
,
params_prefix
=
""
):
body
=
""
if
not
self
.
needs_private_thunk
():
body
+=
" {0}"
.
format
(
self
.
trace
(
params_prefix
=
params_prefix
))
params
=
", "
.
join
([
p
.
variable
(
conv
=
False
,
params_prefix
=
params_prefix
)
for
p
in
self
.
params
])
# Call the native Vulkan function.
body
+=
" "
if
self
.
returns_longlong
():
body
+=
"{0}result = "
.
format
(
params_prefix
)
elif
self
.
type
!=
"void"
:
body
+=
"return "
body
+=
"{0}.p_{1}({2});
\n
"
.
format
(
self
.
params
[
0
]
.
dispatch_table
(
params_prefix
),
self
.
name
,
params
)
if
self
.
type
==
"void"
or
self
.
returns_longlong
():
body
+=
" return STATUS_SUCCESS;
\n
"
return
body
def
loader_body
(
self
):
body
=
" struct {0}_params params;
\n
"
.
format
(
self
.
name
)
for
p
in
self
.
params
:
...
...
@@ -792,7 +771,7 @@ class VkFunction(object):
body
+=
" return params.result;
\n
"
return
body
def
body
_conversion
(
self
,
conv
,
params_prefix
=
""
):
def
body
(
self
,
conv
,
unwrap
=
True
,
params_prefix
=
""
):
body
=
""
result_prefix
=
""
...
...
@@ -809,7 +788,7 @@ class VkFunction(object):
body
+=
" {0}_host *{1}_host;
\n
"
.
format
(
p
.
type
,
p
.
name
)
else
:
body
+=
" {0}_host {1}_host;
\n
"
.
format
(
p
.
type
,
p
.
name
)
elif
p
.
needs_unwrapping
():
elif
unwrap
and
p
.
needs_unwrapping
():
if
p
.
is_dynamic_array
():
body
+=
" {0} *{1}_host;
\n
"
.
format
(
p
.
type
,
p
.
name
)
else
:
...
...
@@ -820,7 +799,7 @@ class VkFunction(object):
# Call any win_to_host conversion calls.
for
p
in
self
.
params
:
if
p
.
needs_input_conversion
()
and
(
p
.
needs_unwrapping
()
or
conv
):
if
p
.
needs_input_conversion
()
and
(
conv
or
(
unwrap
and
p
.
needs_unwrapping
())
):
body
+=
p
.
copy
(
Direction
.
INPUT
,
prefix
=
params_prefix
)
# Build list of parameters containing converted and non-converted parameters.
...
...
@@ -839,15 +818,16 @@ class VkFunction(object):
body
+=
"
\n
"
# Call any host_to_win conversion calls.
if
conv
:
for
p
in
self
.
params
:
if
not
p
.
needs_output_conversion
()
:
if
not
p
.
output_conv
:
continue
body
+=
p
.
copy
(
Direction
.
OUTPUT
,
prefix
=
params_prefix
)
# Perform any required cleanups. Most of these are for array functions.
for
p
in
self
.
params
:
if
p
.
needs_free
()
and
(
p
.
needs_unwrapping
()
or
conv
):
if
p
.
needs_free
()
and
(
conv
or
(
unwrap
and
p
.
needs_unwrapping
())
):
body
+=
p
.
free
(
prefix
=
params_prefix
)
# Finally return the result.
...
...
@@ -898,20 +878,14 @@ class VkFunction(object):
if
prefix
==
"thunk_"
:
thunk
=
self
.
prototype
(
prefix
=
prefix
)
thunk
+=
"
\n
{
\n
"
params_prefix
=
""
else
:
thunk
+=
self
.
body
(
conv
=
conv
)
thunk
+=
"}
\n\n
"
return
thunk
thunk
=
"NTSTATUS {0}{1}(void *args)
\n
"
.
format
(
prefix
,
self
.
name
)
thunk
+=
"{
\n
"
thunk
+=
" struct {0}_params *params = args;
\n
"
.
format
(
self
.
name
)
params_prefix
=
"params->"
if
conv
and
self
.
needs_conversion
():
thunk
+=
self
.
body_conversion
(
conv
=
True
,
params_prefix
=
params_prefix
)
elif
self
.
needs_unwrapping
():
thunk
+=
self
.
body_conversion
(
conv
=
False
,
params_prefix
=
params_prefix
)
else
:
thunk
+=
self
.
body
(
params_prefix
=
params_prefix
)
thunk
+=
self
.
body
(
conv
=
conv
,
unwrap
=
not
self
.
needs_private_thunk
(),
params_prefix
=
"params->"
)
thunk
+=
"}
\n\n
"
return
thunk
...
...
dlls/winevulkan/vulkan_thunks.c
View file @
8d1bdb5f
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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