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
8bd787c3
Commit
8bd787c3
authored
Jul 13, 2018
by
Józef Kucia
Committed by
Alexandre Julliard
Jul 13, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winevulkan: Use WINE_VK_VERSION to limit supported features.
Signed-off-by:
Józef Kucia
<
jkucia@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a45b0427
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
3 deletions
+19
-3
make_vulkan
dlls/winevulkan/make_vulkan
+19
-3
No files found.
dlls/winevulkan/make_vulkan
View file @
8bd787c3
...
...
@@ -2306,6 +2306,15 @@ class VkRegistry(object):
self
.
funcs
=
{}
self
.
types
=
{}
self
.
version_regex
=
re
.
compile
(
r'^'
r'VK_VERSION_'
r'(?P<major>[0-9])'
r'_'
r'(?P<minor>[0-9])'
r'$'
)
# Overall strategy for parsing the registry is to first
# parse all type / function definitions. Then parse
# features and extensions to decide which types / functions
...
...
@@ -2323,6 +2332,14 @@ class VkRegistry(object):
self
.
copyright
=
root
.
find
(
'./comment'
)
.
text
def
_is_feature_supported
(
self
,
feature
):
version
=
self
.
version_regex
.
match
(
feature
)
if
not
version
:
return
True
version
=
tuple
(
map
(
int
,
version
.
group
(
'major'
,
'minor'
)))
return
version
<=
WINE_VK_VERSION
def
_mark_command_required
(
self
,
command
):
""" Helper function to mark a certain command and the datatypes it needs as required."""
def
mark_bitmask_dependencies
(
bitmask
,
types
):
...
...
@@ -2542,7 +2559,7 @@ class VkRegistry(object):
type_info
.
required
=
True
feature
=
require
.
attrib
.
get
(
"feature"
)
if
feature
==
"VK_VERSION_1_1"
:
if
feature
and
not
self
.
_is_feature_supported
(
feature
)
:
continue
# Pull in any commands we need. We infer types to pull in from the command
...
...
@@ -2569,8 +2586,7 @@ class VkRegistry(object):
if
tag
.
tag
==
"comment"
:
continue
elif
tag
.
tag
==
"command"
:
# For now limit to 1.0 features as various 1.1 features need more work.
if
feature_name
==
"VK_VERSION_1_1"
:
if
not
self
.
_is_feature_supported
(
feature_name
):
continue
name
=
tag
.
attrib
[
"name"
]
self
.
_mark_command_required
(
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