zink: make codegen compatible with python 3.5
Fixes: f1432fd3
("zink: generate extension infrastructure using a python script")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12137>
This commit is contained in:
parent
57ff4caf7f
commit
86250c7251
|
@ -25,8 +25,8 @@ from xml.etree import ElementTree
|
||||||
from typing import List,Tuple
|
from typing import List,Tuple
|
||||||
|
|
||||||
class Version:
|
class Version:
|
||||||
device_version : Tuple[int, int, int] = (1,0,0)
|
device_version = (1,0,0)
|
||||||
struct_version : Tuple[int, int] = (1,0)
|
struct_version = (1,0)
|
||||||
|
|
||||||
def __init__(self, version, struct=()):
|
def __init__(self, version, struct=()):
|
||||||
self.device_version = version
|
self.device_version = version
|
||||||
|
@ -59,17 +59,17 @@ class Version:
|
||||||
+ '_' + struct)
|
+ '_' + struct)
|
||||||
|
|
||||||
class Extension:
|
class Extension:
|
||||||
name : str = None
|
name = None
|
||||||
alias : str = None
|
alias = None
|
||||||
is_required : bool = False
|
is_required = False
|
||||||
is_nonstandard : bool = False
|
is_nonstandard = False
|
||||||
enable_conds : List[str] = None
|
enable_conds = None
|
||||||
core_since : Version = None
|
core_since = None
|
||||||
|
|
||||||
# these are specific to zink_device_info.py:
|
# these are specific to zink_device_info.py:
|
||||||
has_properties : bool = False
|
has_properties = False
|
||||||
has_features : bool = False
|
has_features = False
|
||||||
guard : bool = False
|
guard = False
|
||||||
|
|
||||||
def __init__(self, name, alias="", required=False, nonstandard=False,
|
def __init__(self, name, alias="", required=False, nonstandard=False,
|
||||||
properties=False, features=False, conditions=None, guard=False,
|
properties=False, features=False, conditions=None, guard=False,
|
||||||
|
@ -143,16 +143,16 @@ Layer = Extension
|
||||||
|
|
||||||
class ExtensionRegistryEntry:
|
class ExtensionRegistryEntry:
|
||||||
# type of extension - right now it's either "instance" or "device"
|
# type of extension - right now it's either "instance" or "device"
|
||||||
ext_type : str = ""
|
ext_type = ""
|
||||||
# the version in which the extension is promoted to core VK
|
# the version in which the extension is promoted to core VK
|
||||||
promoted_in : Version = None
|
promoted_in = None
|
||||||
# functions added by the extension are referred to as "commands" in the registry
|
# functions added by the extension are referred to as "commands" in the registry
|
||||||
device_commands : List[str] = None
|
device_commands = None
|
||||||
pdevice_commands : List[str] = None
|
pdevice_commands = None
|
||||||
instance_commands : List[str] = None
|
instance_commands = None
|
||||||
constants : List[str] = None
|
constants = None
|
||||||
features_struct : str = None
|
features_struct = None
|
||||||
properties_struct : str = None
|
properties_struct = None
|
||||||
|
|
||||||
class ExtensionRegistry:
|
class ExtensionRegistry:
|
||||||
# key = extension name, value = registry entry
|
# key = extension name, value = registry entry
|
||||||
|
|
Loading…
Reference in New Issue