mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-04-19 19:18:57 +02:00
vulkan vkQueue dispute fix
This commit is contained in:
parent
a72f444753
commit
1ffa381d74
2 changed files with 7 additions and 0 deletions
|
|
@ -177,6 +177,10 @@ try
|
|||
|
||||
RendererVulkan::~RendererVulkan() {
|
||||
scheduler.RegisterOnSubmit([] {});
|
||||
scheduler.WaitWorker();
|
||||
// vkDeviceWaitIdle MUST be called only after all queue submissions are complete
|
||||
// to avoid threading errors on VkQueue simultaneous access
|
||||
std::scoped_lock lock{scheduler.submit_mutex};
|
||||
void(device.GetLogical().WaitIdle());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -30,6 +30,9 @@ BlitScreen::~BlitScreen() = default;
|
|||
void BlitScreen::WaitIdle() {
|
||||
present_manager.WaitPresent();
|
||||
scheduler.Finish();
|
||||
std::scoped_lock lock{scheduler.submit_mutex};
|
||||
// vkDeviceWaitIdle MUST be protected by submit_mutex to prevent racing with queue submissions
|
||||
// from the worker thread. This ensures no simultaneous access to VkQueue.
|
||||
device.GetLogical().WaitIdle();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue