Add new extension inspection functions getExtensionObsoletedBy() and isExtensionObsoleted() (#1555)

This commit is contained in:
Andreas Süßenbach
2023-04-05 13:37:34 +02:00
committed by GitHub
parent bf8bee64e1
commit a4841bc2f0
4 changed files with 97 additions and 83 deletions

View File

@@ -17,9 +17,11 @@ namespace VULKAN_HPP_NAMESPACE
//======================================
VULKAN_HPP_CONSTEXPR_20 std::string getExtensionDeprecatedBy( std::string const & name );
VULKAN_HPP_CONSTEXPR_20 std::string getExtensionObsoletedBy( std::string const & name );
VULKAN_HPP_CONSTEXPR_20 std::string getExtensionPromotedTo( std::string const & name );
VULKAN_HPP_CONSTEXPR_20 bool isDeviceExtension( std::string const & name );
VULKAN_HPP_CONSTEXPR_20 bool isExtensionDeprecated( std::string const & name );
VULKAN_HPP_CONSTEXPR_20 bool isExtensionObsoleted( std::string const & name );
VULKAN_HPP_CONSTEXPR_20 bool isExtensionPromoted( std::string const & name );
VULKAN_HPP_CONSTEXPR_20 bool isInstanceExtension( std::string const & name );
@@ -98,6 +100,15 @@ namespace VULKAN_HPP_NAMESPACE
return "";
}
VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_20 std::string getExtensionObsoletedBy( std::string const & name )
{
if ( name == "VK_AMD_negative_viewport_height" )
{
return "VK_KHR_maintenance1";
}
return "";
}
VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_20 std::string getExtensionPromotedTo( std::string const & name )
{
if ( name == "VK_KHR_sampler_mirror_clamp_to_edge" )
@@ -581,6 +592,11 @@ namespace VULKAN_HPP_NAMESPACE
( name == "VK_AMD_gpu_shader_int16" ) || ( name == "VK_EXT_buffer_device_address" );
}
VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_20 bool isExtensionObsoleted( std::string const & name )
{
return ( name == "VK_AMD_negative_viewport_height" );
}
VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_20 bool isExtensionPromoted( std::string const & name )
{
return ( name == "VK_KHR_sampler_mirror_clamp_to_edge" ) || ( name == "VK_EXT_debug_marker" ) || ( name == "VK_AMD_draw_indirect_count" ) ||

View File

@@ -17,9 +17,11 @@ namespace VULKAN_HPP_NAMESPACE
//======================================
VULKAN_HPP_CONSTEXPR_20 std::string getExtensionDeprecatedBy( std::string const & name );
VULKAN_HPP_CONSTEXPR_20 std::string getExtensionObsoletedBy( std::string const & name );
VULKAN_HPP_CONSTEXPR_20 std::string getExtensionPromotedTo( std::string const & name );
VULKAN_HPP_CONSTEXPR_20 bool isDeviceExtension( std::string const & name );
VULKAN_HPP_CONSTEXPR_20 bool isExtensionDeprecated( std::string const & name );
VULKAN_HPP_CONSTEXPR_20 bool isExtensionObsoleted( std::string const & name );
VULKAN_HPP_CONSTEXPR_20 bool isExtensionPromoted( std::string const & name );
VULKAN_HPP_CONSTEXPR_20 bool isInstanceExtension( std::string const & name );
@@ -41,6 +43,13 @@ namespace VULKAN_HPP_NAMESPACE
return "";
}
VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_20 std::string getExtensionObsoletedBy( std::string const & name )
{
(void)name;
return "";
}
VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_20 std::string getExtensionPromotedTo( std::string const & name )
{
if ( name == "VK_EXT_texture_compression_astc_hdr" )
@@ -139,6 +148,12 @@ namespace VULKAN_HPP_NAMESPACE
false;
}
VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_20 bool isExtensionObsoleted( std::string const & name )
{
(void)name;
return false;
}
VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_20 bool isExtensionPromoted( std::string const & name )
{
return ( name == "VK_EXT_texture_compression_astc_hdr" ) || ( name == "VK_EXT_global_priority" ) || ( name == "VK_KHR_shader_terminate_invocation" ) ||