Reduced listing of unused VkStructureType value from error to warning. (#1664)

This commit is contained in:
Andreas Süßenbach 2023-09-26 15:05:54 +02:00 committed by GitHub
parent 3e1e9b4653
commit f1b8af1157
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 12 deletions

View File

@ -1482,9 +1482,9 @@ void VulkanHppGenerator::checkStructCorrectness() const
else
{
// check for non-alias structureTypes only
checkForError( !enumValue.alias.empty() || ( sTypeValues.erase( enumValue.name ) == 1 ),
enumValue.xmlLine,
"VkStructureType enum value <" + enumValue.name + "> never used" );
checkForWarning( !enumValue.alias.empty() || ( sTypeValues.erase( enumValue.name ) == 1 ),
enumValue.xmlLine,
"VkStructureType enum value <" + enumValue.name + "> never used" );
}
}
assert( sTypeValues.empty() );
@ -11813,13 +11813,14 @@ std::string VulkanHppGenerator::generateSharedHandle( std::pair<std::string, Han
using Shared${type} = SharedHandle<${type}>;
${aliasHandle})";
return replaceWithMap( sharedHandleTemplate,
{ { "aliasHandle", aliasHandle },
{ "deleterAction", ( handleData.second.deleteCommand.substr( 2, 4 ) == "Free" ) ? "Free" : "Destroy" },
{ "deleterPool", handleData.second.deletePool.empty() ? "" : ", " + stripPrefix( handleData.second.deletePool, "Vk" ) },
{ "deleterType", handleData.second.deletePool.empty() ? "Object" : "Pool" },
{ "destructor", handleData.second.destructorType.empty() ? "NoDestructor" : stripPrefix( handleData.second.destructorType, "Vk" ) },
{ "type", type } } );
return replaceWithMap(
sharedHandleTemplate,
{ { "aliasHandle", aliasHandle },
{ "deleterAction", ( handleData.second.deleteCommand.substr( 2, 4 ) == "Free" ) ? "Free" : "Destroy" },
{ "deleterPool", handleData.second.deletePool.empty() ? "" : ", " + stripPrefix( handleData.second.deletePool, "Vk" ) },
{ "deleterType", handleData.second.deletePool.empty() ? "Object" : "Pool" },
{ "destructor", handleData.second.destructorType.empty() ? "NoDestructor" : stripPrefix( handleData.second.destructorType, "Vk" ) },
{ "type", type } } );
}
return "";
}
@ -15155,7 +15156,7 @@ void VulkanHppGenerator::registerDeleter( std::string const & commandName, Comma
auto handleIt = m_handles.find( commandData.params[valueIndex].type.type );
assert( handleIt != m_handles.end() );
handleIt->second.deleteCommand = commandName;
handleIt->second.deleteCommand = commandName;
handleIt->second.destructorType = key;
}
}

View File

@ -13895,7 +13895,7 @@ namespace VULKAN_HPP_NAMESPACE
# elif defined( __APPLE__ )
m_library = dlopen( "libvulkan.dylib", RTLD_NOW | RTLD_LOCAL );
# elif defined( _WIN32 )
m_library = ::LoadLibraryA( "vulkan-1.dll" );
m_library = ::LoadLibraryA( "vulkan-1.dll" );
# else
# error unsupported platform
# endif