Fix Vulkan synchronization between CPU and GPU to prevent running over frames in flight

This commit is contained in:
Wojtek Figat
2026-01-28 20:43:01 +01:00
parent 45306ca20e
commit 43b337e163
7 changed files with 57 additions and 12 deletions

View File

@@ -62,8 +62,7 @@ void QueueVulkan::Submit(CmdBufferVulkan* cmdBuffer, uint32 signalSemaphoresCoun
const bool WaitForIdleOnSubmit = false;
if (WaitForIdleOnSubmit)
{
// Use 200ms timeout
bool success = _device->FenceManager.WaitForFence(fence, 200 * 1000 * 1000);
bool success = _device->FenceManager.WaitForFence(fence);
ASSERT(success);
ASSERT(_device->FenceManager.IsFenceSignaled(fence));
cmdBuffer->GetOwner()->RefreshFenceStatus();