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@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10101>
This commit is contained in:
parent
b59b42ec5e
commit
8966029f95
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue