Add get_surface_extension to WaylandSystemDriver

This commit is contained in:
2025-03-31 22:35:44 +10:00
parent 6a77722ff5
commit 595f8a26de
3 changed files with 21 additions and 1 deletions

View File

@@ -118,8 +118,13 @@ void VulkanRenderDriver::_check_extensions() {
u32 count;
std::unordered_map<std::string_view, bool> requested; // <extension, required>
const auto surface_extension = System::get_driver()->get_surface_extension();
if (!surface_extension) {
throw std::runtime_error("Could not determine required surface extension");
}
requested[VK_KHR_SURFACE_EXTENSION_NAME] = true;
requested[System::get_driver()->get_surface_extension()] = true;
requested[surface_extension] = true;
// Add optional extensions
requested[VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME] = false;