mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 20:28:04 +02:00
zink/codegen: introduce notion of non-standard extensions
this is for the MoltenVK extensions, especially "VK_MVK_moltenvk", which right now is reserved in the registry. Making it non-standard skips all the validations. Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9021>
This commit is contained in:
parent
7489f5fc4d
commit
3d36bfd21f
3 changed files with 13 additions and 5 deletions
|
|
@ -115,6 +115,7 @@ EXTENSIONS = [
|
|||
alias="stencil_export"),
|
||||
Extension("VK_EXTX_portability_subset",
|
||||
alias="portability_subset_extx",
|
||||
nonstandard=True,
|
||||
properties=True,
|
||||
features=True,
|
||||
guard=True),
|
||||
|
|
|
|||
|
|
@ -61,6 +61,7 @@ class Extension:
|
|||
name : str = None
|
||||
alias : str = None
|
||||
is_required : bool = False
|
||||
is_nonstandard : bool = False
|
||||
enable_conds : [str] = None
|
||||
|
||||
# these are specific to zink_device_info.py:
|
||||
|
|
@ -72,12 +73,13 @@ class Extension:
|
|||
core_since : Version = None
|
||||
instance_funcs : [str] = None
|
||||
|
||||
def __init__(self, name, alias="", required=False, properties=False,
|
||||
features=False, conditions=None, guard=False, core_since=None,
|
||||
functions=None):
|
||||
def __init__(self, name, alias="", required=False, nonstandard=False,
|
||||
properties=False, features=False, conditions=None, guard=False,
|
||||
core_since=None, functions=None):
|
||||
self.name = name
|
||||
self.alias = alias
|
||||
self.is_required = required
|
||||
self.is_nonstandard = nonstandard
|
||||
self.has_properties = properties
|
||||
self.has_features = features
|
||||
self.enable_conds = conditions
|
||||
|
|
|
|||
|
|
@ -45,7 +45,8 @@ EXTENSIONS = [
|
|||
Extension("VK_KHR_get_physical_device_properties2",
|
||||
functions=["GetPhysicalDeviceFeatures2", "GetPhysicalDeviceProperties2"]),
|
||||
Extension("VK_KHR_external_memory_capabilities"),
|
||||
Extension("VK_MVK_moltenvk"),
|
||||
Extension("VK_MVK_moltenvk",
|
||||
nonstandard=True),
|
||||
]
|
||||
|
||||
# constructor: Layer(name, conditions=[])
|
||||
|
|
@ -295,7 +296,11 @@ if __name__ == "__main__":
|
|||
# Perform extension validation and set core_since for the extension if available
|
||||
error_count = 0
|
||||
for ext in extensions:
|
||||
if not registry.in_registry(ext.name) and not "MVK" in ext.name:
|
||||
if not registry.in_registry(ext.name):
|
||||
# disable validation for nonstandard extensions
|
||||
if ext.is_nonstandard:
|
||||
continue
|
||||
|
||||
error_count += 1
|
||||
print("The extension {} is not registered in vk.xml - a typo?".format(ext.name))
|
||||
continue
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue