We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3b17273 commit 6a4ae21Copy full SHA for 6a4ae21
src/util/vulkan_loader.cpp
@@ -600,6 +600,12 @@ void VulkanLoader::LockedReleaseVulkanInstance()
600
// We specifically keep the instance around even after releasing it.
601
// Both AMD on Windows and Mesa leak a few tens of megabytes for every instance...
602
DEV_LOG("Released Vulkan instance, reference count {}", s_locals.reference_count);
603
+
604
+#ifdef ENABLE_SDL
605
+ // SDL Vulkan kinda breaks OpenGL contexts if the instance isn't destroyed...
606
+ if (s_locals.window_type == WindowInfoType::SDL && s_locals.reference_count == 0)
607
+ LockedDestroyVulkanInstance();
608
+#endif
609
}
610
611
void VulkanLoader::LockedDestroyVulkanInstance()
0 commit comments