Merge "Add a mutex to VulkanManager::initialize." into sc-dev
This commit is contained in:
@@ -340,6 +340,8 @@ void VulkanManager::setupDevice(GrVkExtensions& grExtensions, VkPhysicalDeviceFe
|
|||||||
}
|
}
|
||||||
|
|
||||||
void VulkanManager::initialize() {
|
void VulkanManager::initialize() {
|
||||||
|
std::lock_guard _lock{mInitializeLock};
|
||||||
|
|
||||||
if (mDevice != VK_NULL_HANDLE) {
|
if (mDevice != VK_NULL_HANDLE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -220,6 +220,8 @@ private:
|
|||||||
|
|
||||||
VkSemaphore mSwapSemaphore = VK_NULL_HANDLE;
|
VkSemaphore mSwapSemaphore = VK_NULL_HANDLE;
|
||||||
void* mDestroySemaphoreContext = nullptr;
|
void* mDestroySemaphoreContext = nullptr;
|
||||||
|
|
||||||
|
std::mutex mInitializeLock;
|
||||||
};
|
};
|
||||||
|
|
||||||
} /* namespace renderthread */
|
} /* namespace renderthread */
|
||||||
|
|||||||
Reference in New Issue
Block a user