Mesa (master): zink/codegen: make 'struct' optional in Version
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sun Jan 17 15:31:08 UTC 2021
Module: Mesa
Branch: master
Commit: 463d7dc9c3e2d4a4d47f5eda0269d920edc30f22
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=463d7dc9c3e2d4a4d47f5eda0269d920edc30f22
Author: Hoe Hao Cheng <haochengho12907 at gmail.com>
Date: Fri Jan 15 17:01:44 2021 +0800
zink/codegen: make 'struct' optional in Version
while we are at it, fix a typo too
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8521>
---
src/gallium/drivers/zink/zink_extensions.py | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/gallium/drivers/zink/zink_extensions.py b/src/gallium/drivers/zink/zink_extensions.py
index 06a04fddc5f..0681446c4c4 100644
--- a/src/gallium/drivers/zink/zink_extensions.py
+++ b/src/gallium/drivers/zink/zink_extensions.py
@@ -1,10 +1,14 @@
class Version:
- driver_version : (1,0,0)
+ device_version : (1,0,0)
struct_version : (1,0)
- def __init__(self, version, struct):
+ def __init__(self, version, struct=()):
self.device_version = version
- self.struct_version = struct
+
+ if not struct:
+ self.struct_version = (version[0], version[1])
+ else:
+ self.struct_version = struct
# e.g. "VM_MAKE_VERSION(1,2,0)"
def version(self):
More information about the mesa-commit
mailing list