Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scripts: Port improved extension filtering code #157

Merged
merged 1 commit into from
Oct 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions scripts/generate_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,8 @@ def RunGenerators(api: str, registry: str, targetFilter: str) -> None:
# Parse the specified registry XML into an ElementTree object
tree = ElementTree.parse(registry)

# Filter out non-Vulkan extensions
if api == 'vulkan':
[exts.remove(e) for exts in tree.findall('extensions') for e in exts.findall('extension') if (sup := e.get('supported')) is not None and options.apiname not in sup.split(',')]
# Filter out extensions that are not on the API list
[exts.remove(e) for exts in tree.findall('extensions') for e in exts.findall('extension') if (sup := e.get('supported')) is not None and all(api not in sup.split(',') for api in apiList)]

# Load the XML tree into the registry object
reg.loadElementTree(tree)
Expand Down