[vk] Handling threading missuse of VkQueue

This commit is contained in:
CamilleLaVey
2025-11-15 18:30:31 -04:00
parent 311f06047b
commit 6c1fc4b4ed
2 changed files with 4 additions and 1 deletions

View File

@@ -177,6 +177,8 @@ try
RendererVulkan::~RendererVulkan() {
scheduler.RegisterOnSubmit([] {});
// Acquire submit_mutex before WaitIdle to prevent simultaneous queue access
std::scoped_lock lock{scheduler.submit_mutex};
void(device.GetLogical().WaitIdle());
}

View File

@@ -30,7 +30,8 @@ BlitScreen::~BlitScreen() = default;
void BlitScreen::WaitIdle() {
present_manager.WaitPresent();
scheduler.Finish();
device.GetLogical().WaitIdle();
// Note: scheduler.Finish() already waits for GPU and synchronizes submit_mutex
// Calling device.WaitIdle() here causes threading errors (simultaneous queue access)
}
void BlitScreen::SetWindowAdaptPass() {