diff options
Diffstat (limited to 'Graphics/GraphicsEngineVulkan')
| -rw-r--r-- | Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp index 39e7d744..1c8352d6 100644 --- a/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp +++ b/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp @@ -132,10 +132,12 @@ namespace Diligent // There should be no outstanding commands, but we need to call Flush to discard all stale // context resources to actually destroy them in the next call to ReleaseStaleContextResources() Flush(); - // We must now wait for GPU to finish so that we can safely destroy all context resources - pDeviceVkImpl->IdleGPU(true); } + // We must now wait for GPU to finish so that we can safely destroy all context resources. + // We need to idle when destroying deferred contexts as well since some resources may still be in use. + pDeviceVkImpl->IdleGPU(true); + DisposeCurrentCmdBuffer(pDeviceVkImpl->GetNextFenceValue()); // There must be no resources in the stale resource list. For immediate context, all stale resources must have been |
