mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 05:19:56 +00:00
Destroy backbuffer when shutting down vulkan conext.
This commit is contained in:
parent
fb755bac13
commit
d609a7c8bf
@ -143,23 +143,28 @@ void LibretroVulkanContext::CreateDrawContext() {
|
||||
}
|
||||
|
||||
void LibretroVulkanContext::Shutdown() {
|
||||
LibretroHWRenderContext::Shutdown();
|
||||
if (!vk) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!vk) {
|
||||
return;
|
||||
}
|
||||
if (draw_)
|
||||
draw_->HandleEvent(Draw::Event::LOST_BACKBUFFER, vk->GetBackbufferWidth(), vk->GetBackbufferHeight());
|
||||
|
||||
vk->WaitUntilQueueIdle();
|
||||
delete draw_;
|
||||
draw_ = nullptr;
|
||||
|
||||
vk->DestroySwapchain();
|
||||
vk->DestroySurface();
|
||||
vk->DestroyDevice();
|
||||
vk->DestroyInstance();
|
||||
delete vk;
|
||||
vk = nullptr;
|
||||
vk->WaitUntilQueueIdle();
|
||||
|
||||
finalize_glslang();
|
||||
vk_libretro_shutdown();
|
||||
vk->DestroySwapchain();
|
||||
vk->DestroySurface();
|
||||
vk->DestroyDevice();
|
||||
vk->DestroyInstance();
|
||||
|
||||
delete vk;
|
||||
vk = nullptr;
|
||||
|
||||
finalize_glslang();
|
||||
vk_libretro_shutdown();
|
||||
}
|
||||
|
||||
void *LibretroVulkanContext::GetAPIContext() { return vk; }
|
||||
|
Loading…
Reference in New Issue
Block a user