Update to Vulkan 1.0.55 (#116)

This commit is contained in:
Andreas Süßenbach 2017-07-19 09:35:28 +02:00 committed by Markus Tavenrath
parent 195479de01
commit a50ea7dc6c
3 changed files with 3029 additions and 712 deletions

@ -1 +1 @@
Subproject commit 1d67e47f1464d5f5e654a405e9a91c7d5441bbb6 Subproject commit 8e6dc96ef04a12dc4018ca682146d953733f105b

View File

@ -1203,15 +1203,15 @@ std::string readArraySize(tinyxml2::XMLNode * node, std::string& name)
assert(node && node->ToElement() && (strcmp(node->Value(), "enum") == 0)); assert(node && node->ToElement() && (strcmp(node->Value(), "enum") == 0));
arraySize = node->ToElement()->GetText(); arraySize = node->ToElement()->GetText();
node = node->NextSibling(); node = node->NextSibling();
assert(node && node->ToText() && (strcmp(node->Value(), "]") == 0) && !node->NextSibling()); assert(node && node->ToText() && (strcmp(node->Value(), "]") == 0));
} }
else else
{ {
// otherwise, the node holds '[' and ']', so get the stuff in between those as the array size // otherwise, the node holds '[' and ']', so get the stuff in between those as the array size
assert((value.front() == '[') && (value.back() == ']')); assert((value.front() == '[') && (value.back() == ']'));
arraySize = value.substr(1, value.length() - 2); arraySize = value.substr(1, value.length() - 2);
assert(!node->NextSibling());
} }
assert(!node->NextSibling() || ((strcmp(node->NextSibling()->Value(), "comment") == 0) && !node->NextSibling()->NextSibling()));
} }
} }
return arraySize; return arraySize;
@ -1367,9 +1367,11 @@ std::vector<std::string> readCommandSuccessCodes(tinyxml2::XMLElement* element,
void readComment(tinyxml2::XMLElement * element, std::string & header) void readComment(tinyxml2::XMLElement * element, std::string & header)
{ {
assert(element->GetText()); assert(element->GetText());
std::string text = element->GetText();
if (text.find("\nCopyright") == 0)
{
assert(header.empty()); assert(header.empty());
header = element->GetText(); header = text;
assert(header.find("\nCopyright") == 0);
// erase the part after the Copyright text // erase the part after the Copyright text
size_t pos = header.find("\n\n-----"); size_t pos = header.find("\n\n-----");
@ -1385,6 +1387,7 @@ void readComment(tinyxml2::XMLElement * element, std::string & header)
// and add a little message on our own // and add a little message on our own
header += "\n\n// This header is generated from the Khronos Vulkan XML API Registry."; header += "\n\n// This header is generated from the Khronos Vulkan XML API Registry.";
} }
}
void readEnums( tinyxml2::XMLElement * element, VkData & vkData ) void readEnums( tinyxml2::XMLElement * element, VkData & vkData )
{ {
@ -1827,9 +1830,12 @@ void readTypeStruct( tinyxml2::XMLElement * element, VkData & vkData, bool isUni
{ {
assert( child->Value() ); assert( child->Value() );
std::string value = child->Value(); std::string value = child->Value();
assert(value == "member"); assert((value == "comment") || (value == "member"));
if (value == "member")
{
readTypeStructMember(child, it->second.members, vkData.dependencies.back().dependencies); readTypeStructMember(child, it->second.members, vkData.dependencies.back().dependencies);
} }
}
assert( vkData.vkTypes.find( name ) == vkData.vkTypes.end() ); assert( vkData.vkTypes.find( name ) == vkData.vkTypes.end() );
vkData.vkTypes.insert( name ); vkData.vkTypes.insert( name );
@ -1864,9 +1870,11 @@ void readTypes(tinyxml2::XMLElement * element, VkData & vkData)
{ {
for (tinyxml2::XMLElement * child = element->FirstChildElement(); child; child = child->NextSiblingElement()) for (tinyxml2::XMLElement * child = element->FirstChildElement(); child; child = child->NextSiblingElement())
{ {
assert( strcmp( child->Value(), "type" ) == 0 ); assert(child->Value());
std::string type = child->Value(); std::string value = child->Value();
assert( type == "type" ); assert((value == "comment") || (value == "type"));
if (value == "type")
{
if (child->Attribute("category")) if (child->Attribute("category"))
{ {
std::string category = child->Attribute("category"); std::string category = child->Attribute("category");
@ -1910,6 +1918,7 @@ void readTypes(tinyxml2::XMLElement * element, VkData & vkData)
} }
} }
} }
}
std::string reduceName(std::string const& name, bool singular) std::string reduceName(std::string const& name, bool singular)
{ {

File diff suppressed because it is too large Load Diff