From 687fd6755707ca871e5c28589aa81d9646d8cfb9 Mon Sep 17 00:00:00 2001 From: Hoe Hao Cheng Date: Sun, 1 May 2022 18:03:52 +0800 Subject: [PATCH] zink/codegen: do not automatically consider extensions promoted ...until an entry is added to VERSIONS in zink_device_info.py. Now that we stop obtaining feature structs of promoted extensions when the VK impl is new enough, it's possible for things to break when someone updates vk.xml, and extensions get promoted but the codegen is not updated to include e.g. info->feats13 and info->props13 (or newer) in zink_device_info Reviewed-By: Mike Blumenkrantz Part-of: --- src/gallium/drivers/zink/zink_device_info.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/zink/zink_device_info.py b/src/gallium/drivers/zink/zink_device_info.py index 313275f5ad3..139556eb4ce 100644 --- a/src/gallium/drivers/zink/zink_device_info.py +++ b/src/gallium/drivers/zink/zink_device_info.py @@ -682,8 +682,13 @@ if __name__ == "__main__": print("The extension {} does not provide a properties struct.".format(ext.name)) ext.properties_promoted = entry.properties_promoted - if entry.promoted_in: + if entry.promoted_in and entry.promoted_in <= versions[-1].struct_version: ext.core_since = Version((*entry.promoted_in, 0)) + else: + # even if the ext is promoted in a newer VK version, consider it + # unpromoted until there's an entry for that VK version in VERSIONS + ext.features_promoted = False + ext.properties_promoted = False if error_count > 0: print("zink_device_info.py: Found {} error(s) in total. Quitting.".format(error_count))