Loading vulkan/libvulkan/debug_report.cpp +23 −12 Original line number Diff line number Diff line Loading @@ -23,11 +23,16 @@ VkResult DebugReportCallbackList::CreateCallback( const VkDebugReportCallbackCreateInfoEXT* create_info, const VkAllocationCallbacks* allocator, VkDebugReportCallbackEXT* callback) { VkDebugReportCallbackEXT driver_callback; VkResult result = GetDriverDispatch(instance).CreateDebugReportCallbackEXT( GetDriverInstance(instance), create_info, allocator, &driver_callback); VkDebugReportCallbackEXT driver_callback = VK_NULL_HANDLE; if (GetDriverDispatch(instance).CreateDebugReportCallbackEXT) { VkResult result = GetDriverDispatch(instance).CreateDebugReportCallbackEXT( GetDriverInstance(instance), create_info, allocator, &driver_callback); if (result != VK_SUCCESS) return result; } const VkAllocationCallbacks* alloc = allocator ? allocator : GetAllocator(instance); Loading @@ -35,8 +40,10 @@ VkResult DebugReportCallbackList::CreateCallback( alloc->pfnAllocation(alloc->pUserData, sizeof(Node), alignof(Node), VK_SYSTEM_ALLOCATION_SCOPE_OBJECT); if (!mem) { if (GetDriverDispatch(instance).DestroyDebugReportCallbackEXT) { GetDriverDispatch(instance).DestroyDebugReportCallbackEXT( GetDriverInstance(instance), driver_callback, allocator); } return VK_ERROR_OUT_OF_HOST_MEMORY; } Loading @@ -61,8 +68,10 @@ void DebugReportCallbackList::DestroyCallback( prev->next = node->next; lock.unlock(); if (GetDriverDispatch(instance).DestroyDebugReportCallbackEXT) { GetDriverDispatch(instance).DestroyDebugReportCallbackEXT( GetDriverInstance(instance), node->driver_callback, allocator); } const VkAllocationCallbacks* alloc = allocator ? allocator : GetAllocator(instance); Loading Loading @@ -112,9 +121,11 @@ void DebugReportMessageEXT_Bottom(VkInstance instance, int32_t message_code, const char* layer_prefix, const char* message) { if (GetDriverDispatch(instance).DebugReportMessageEXT) { GetDriverDispatch(instance).DebugReportMessageEXT( GetDriverInstance(instance), flags, object_type, object, location, message_code, layer_prefix, message); } GetDebugReportCallbacks(instance).Message(flags, object_type, object, location, message_code, layer_prefix, message); Loading vulkan/libvulkan/loader.cpp +5 −2 Original line number Diff line number Diff line Loading @@ -547,11 +547,14 @@ VkResult CreateInstance_Bottom(const VkInstanceCreateInfo* create_info, enabled_extensions.set(id); continue; } if (id == kKHR_surface || id == kKHR_android_surface || id == kEXT_debug_report) { if (id == kKHR_surface || id == kKHR_android_surface) { enabled_extensions.set(id); continue; } // The loader natively supports debug report. if (id == kEXT_debug_report) { continue; } } bool supported = false; for (const auto& layer : instance.active_layers) { Loading Loading
vulkan/libvulkan/debug_report.cpp +23 −12 Original line number Diff line number Diff line Loading @@ -23,11 +23,16 @@ VkResult DebugReportCallbackList::CreateCallback( const VkDebugReportCallbackCreateInfoEXT* create_info, const VkAllocationCallbacks* allocator, VkDebugReportCallbackEXT* callback) { VkDebugReportCallbackEXT driver_callback; VkResult result = GetDriverDispatch(instance).CreateDebugReportCallbackEXT( GetDriverInstance(instance), create_info, allocator, &driver_callback); VkDebugReportCallbackEXT driver_callback = VK_NULL_HANDLE; if (GetDriverDispatch(instance).CreateDebugReportCallbackEXT) { VkResult result = GetDriverDispatch(instance).CreateDebugReportCallbackEXT( GetDriverInstance(instance), create_info, allocator, &driver_callback); if (result != VK_SUCCESS) return result; } const VkAllocationCallbacks* alloc = allocator ? allocator : GetAllocator(instance); Loading @@ -35,8 +40,10 @@ VkResult DebugReportCallbackList::CreateCallback( alloc->pfnAllocation(alloc->pUserData, sizeof(Node), alignof(Node), VK_SYSTEM_ALLOCATION_SCOPE_OBJECT); if (!mem) { if (GetDriverDispatch(instance).DestroyDebugReportCallbackEXT) { GetDriverDispatch(instance).DestroyDebugReportCallbackEXT( GetDriverInstance(instance), driver_callback, allocator); } return VK_ERROR_OUT_OF_HOST_MEMORY; } Loading @@ -61,8 +68,10 @@ void DebugReportCallbackList::DestroyCallback( prev->next = node->next; lock.unlock(); if (GetDriverDispatch(instance).DestroyDebugReportCallbackEXT) { GetDriverDispatch(instance).DestroyDebugReportCallbackEXT( GetDriverInstance(instance), node->driver_callback, allocator); } const VkAllocationCallbacks* alloc = allocator ? allocator : GetAllocator(instance); Loading Loading @@ -112,9 +121,11 @@ void DebugReportMessageEXT_Bottom(VkInstance instance, int32_t message_code, const char* layer_prefix, const char* message) { if (GetDriverDispatch(instance).DebugReportMessageEXT) { GetDriverDispatch(instance).DebugReportMessageEXT( GetDriverInstance(instance), flags, object_type, object, location, message_code, layer_prefix, message); } GetDebugReportCallbacks(instance).Message(flags, object_type, object, location, message_code, layer_prefix, message); Loading
vulkan/libvulkan/loader.cpp +5 −2 Original line number Diff line number Diff line Loading @@ -547,11 +547,14 @@ VkResult CreateInstance_Bottom(const VkInstanceCreateInfo* create_info, enabled_extensions.set(id); continue; } if (id == kKHR_surface || id == kKHR_android_surface || id == kEXT_debug_report) { if (id == kKHR_surface || id == kKHR_android_surface) { enabled_extensions.set(id); continue; } // The loader natively supports debug report. if (id == kEXT_debug_report) { continue; } } bool supported = false; for (const auto& layer : instance.active_layers) { Loading