[PATCH] winevulkan: Mark members of required structs as required recursively.
This should remove the need for Liam's workaround. Signed-off-by: Derek Lesho <dlesho(a)codeweavers.com> --- dlls/winevulkan/make_vulkan | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan index 4f1c03cc7c..3b80005c58 100755 --- a/dlls/winevulkan/make_vulkan +++ b/dlls/winevulkan/make_vulkan @@ -2718,6 +2718,16 @@ class VkRegistry(object): elif "value" in enum_elem.keys(): self.consts.append(VkConstant(enum_elem.attrib["name"], enum_elem.attrib["value"])) + @staticmethod + def _require_type(type_info): + if type_info.is_alias(): + type_info = type_info.alias + type_info.required = True + if type(type_info) == VkStruct: + for member in type_info.members: + if "data" in member.type_info: + VkRegistry._require_type(member.type_info["data"]) + def _parse_extensions(self, root): """ Parse extensions section and pull in any types and commands for this extensioin. """ extensions = [] @@ -2771,10 +2781,7 @@ class VkRegistry(object): for t in require.findall("type"): type_info = self.types[t.attrib["name"]]["data"] - if type_info.is_alias(): - type_info = type_info.alias - type_info.required = True - + self._require_type(type_info) feature = require.attrib.get("feature") if feature and not self._is_feature_supported(feature): continue -- 2.23.0
Signed-off-by: Liam Middlebrook <lmiddlebrook(a)nvidia.com> Thanks, Liam Middlebrook On 10/30/19 2:12 PM, Derek Lesho wrote:
This should remove the need for Liam's workaround.
Signed-off-by: Derek Lesho <dlesho(a)codeweavers.com> --- dlls/winevulkan/make_vulkan | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan index 4f1c03cc7c..3b80005c58 100755 --- a/dlls/winevulkan/make_vulkan +++ b/dlls/winevulkan/make_vulkan @@ -2718,6 +2718,16 @@ class VkRegistry(object): elif "value" in enum_elem.keys(): self.consts.append(VkConstant(enum_elem.attrib["name"], enum_elem.attrib["value"]))
+ @staticmethod + def _require_type(type_info): + if type_info.is_alias(): + type_info = type_info.alias + type_info.required = True + if type(type_info) == VkStruct: + for member in type_info.members: + if "data" in member.type_info: + VkRegistry._require_type(member.type_info["data"]) + def _parse_extensions(self, root): """ Parse extensions section and pull in any types and commands for this extensioin. """ extensions = [] @@ -2771,10 +2781,7 @@ class VkRegistry(object):
for t in require.findall("type"): type_info = self.types[t.attrib["name"]]["data"] - if type_info.is_alias(): - type_info = type_info.alias - type_info.required = True - + self._require_type(type_info) feature = require.attrib.get("feature") if feature and not self._is_feature_supported(feature): continue
----------------------------------------------------------------------------------- This email message is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. -----------------------------------------------------------------------------------
participants (2)
-
Derek Lesho -
Liam Middlebrook