Mesa (staging/21.2): zink: make codegen compatible with python 3.5

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Aug 2 20:34:15 UTC 2021


Module: Mesa
Branch: staging/21.2
Commit: 7c2c2b9d2a38ca477093151b854f59d326fdd548
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=7c2c2b9d2a38ca477093151b854f59d326fdd548

Author: Hoe Hao Cheng <haochengho12907 at gmail.com>
Date:   Fri Jul 30 16:59:21 2021 +0800

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 at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12137>
(cherry picked from commit 86250c7251b5652acc794a8b0efe2ad98cfec840)

---

 .pick_status.json                           |  2 +-
 src/gallium/drivers/zink/zink_extensions.py | 38 ++++++++++++++---------------
 2 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index f345bb01b57..d849925c482 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -364,7 +364,7 @@
         "description": "zink: make codegen compatible with python 3.5",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": "f1432fd3e2d915f09a295f1ffb878471ce4e4d73"
     },
diff --git a/src/gallium/drivers/zink/zink_extensions.py b/src/gallium/drivers/zink/zink_extensions.py
index bbc3b5a4b83..52c7def4479 100644
--- a/src/gallium/drivers/zink/zink_extensions.py
+++ b/src/gallium/drivers/zink/zink_extensions.py
@@ -25,8 +25,8 @@ from xml.etree import ElementTree
 from typing import List,Tuple
 
 class Version:
-    device_version : Tuple[int, int, int] = (1,0,0)
-    struct_version : Tuple[int, int] = (1,0)
+    device_version = (1,0,0)
+    struct_version = (1,0)
 
     def __init__(self, version, struct=()):
         self.device_version = version
@@ -59,17 +59,17 @@ class Version:
                 + '_' + struct)
 
 class Extension:
-    name           : str       = None
-    alias          : str       = None
-    is_required    : bool      = False
-    is_nonstandard : bool      = False
-    enable_conds   : List[str] = None
-    core_since     : Version   = None
+    name           = None
+    alias          = None
+    is_required    = False
+    is_nonstandard = False
+    enable_conds   = None
+    core_since     = None
 
     # these are specific to zink_device_info.py:
-    has_properties : bool      = False
-    has_features   : bool      = False
-    guard          : bool      = False
+    has_properties = False
+    has_features   = False
+    guard          = False
 
     def __init__(self, name, alias="", required=False, nonstandard=False,
                  properties=False, features=False, conditions=None, guard=False,
@@ -143,16 +143,16 @@ Layer = Extension
 
 class ExtensionRegistryEntry:
     # 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
-    promoted_in       : Version   = None
+    promoted_in       = None
     # functions added by the extension are referred to as "commands" in the registry
-    device_commands   : List[str] = None
-    pdevice_commands  : List[str] = None
-    instance_commands : List[str] = None
-    constants         : List[str] = None
-    features_struct   : str       = None
-    properties_struct : str       = None
+    device_commands   = None
+    pdevice_commands  = None
+    instance_commands = None
+    constants         = None
+    features_struct   = None
+    properties_struct = None
 
 class ExtensionRegistry:
     # key = extension name, value = registry entry



More information about the mesa-commit mailing list