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-----");
@ -1384,6 +1386,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,8 +1830,11 @@ 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"));
readTypeStructMember( child, it->second.members, vkData.dependencies.back().dependencies ); if (value == "member")
{
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() );
@ -1864,49 +1870,52 @@ 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 ( child->Attribute( "category" ) ) if (value == "type")
{ {
std::string category = child->Attribute( "category" ); if (child->Attribute("category"))
if ( category == "basetype" )
{ {
readTypeBasetype( child, vkData.dependencies ); std::string category = child->Attribute("category");
if (category == "basetype")
{
readTypeBasetype(child, vkData.dependencies);
} }
else if ( category == "bitmask" ) else if (category == "bitmask")
{ {
readTypeBitmask( child, vkData); readTypeBitmask(child, vkData);
} }
else if ( category == "define" ) else if (category == "define")
{ {
readTypeDefine( child, vkData ); readTypeDefine(child, vkData);
} }
else if ( category == "funcpointer" ) else if (category == "funcpointer")
{ {
readTypeFuncpointer( child, vkData.dependencies ); readTypeFuncpointer(child, vkData.dependencies);
} }
else if ( category == "handle" ) else if (category == "handle")
{ {
readTypeHandle( child, vkData ); readTypeHandle(child, vkData);
} }
else if ( category == "struct" ) else if (category == "struct")
{ {
readTypeStruct( child, vkData, false ); readTypeStruct(child, vkData, false);
} }
else if ( category == "union" ) else if (category == "union")
{ {
readTypeStruct( child, vkData, true ); readTypeStruct(child, vkData, true);
} }
else else
{ {
assert( ( category == "enum" ) || ( category == "include" ) ); assert((category == "enum") || (category == "include"));
} }
} }
else else
{ {
assert( child->Attribute( "name" ) ); assert(child->Attribute("name"));
vkData.dependencies.push_back( DependencyData( DependencyData::Category::REQUIRED, child->Attribute( "name" ) ) ); vkData.dependencies.push_back(DependencyData(DependencyData::Category::REQUIRED, child->Attribute("name")));
}
} }
} }
} }

File diff suppressed because it is too large Load Diff