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

Author: Eric Engestrom <[email protected]>
Date:   Sun Aug  7 20:24:49 2022 +0100

vk/update-aliases.py: simplify addition of other concatenated prefixes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26484>

---

 src/vulkan/registry/update-aliases.py | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/vulkan/registry/update-aliases.py 
b/src/vulkan/registry/update-aliases.py
index c304e38cc71..7ac1c82d65a 100755
--- a/src/vulkan/registry/update-aliases.py
+++ b/src/vulkan/registry/update-aliases.py
@@ -61,9 +61,12 @@ def main(paths: list[str]):
     Entrypoint; perform the search for all the aliases and replace them.
     """
     def prepare_identifier(identifier: str) -> str:
-        # vk_find_struct() prepends `VK_STRUCTURE_TYPE_`, so that prefix
-        # might not appear in the code
-        identifier = remove_prefix(identifier, 'VK_STRUCTURE_TYPE_')
+        for prefix in [
+            # vk_find_struct() prepends `VK_STRUCTURE_TYPE_`, so that prefix
+            # might not appear in the code
+            'VK_STRUCTURE_TYPE_',
+        ]:
+            identifier = remove_prefix(identifier, prefix)
         return identifier
 
     aliases = {}

Reply via email to