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
8047c230
Commit
8047c230
authored
Nov 07, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 09, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winevulkan: Store parent in VkVariable.
parent
52ae9be1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
11 deletions
+16
-11
make_vulkan
dlls/winevulkan/make_vulkan
+16
-11
No files found.
dlls/winevulkan/make_vulkan
View file @
8047c230
...
...
@@ -583,7 +583,7 @@ class VkFunction(object):
params
=
[]
for
param
in
command
.
findall
(
"param"
):
vk_param
=
VkParam
.
from_xml
(
param
,
types
)
vk_param
=
VkParam
.
from_xml
(
param
,
types
,
params
)
params
.
append
(
vk_param
)
return
VkFunction
(
_type
=
func_type
,
name
=
func_name
,
params
=
params
)
...
...
@@ -1082,11 +1082,12 @@ class VkHandle(object):
class
VkVariable
(
object
):
def
__init__
(
self
,
const
=
False
,
type_info
=
None
,
type
=
None
,
name
=
None
,
pointer
=
None
,
array_len
=
None
,
dyn_array_len
=
None
,
object_type
=
None
,
optional
=
False
,
returnedonly
=
False
):
dyn_array_len
=
None
,
object_type
=
None
,
optional
=
False
,
returnedonly
=
False
,
parent
=
None
):
self
.
const
=
const
self
.
type_info
=
type_info
self
.
type
=
type
self
.
name
=
name
self
.
parent
=
parent
self
.
pointer
=
pointer
self
.
array_len
=
array_len
self
.
dyn_array_len
=
dyn_array_len
...
...
@@ -1214,10 +1215,10 @@ class VkVariable(object):
class
VkMember
(
VkVariable
):
def
__init__
(
self
,
const
=
False
,
struct_fwd_decl
=
False
,
_type
=
None
,
pointer
=
None
,
name
=
None
,
array_len
=
None
,
dyn_array_len
=
None
,
optional
=
False
,
values
=
None
,
object_type
=
None
,
bit_width
=
None
,
returnedonly
=
False
):
returnedonly
=
False
,
parent
=
None
):
VkVariable
.
__init__
(
self
,
const
=
const
,
type
=
_type
,
name
=
name
,
pointer
=
pointer
,
array_len
=
array_len
,
dyn_array_len
=
dyn_array_len
,
object_type
=
object_type
,
optional
=
optional
,
returnedonly
=
returnedonly
)
returnedonly
=
returnedonly
,
parent
=
parent
)
self
.
struct_fwd_decl
=
struct_fwd_decl
self
.
values
=
values
self
.
bit_width
=
bit_width
...
...
@@ -1236,7 +1237,7 @@ class VkMember(VkVariable):
self
.
name
,
self
.
array_len
,
self
.
dyn_array_len
)
@staticmethod
def
from_xml
(
member
,
returnedonly
):
def
from_xml
(
member
,
returnedonly
,
parent
):
""" Helper function for parsing a member tag within a struct or union. """
name_elem
=
member
.
find
(
"name"
)
...
...
@@ -1301,7 +1302,8 @@ class VkMember(VkVariable):
return
VkMember
(
const
=
const
,
struct_fwd_decl
=
struct_fwd_decl
,
_type
=
member_type
,
pointer
=
pointer
,
name
=
name_elem
.
text
,
array_len
=
array_len
,
dyn_array_len
=
dyn_array_len
,
optional
=
optional
,
values
=
values
,
object_type
=
object_type
,
bit_width
=
bit_width
,
returnedonly
=
returnedonly
)
values
=
values
,
object_type
=
object_type
,
bit_width
=
bit_width
,
returnedonly
=
returnedonly
,
parent
=
parent
)
def
copy
(
self
,
input
,
output
,
direction
,
conv
,
unwrap
):
""" Helper method for use by conversion logic to generate a C-code statement to copy this member.
...
...
@@ -1450,10 +1452,11 @@ class VkMember(VkVariable):
class
VkParam
(
VkVariable
):
""" Helper class which describes a parameter to a function call. """
def
__init__
(
self
,
type_info
,
const
=
None
,
pointer
=
None
,
name
=
None
,
array_len
=
None
,
dyn_array_len
=
None
,
object_type
=
None
,
optional
=
False
):
def
__init__
(
self
,
type_info
,
const
=
None
,
pointer
=
None
,
name
=
None
,
parent
=
None
,
array_len
=
None
,
dyn_array_len
=
None
,
object_type
=
None
,
optional
=
False
):
VkVariable
.
__init__
(
self
,
const
=
const
,
type_info
=
type_info
,
type
=
type_info
[
"name"
],
name
=
name
,
pointer
=
pointer
,
array_len
=
array_len
,
dyn_array_len
=
dyn_array_len
,
object_type
=
object_type
,
optional
=
optional
)
object_type
=
object_type
,
optional
=
optional
,
parent
=
parent
)
self
.
_set_format_string
()
...
...
@@ -1461,7 +1464,7 @@ class VkParam(VkVariable):
return
"{0} {1} {2} {3} {4} {5}"
.
format
(
self
.
const
,
self
.
type
,
self
.
pointer
,
self
.
name
,
self
.
array_len
,
self
.
dyn_array_len
)
@staticmethod
def
from_xml
(
param
,
types
):
def
from_xml
(
param
,
types
,
parent
):
""" Helper function to create VkParam from xml. """
# Parameter parsing is slightly tricky. All the data is contained within
...
...
@@ -1496,7 +1499,9 @@ class VkParam(VkVariable):
if
type_info
is
None
:
LOGGER
.
err
(
"type info not found for: {0}"
.
format
(
type_elem
.
text
))
return
VkParam
(
type_info
,
const
=
const
,
pointer
=
pointer
,
name
=
name
,
array_len
=
array_len
,
dyn_array_len
=
dyn_array_len
,
object_type
=
object_type
,
optional
=
optional
)
return
VkParam
(
type_info
,
const
=
const
,
pointer
=
pointer
,
name
=
name
,
array_len
=
array_len
,
dyn_array_len
=
dyn_array_len
,
object_type
=
object_type
,
optional
=
optional
,
parent
=
parent
)
def
_set_format_string
(
self
):
""" Internal helper function to be used by constructor to set format string. """
...
...
@@ -1757,7 +1762,7 @@ class VkStruct(Sequence):
members
=
[]
for
member
in
struct
.
findall
(
"member"
):
vk_member
=
VkMember
.
from_xml
(
member
,
returnedonly
)
vk_member
=
VkMember
.
from_xml
(
member
,
returnedonly
,
members
)
members
.
append
(
vk_member
)
return
VkStruct
(
name
,
members
,
returnedonly
,
structextends
,
union
=
union
)
...
...
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