Handle multiple require tags in extension block

This commit is contained in:
Mike Schuchardt 2017-09-12 10:47:48 -06:00
parent d7346bf749
commit 6d2fadf8f1

View File

@ -1676,7 +1676,7 @@ void readExtensionsExtension(tinyxml2::XMLElement * element, VkData & vkData)
assert(vkData.tags.find(tag) != vkData.tags.end()); assert(vkData.tags.find(tag) != vkData.tags.end());
tinyxml2::XMLElement * child = element->FirstChildElement(); 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) if (strcmp(element->Attribute("supported"), "disabled") == 0)
{ {
@ -1690,8 +1690,11 @@ void readExtensionsExtension(tinyxml2::XMLElement * element, VkData & vkData)
{ {
protect = element->Attribute("protect"); protect = element->Attribute("protect");
} }
while (child) {
readExtensionRequire(child, vkData, protect, tag); assert(strcmp(child->Value(), "require") == 0);
readExtensionRequire(child, vkData, protect, tag);
child = child->NextSiblingElement();
}
} }
} }