Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
c39a71e3
Commit
c39a71e3
authored
Sep 20, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 28, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winevulkan: Pass VkVariable to ConversionFunction constructor.
parent
fe7df461
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
18 deletions
+12
-18
make_vulkan
dlls/winevulkan/make_vulkan
+12
-18
No files found.
dlls/winevulkan/make_vulkan
View file @
c39a71e3
...
...
@@ -1395,16 +1395,10 @@ class VkMember(VkVariable):
elif
self
.
is_handle
()
or
self
.
is_generic_handle
():
direction
=
Direction
.
INPUT
operand
=
self
.
type_info
[
"data"
]
if
self
.
is_dynamic_array
():
conversions
.
append
(
ConversionFunction
(
False
,
True
,
direction
,
operand
))
elif
self
.
is_static_array
():
conversions
.
append
(
ConversionFunction
(
True
,
False
,
direction
,
operand
))
else
:
conversions
.
append
(
ConversionFunction
(
False
,
False
,
direction
,
operand
))
conversions
.
append
(
ConversionFunction
(
self
,
direction
))
if
self
.
needs_free
():
conversions
.
append
(
FreeFunction
(
self
.
is_dynamic_array
(),
operand
))
conversions
.
append
(
FreeFunction
(
self
.
is_dynamic_array
(),
self
.
type_info
[
"data"
]
))
return
conversions
...
...
@@ -1526,20 +1520,20 @@ class VkParam(VkVariable):
if
not
self
.
needs_conversion
()
and
not
self
.
needs_unwrapping
():
return
operand
=
self
.
struct
if
self
.
is_struct
()
else
self
.
handle
# Input functions require win to host conversion.
if
self
.
_direction
in
[
Direction
.
INPUT
,
Direction
.
INPUT_OUTPUT
]:
self
.
input_conv
=
ConversionFunction
(
False
,
self
.
is_dynamic_array
(),
Direction
.
INPUT
,
operand
)
self
.
input_conv
=
ConversionFunction
(
self
,
Direction
.
INPUT
)
# Output functions require host to win conversion.
if
self
.
_direction
in
[
Direction
.
INPUT_OUTPUT
,
Direction
.
OUTPUT
]:
self
.
output_conv
=
ConversionFunction
(
False
,
self
.
is_dynamic_array
(),
Direction
.
OUTPUT
,
operand
)
self
.
output_conv
=
ConversionFunction
(
self
,
Direction
.
OUTPUT
)
# Dynamic arrays, but also some normal structs (e.g. VkCommandBufferBeginInfo) need memory
# allocation and thus some cleanup.
if
self
.
is_dynamic_array
()
or
self
.
struct
.
needs_free
():
self
.
free_func
=
FreeFunction
(
self
.
is_dynamic_array
(),
operand
)
self
.
free_func
=
FreeFunction
(
self
.
is_dynamic_array
(),
self
.
struct
if
self
.
is_struct
()
else
self
.
handle
)
def
_set_direction
(
self
):
""" Internal helper function to set parameter direction (input/output/input_output). """
...
...
@@ -2068,12 +2062,12 @@ class VkStruct(Sequence):
class
ConversionFunction
(
object
):
def
__init__
(
self
,
array
,
dyn_array
,
direction
,
operand
):
self
.
array
=
array
def
__init__
(
self
,
variable
,
direction
):
self
.
direction
=
direction
self
.
dyn_array
=
dyn_array
self
.
operand
=
operand
self
.
type
=
operand
.
name
self
.
array
=
variable
.
is_static_array
()
self
.
dyn_array
=
variable
.
is_dynamic_array
()
self
.
operand
=
variable
.
struct
if
variable
.
is_struct
()
else
variable
.
handle
self
.
type
=
variable
.
type
self
.
_set_name
()
...
...
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