mirror of https://github.com/auygun/kaliber.git
Do not reinitialize Vulcan context unnecessarily.
This commit is contained in:
parent
d5ee1c7313
commit
66557f07e3
|
@ -35,9 +35,11 @@ VulkanContext::~VulkanContext() {
|
|||
}
|
||||
|
||||
bool VulkanContext::Initialize() {
|
||||
if (volkInitialize() != VK_SUCCESS) {
|
||||
if (instance_ != VK_NULL_HANDLE)
|
||||
return true;
|
||||
|
||||
if (volkInitialize() != VK_SUCCESS)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!CreatePhysicalDevice())
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue