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

View File

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