Mesa (main): zink/codegen: do not automatically consider extensions promoted

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jun 3 13:27:50 UTC 2022


Module: Mesa
Branch: main
Commit: 687fd6755707ca871e5c28589aa81d9646d8cfb9
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=687fd6755707ca871e5c28589aa81d9646d8cfb9

Author: Hoe Hao Cheng <haochengho12907 at gmail.com>
Date:   Sun May  1 18:03:52 2022 +0800

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 <michael.blumenkrantz at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16265>

---

 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))



More information about the mesa-commit mailing list