Remove error checks on unknown types and commands for disabled extensions.

This commit is contained in:
asuessenbach 2021-01-06 12:35:56 +01:00
parent 45b5891109
commit 6e86de19ab

View File

@ -709,7 +709,7 @@ void warn( bool condition, int line, std::string const & message )
{ {
if ( !condition ) if ( !condition )
{ {
std::cerr << "Spec warning on line " << std::to_string( line ) << " " << message << "!" << std::endl; std::cerr << "Spec warning on line " << std::to_string( line ) << ": " << message << "!" << std::endl;
} }
} }
@ -8054,13 +8054,15 @@ void VulkanHppGenerator::readExtensionDisabledCommand( tinyxml2::XMLElement cons
// first unlink the command from its class // first unlink the command from its class
auto commandIt = m_commands.find( name ); auto commandIt = m_commands.find( name );
check( commandIt != m_commands.end(), line, "try to remove unknown command <" + name + ">" ); if ( commandIt != m_commands.end() )
{
auto handleIt = m_handles.find( commandIt->second.handle ); auto handleIt = m_handles.find( commandIt->second.handle );
check( handleIt != m_handles.end(), line, "cannot find handle corresponding to command <" + name + ">" ); check( handleIt != m_handles.end(), line, "cannot find handle corresponding to command <" + name + ">" );
handleIt->second.commands.erase( commandIt->first ); handleIt->second.commands.erase( commandIt->first );
// then erase the command from the command list // then erase the command from the command list
m_commands.erase( commandIt ); m_commands.erase( commandIt );
}
} }
void VulkanHppGenerator::readExtensionDisabledEnum( std::string const & extensionName, void VulkanHppGenerator::readExtensionDisabledEnum( std::string const & extensionName,
@ -8144,8 +8146,8 @@ void VulkanHppGenerator::readExtensionDisabledType( tinyxml2::XMLElement const *
std::string name = attributes.find( "name" )->second; std::string name = attributes.find( "name" )->second;
auto typeIt = m_types.find( name ); auto typeIt = m_types.find( name );
check( typeIt != m_types.end(), line, "trying to remove unknown type <" + name + ">" ); if ( typeIt != m_types.end() )
{
switch ( typeIt->second.category ) switch ( typeIt->second.category )
{ {
case TypeCategory::Bitmask: case TypeCategory::Bitmask:
@ -8185,6 +8187,7 @@ void VulkanHppGenerator::readExtensionDisabledType( tinyxml2::XMLElement const *
"trying to remove <" + name + "> of unhandled type <" + toString( typeIt->second.category ) + ">" ); "trying to remove <" + name + "> of unhandled type <" + toString( typeIt->second.category ) + ">" );
break; break;
} }
}
} }
void VulkanHppGenerator::readExtensionRequire( tinyxml2::XMLElement const * element, void VulkanHppGenerator::readExtensionRequire( tinyxml2::XMLElement const * element,