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
274a9db5
Commit
274a9db5
authored
Nov 24, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 25, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winevulkan: Don't try to convert unions without selectors.
parent
81a6c8c8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
62 deletions
+38
-62
make_vulkan
dlls/winevulkan/make_vulkan
+8
-4
vulkan_thunks.c
dlls/winevulkan/vulkan_thunks.c
+30
-58
No files found.
dlls/winevulkan/make_vulkan
View file @
274a9db5
...
...
@@ -1267,10 +1267,10 @@ class VkVariable(object):
return
self
.
needs_conversion
(
conv
,
unwrap
,
Direction
.
INPUT
,
False
)
\
or
self
.
needs_conversion
(
conv
,
unwrap
,
Direction
.
OUTPUT
,
False
)
return
(
self
.
is_struct
()
or
self
.
is_union
(
))
and
self
.
struct
.
needs_alloc
(
conv
,
unwrap
)
return
(
self
.
is_struct
()
or
(
self
.
is_union
()
and
self
.
selector
))
and
self
.
struct
.
needs_alloc
(
conv
,
unwrap
)
def
needs_host_type
(
self
):
return
(
self
.
is_struct
()
or
self
.
is_union
(
))
and
self
.
struct
.
needs_host_type
()
return
(
self
.
is_struct
()
or
(
self
.
is_union
()
and
self
.
selector
))
and
self
.
struct
.
needs_host_type
()
def
get_conversions
(
self
,
unwrap
,
parent_const
=
False
):
""" Get a list of conversions required for this parameter if any.
...
...
@@ -1284,7 +1284,7 @@ class VkVariable(object):
# Collect any member conversions first, so we can guarantee
# those functions will be defined prior to usage by the
# 'parent' param requiring conversion.
if
self
.
is_struct
()
or
self
.
is_union
(
):
if
self
.
is_struct
()
or
(
self
.
is_union
()
and
self
.
selector
):
struct
=
self
.
struct
is_const
=
self
.
is_const
()
if
self
.
is_pointer
()
else
parent_const
...
...
@@ -1533,6 +1533,10 @@ class VkMember(VkVariable):
def
needs_conversion
(
self
,
conv
,
unwrap
,
direction
,
struct_const
):
""" Check if member needs conversion. """
# we can't convert unions if we don't have a selector
if
self
.
is_union
()
and
not
self
.
selector
:
return
False
is_const
=
self
.
is_const
()
if
self
.
is_pointer
()
else
struct_const
# const members don't needs output conversion unless they are structs with non-const pointers
...
...
@@ -2239,7 +2243,7 @@ class StructConversionFunction(object):
else
:
params
=
[
"const {0} *in"
.
format
(
win_type
),
"{0} *out"
.
format
(
self
.
type
)]
if
self
.
operand
[
0
]
.
select
ion
:
if
self
.
operand
.
un
ion
:
params
.
append
(
"VkFlags selector"
)
# Generate parameter list
...
...
dlls/winevulkan/vulkan_thunks.c
View file @
274a9db5
This diff is collapsed.
Click to expand it.
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