From 6d2fadf8f12c49ec30157eea165fb9ddcc34354b Mon Sep 17 00:00:00 2001 From: Mike Schuchardt Date: Tue, 12 Sep 2017 10:47:48 -0600 Subject: [PATCH] Handle multiple require tags in extension block --- VulkanHppGenerator.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/VulkanHppGenerator.cpp b/VulkanHppGenerator.cpp index 54c2d61..453c9a1 100644 --- a/VulkanHppGenerator.cpp +++ b/VulkanHppGenerator.cpp @@ -1676,7 +1676,7 @@ void readExtensionsExtension(tinyxml2::XMLElement * element, VkData & vkData) assert(vkData.tags.find(tag) != vkData.tags.end()); tinyxml2::XMLElement * child = element->FirstChildElement(); - assert(child && (strcmp(child->Value(), "require") == 0) && !child->NextSiblingElement()); + assert(child && (strcmp(child->Value(), "require") == 0)); if (strcmp(element->Attribute("supported"), "disabled") == 0) { @@ -1690,8 +1690,11 @@ void readExtensionsExtension(tinyxml2::XMLElement * element, VkData & vkData) { protect = element->Attribute("protect"); } - - readExtensionRequire(child, vkData, protect, tag); + while (child) { + assert(strcmp(child->Value(), "require") == 0); + readExtensionRequire(child, vkData, protect, tag); + child = child->NextSiblingElement(); + } } }