Mesa (master): zink/codegen: prefer first definition of prop/feature structs
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Apr 30 12:11:51 UTC 2021
Module: Mesa
Branch: master
Commit: 8966029f9562d1089adb05813a23ddb5a9e9c7a6
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8966029f9562d1089adb05813a23ddb5a9e9c7a6
Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date: Fri Apr 30 10:00:50 2021 +0200
zink/codegen: prefer first definition of prop/feature structs
Some extensions have renamed their property and/or feature structs,
listing the "correct" type first. So we should prefer that one rather
than overwriting it with a later one.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10101>
---
src/gallium/drivers/zink/zink_extensions.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/gallium/drivers/zink/zink_extensions.py b/src/gallium/drivers/zink/zink_extensions.py
index 656cfdf17b6..a9dc54439fc 100644
--- a/src/gallium/drivers/zink/zink_extensions.py
+++ b/src/gallium/drivers/zink/zink_extensions.py
@@ -191,9 +191,11 @@ class ExtensionRegistry:
for ty in ext.findall("require/type"):
ty_name = ty.get("name")
- if self.is_features_struct(ty_name):
+ if (self.is_features_struct(ty_name) and
+ entry.features_struct is None):
entry.features_struct = ty_name
- elif self.is_properties_struct(ty_name):
+ elif (self.is_properties_struct(ty_name) and
+ entry.properties_struct is None):
entry.properties_struct = ty_name
self.registry[name] = entry
More information about the mesa-commit
mailing list