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
5ac5e287
Commit
5ac5e287
authored
Sep 01, 2022
by
Georg Lehmann
Committed by
Alexandre Julliard
Sep 01, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winevulkan: Fixup 64bit enum aliases later to avoid using not yet defined values.
Signed-off-by:
Georg Lehmann
<
dadschoorse@gmail.com
>
parent
5412401a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
6 deletions
+16
-6
make_vulkan
dlls/winevulkan/make_vulkan
+16
-6
No files found.
dlls/winevulkan/make_vulkan
View file @
5ac5e287
...
...
@@ -435,12 +435,6 @@ class VkEnum(object):
def
create_alias
(
self
,
name
,
alias_name
):
""" Create an aliased value for this enum """
# Older GCC versions need a literal to initialize a static const uint64_t
# which is what we use for 64bit bitmasks.
if
self
.
bitwidth
==
64
:
alias
=
next
(
x
for
x
in
self
.
values
if
x
.
name
==
alias_name
)
self
.
add
(
VkEnumValue
(
name
,
self
.
bitwidth
,
value
=
alias
.
value
,
hex
=
alias
.
hex
,
alias
=
alias_name
))
else
:
self
.
add
(
VkEnumValue
(
name
,
self
.
bitwidth
,
alias
=
alias_name
))
def
create_value
(
self
,
name
,
value
):
...
...
@@ -469,6 +463,19 @@ class VkEnum(object):
if
not
any
(
x
.
name
==
value
.
name
for
x
in
self
.
values
):
self
.
values
.
append
(
value
)
def
fixup_64bit_aliases
(
self
):
""" Replace 64bit aliases with literal values """
# Older GCC versions need a literal to initialize a static const uint64_t
# which is what we use for 64bit bitmasks.
if
self
.
bitwidth
!=
64
:
return
for
value
in
self
.
values
:
if
not
value
.
is_alias
():
continue
alias
=
next
(
x
for
x
in
self
.
values
if
x
.
name
==
value
.
alias
)
value
.
hex
=
alias
.
hex
value
.
value
=
alias
.
value
def
definition
(
self
):
if
self
.
is_alias
():
return
""
...
...
@@ -3310,6 +3317,9 @@ class VkRegistry(object):
self
.
_parse_features
(
root
)
self
.
_parse_extensions
(
root
)
for
enum
in
self
.
enums
.
values
():
enum
.
fixup_64bit_aliases
()
self
.
_match_object_types
()
self
.
copyright
=
root
.
find
(
'./comment'
)
.
text
...
...
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