Introduce overload of getExtensionDepends to get availability and dependencies by vulkan version. (#1559)

This commit is contained in:
Andreas Süßenbach
2023-04-12 11:48:59 +02:00
committed by GitHub
parent 9de0959474
commit 3427b0039b
5 changed files with 109 additions and 4 deletions

View File

@@ -51,7 +51,22 @@ int main( int /*argc*/, char ** /*argv*/ )
std::map<std::string, std::vector<std::string>> depends = vk::getExtensionDepends( VK_KHR_SWAPCHAIN_EXTENSION_NAME );
assert( ( depends.size() == 1 ) && ( depends.begin()->first == "VK_VERSION_1_0" ) && ( depends.begin()->second.size() == 1 ) &&
( depends.begin()->second[0] == VK_KHR_DISPLAY_EXTENSION_NAME ) );
( depends.begin()->second[0] == VK_KHR_SURFACE_EXTENSION_NAME ) );
auto [available0, deps0] = vk::getExtensionDepends( "VK_VERSION_1_0", VK_KHR_SURFACE_EXTENSION_NAME );
assert( available0 && deps0.empty() );
auto [available1, deps1] = vk::getExtensionDepends( "VK_VERSION_1_0", VK_KHR_SWAPCHAIN_EXTENSION_NAME );
assert( available1 && ( deps1.size() == 1 ) && ( deps1[0] == VK_KHR_SURFACE_EXTENSION_NAME ) );
auto [available2, deps2] = vk::getExtensionDepends( "VK_VERSION_1_1", VK_KHR_SWAPCHAIN_EXTENSION_NAME );
assert( available2 && ( deps2.size() == 1 ) && ( deps2[0] == VK_KHR_SURFACE_EXTENSION_NAME ) );
auto [available3, deps3] = vk::getExtensionDepends( "VK_VERSION_1_1", VK_EXT_SHADER_TILE_IMAGE_EXTENSION_NAME );
assert( !available3 );
auto [available4, deps4] = vk::getExtensionDepends( "VK_VERSION_1_3", VK_EXT_SHADER_TILE_IMAGE_EXTENSION_NAME );
assert( available4 && deps4.empty() );
std::map<std::string, std::string> const & deprecatedExtensions = vk::getDeprecatedExtensions();
auto deprecatedIt = deprecatedExtensions.find( VK_EXT_DEBUG_REPORT_EXTENSION_NAME );