Move the responsibility to register the debugutils callback to the VulkanContext. We only use one anyway.

This commit is contained in:
Henrik Rydgård committed 2020-06-21 23:04:51 +02:00
1 parent 6532c345c8
commit fbc4fa5bca
4 files changed
+15 -19

No files matched your search

+1 -4
View File
@@ -127,9 +127,7 @@ bool WindowsVulkanContext::Init(HINSTANCE hInst, HWND hWnd, std::string *error_m
g_Vulkan = nullptr;
return false;
}
if (g_validate_) {
g_Vulkan->InitDebugUtilsCallback();
}
g_Vulkan->InitSurface(WINDOWSYSTEM_WIN32, (void *)hInst, (void *)hWnd);
if (!g_Vulkan->InitObjects()) {
*error_message = g_Vulkan->InitError();
@@ -164,7 +162,6 @@ void WindowsVulkanContext::Shutdown() {
g_Vulkan->WaitUntilQueueIdle();
g_Vulkan->DestroyObjects();
g_Vulkan->DestroyDevice();
g_Vulkan->DestroyDebugUtilsCallback();
g_Vulkan->DestroyInstance();
delete g_Vulkan;