mirror of
https://github.com/KhronosGroup/Vulkan-Hpp.git
synced 2024-10-14 16:32:17 +00:00
Relax check on "depends" for extension requires. (#1637)
This commit is contained in:
parent
87936f9bc8
commit
e2f5348e28
@ -1300,10 +1300,11 @@ void VulkanHppGenerator::checkExtensionCorrectness() const
|
|||||||
{
|
{
|
||||||
if ( !require.depends.empty() )
|
if ( !require.depends.empty() )
|
||||||
{
|
{
|
||||||
for ( auto const & depends : require.depends )
|
std::vector<std::string> depends = tokenizeAny( require.depends, ",+()" );
|
||||||
|
for ( auto const & depend : depends )
|
||||||
{
|
{
|
||||||
checkForError(
|
checkForError(
|
||||||
isFeature( depends ) || isExtension( depends ), require.xmlLine, "extension <" + extension.name + "> lists an unknown depends <" + depends + ">" );
|
isFeature( depend ) || isExtension( depend ), require.xmlLine, "extension <" + extension.name + "> lists an unknown depends <" + depend + ">" );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -12672,18 +12673,12 @@ void VulkanHppGenerator::readExtensionRequire( tinyxml2::XMLElement const * elem
|
|||||||
else if ( attribute.first == "depends" )
|
else if ( attribute.first == "depends" )
|
||||||
{
|
{
|
||||||
assert( requireData.depends.empty() );
|
assert( requireData.depends.empty() );
|
||||||
requireData.depends = tokenizeAny( attribute.second, ",+" );
|
requireData.depends = attribute.second;
|
||||||
for ( auto const & d : requireData.depends )
|
checkForError( std::none_of( extensionData.requireData.begin(),
|
||||||
{
|
extensionData.requireData.end(),
|
||||||
checkForError( std::none_of( extensionData.requireData.begin(),
|
[&requireData]( RequireData const & rd ) { return rd.depends == requireData.depends; } ),
|
||||||
extensionData.requireData.end(),
|
line,
|
||||||
[&d]( RequireData const & rd ) {
|
"required extension <" + requireData.depends + "> already listed" );
|
||||||
return std::any_of(
|
|
||||||
rd.depends.begin(), rd.depends.end(), [&d]( std::string const & requireDepends ) { return requireDepends == d; } );
|
|
||||||
} ),
|
|
||||||
line,
|
|
||||||
"required extension <" + d + "> already listed" );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -202,7 +202,7 @@ private:
|
|||||||
|
|
||||||
struct RequireData
|
struct RequireData
|
||||||
{
|
{
|
||||||
std::vector<std::string> depends = {};
|
std::string depends = {};
|
||||||
std::vector<std::string> commands = {};
|
std::vector<std::string> commands = {};
|
||||||
std::vector<std::string> constants = {};
|
std::vector<std::string> constants = {};
|
||||||
std::vector<std::string> types = {};
|
std::vector<std::string> types = {};
|
||||||
|
Loading…
Reference in New Issue
Block a user