Georg Lehmann : winevulkan: Don't use comments for object types.
Alexandre Julliard
julliard at winehq.org
Thu Oct 29 16:32:07 CDT 2020
Module: wine
Branch: master
Commit: 44500d3cfc288fb5afb14061cae58cc9c32de867
URL: https://source.winehq.org/git/wine.git/?a=commit;h=44500d3cfc288fb5afb14061cae58cc9c32de867
Author: Georg Lehmann <dadschoorse at gmail.com>
Date: Tue Oct 27 22:02:46 2020 +0100
winevulkan: Don't use comments for object types.
We shouldn't do that according to the Vulkan xml maintainer.
https://github.com/KhronosGroup/Vulkan-Docs/pull/1379
Signed-off-by: Georg Lehmann <dadschoorse at gmail.com>
Signed-off-by: Liam Middlebrook <lmiddlebrook at nvidia.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/winevulkan/make_vulkan | 19 +++++++------------
1 file changed, 7 insertions(+), 12 deletions(-)
diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan
index 7e5bd030867..771efe8f5bb 100755
--- a/dlls/winevulkan/make_vulkan
+++ b/dlls/winevulkan/make_vulkan
@@ -2739,21 +2739,16 @@ class VkRegistry(object):
def _match_object_types(self):
""" Matches each handle with the correct object type. """
- for handle in self.handles:
- if not handle.is_required() or handle.is_alias():
- continue
- for value in self.enums["VkObjectType"].values:
- if value.comment == handle.name:
- handle.object_type = value.name
- break
- else:
- LOGGER.warning("No object type found for {}".format(handle.name))
+ # Use upper case comparison for simplicity.
+ object_types = {}
+ for value in self.enums["VkObjectType"].values:
+ object_name = "VK" + value.name[len("VK_OBJECT_TYPE"):].replace("_", "")
+ object_types[object_name] = value.name
for handle in self.handles:
- if not handle.is_required() or not handle.is_alias():
+ if not handle.is_required():
continue
- # Use the object type of the alias
- handle.object_type = handle.alias.object_type
+ handle.object_type = object_types.get(handle.name.upper())
if not handle.object_type:
LOGGER.warning("No object type found for {}".format(handle.name))
More information about the wine-cvs
mailing list