diff --git a/src/VkBootstrap.cpp b/src/VkBootstrap.cpp index 307df23..e86fbbe 100644 --- a/src/VkBootstrap.cpp +++ b/src/VkBootstrap.cpp @@ -630,9 +630,10 @@ detail::Result InstanceBuilder::build () const { #elif defined(_DIRECT2DISPLAY) bool added_window_exts = check_add_window_ext ("VK_KHR_display"); #elif defined(__linux__) - bool added_window_exts = check_add_window_ext ("VK_KHR_xcb_surface") || - check_add_window_ext ("VK_KHR_xlib_surface") || - check_add_window_ext ("VK_KHR_wayland_surface"); + // make sure all three calls to check_add_window_ext, don't allow short circuiting + bool added_window_exts = check_add_window_ext ("VK_KHR_xcb_surface"); + added_window_exts = check_add_window_ext ("VK_KHR_xlib_surface") || added_window_exts; + added_window_exts = check_add_window_ext ("VK_KHR_wayland_surface") || added_window_exts; #elif defined(__APPLE__) bool added_window_exts = check_add_window_ext ("VK_KHR_metal_surface"); #endif @@ -821,6 +822,9 @@ InstanceBuilder& InstanceBuilder::set_allocation_callbacks (VkAllocationCallback return *this; } +void destroy_debug_messenger(VkInstance const instance, VkDebugUtilsMessengerEXT const messenger); + + // ---- Physical Device ---- // namespace detail { diff --git a/src/VkBootstrap.h b/src/VkBootstrap.h index bfd891f..f84a87c 100644 --- a/src/VkBootstrap.h +++ b/src/VkBootstrap.h @@ -319,6 +319,8 @@ VKAPI_ATTR VkBool32 VKAPI_CALL default_debug_callback (VkDebugUtilsMessageSeveri const VkDebugUtilsMessengerCallbackDataEXT* pCallbackData, void* pUserData); +void destroy_debug_utils_messenger(VkInstance const instance, VkDebugUtilsMessengerEXT const messenger, VkAllocationCallbacks* allocation_callbacks = nullptr); + // ---- Physical Device ---- // class PhysicalDeviceSelector; class DeviceBuilder;