mirror of
https://github.com/charles-lunarg/vk-bootstrap.git
synced 2024-11-22 07:24:34 +00:00
Fix linux surface extension bug, make destroy_debug_utils_messenger public
Making the destroy_messenger public allows code to store the handle directly and delete it themselves instead of having to hold onto a vkb::Instance, which requires including the header.
This commit is contained in:
parent
6e50441f41
commit
d314069e1a
@ -630,9 +630,10 @@ detail::Result<Instance> 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 {
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user