mirror of
https://github.com/KhronosGroup/Vulkan-Utility-Libraries.git
synced 2025-05-24 21:49:23 +00:00
scripts: Port improved extension filtering code
This commit is contained in:
parent
b7599c21a6
commit
5b3147a535
1 changed files with 2 additions and 3 deletions
|
@ -93,9 +93,8 @@ def RunGenerators(api: str, registry: str, targetFilter: str) -> None:
|
||||||
# Parse the specified registry XML into an ElementTree object
|
# Parse the specified registry XML into an ElementTree object
|
||||||
tree = ElementTree.parse(registry)
|
tree = ElementTree.parse(registry)
|
||||||
|
|
||||||
# Filter out non-Vulkan extensions
|
# Filter out extensions that are not on the API list
|
||||||
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 all(api not in sup.split(',') for api in apiList)]
|
||||||
[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(',')]
|
|
||||||
|
|
||||||
# Load the XML tree into the registry object
|
# Load the XML tree into the registry object
|
||||||
reg.loadElementTree(tree)
|
reg.loadElementTree(tree)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue