Merge pull request #6124 from stenzek/vulkan-shutdown-vxfb

Vulkan: Fix crash on shutdown with Virtual XFB enabled
This commit is contained in:
Leo Lam 2017-10-22 16:42:24 +02:00 committed by GitHub
commit 6e9e681438
1 changed files with 2 additions and 2 deletions

View File

@ -218,7 +218,7 @@ bool VideoBackend::Initialize(void* window_handle)
// These have to be done before the others because the destructors
// for the remaining classes may call methods on these.
if (!g_object_cache->Initialize() || !g_shader_cache->Initialize() ||
!FramebufferManager::GetInstance()->Initialize() || !StateTracker::CreateInstance() ||
!StateTracker::CreateInstance() || !FramebufferManager::GetInstance()->Initialize() ||
!Renderer::GetInstance()->Initialize())
{
PanicAlert("Failed to initialize Vulkan classes.");
@ -269,8 +269,8 @@ void VideoBackend::Shutdown()
g_texture_cache.reset();
g_vertex_manager.reset();
g_renderer.reset();
StateTracker::DestroyInstance();
g_framebuffer_manager.reset();
StateTracker::DestroyInstance();
if (g_shader_cache)
g_shader_cache->Shutdown();
g_shader_cache.reset();