[PATCH 1/2] winevulkan: Don't use comments for object types.
Georg Lehmann
dadschoorse at gmail.com
Tue Oct 27 16:02:46 CDT 2020
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>
---
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 a07c1d77bf5..bc9462fb9c7 100755
--- a/dlls/winevulkan/make_vulkan
+++ b/dlls/winevulkan/make_vulkan
@@ -2737,21 +2737,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))
--
2.29.1
More information about the wine-devel
mailing list