Fix deadlock when reporting debug message on MVKInstance destruction.
This commit is contained in:
parent
568cc3acc0
commit
0584aa0083
@ -723,11 +723,12 @@ MVKInstance::~MVKInstance() {
|
||||
_useCreationCallbacks = true;
|
||||
mvkDestroyContainerContents(_physicalDevices);
|
||||
|
||||
lock_guard<mutex> lock(_dcbLock);
|
||||
mvkDestroyContainerContents(_debugReportCallbacks);
|
||||
|
||||
MVKLogInfo("Destroyed VkInstance for Vulkan version %s with %d Vulkan extensions enabled.",
|
||||
// Since this message may invoke debug callbacks, do it before locking callbacks.
|
||||
MVKLogInfo("Destroying VkInstance for Vulkan version %s with %d Vulkan extensions enabled.",
|
||||
mvkGetVulkanVersionString(_appInfo.apiVersion).c_str(),
|
||||
_enabledExtensions.getEnabledCount());
|
||||
|
||||
lock_guard<mutex> lock(_dcbLock);
|
||||
mvkDestroyContainerContents(_debugReportCallbacks);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user