mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-28 16:49:58 -06:00
Vulkan: Fix present semaphores reuse
Fixes validation errors. See https://docs.vulkan.org/guide/latest/swapchain_semaphore_reuse.html
This commit is contained in:
@ -187,15 +187,6 @@ bool VideoBackend::Initialize(const WindowSystemInfo& wsi)
|
||||
|
||||
UpdateActiveConfig();
|
||||
|
||||
// Create command buffers. We do this separately because the other classes depend on it.
|
||||
g_command_buffer_mgr = std::make_unique<CommandBufferManager>(g_Config.bBackendMultithreading);
|
||||
if (!g_command_buffer_mgr->Initialize())
|
||||
{
|
||||
PanicAlertFmt("Failed to create Vulkan command buffers");
|
||||
Shutdown();
|
||||
return false;
|
||||
}
|
||||
|
||||
// Remaining classes are also dependent on object cache.
|
||||
g_object_cache = std::make_unique<ObjectCache>();
|
||||
if (!g_object_cache->Initialize())
|
||||
@ -218,6 +209,17 @@ bool VideoBackend::Initialize(const WindowSystemInfo& wsi)
|
||||
}
|
||||
}
|
||||
|
||||
// Create command buffers. We do this separately because the other classes depend on it.
|
||||
g_command_buffer_mgr = std::make_unique<CommandBufferManager>(g_Config.bBackendMultithreading);
|
||||
size_t swapchain_image_count =
|
||||
surface != VK_NULL_HANDLE ? swap_chain->GetSwapChainImageCount() : 0;
|
||||
if (!g_command_buffer_mgr->Initialize(swapchain_image_count))
|
||||
{
|
||||
PanicAlertFmt("Failed to create Vulkan command buffers");
|
||||
Shutdown();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!StateTracker::CreateInstance())
|
||||
{
|
||||
PanicAlertFmt("Failed to create state tracker");
|
||||
|
Reference in New Issue
Block a user