diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2018-10-06 23:12:51 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2018-10-06 23:12:51 +0000 |
| commit | 3594d22c4a575c0551a3aa101c91de8f3c573e07 (patch) | |
| tree | 6daf0a9b913e53aa98651eeb289ab605611c9e5c /Graphics/GraphicsEngineVulkan | |
| parent | Added VariableSizeAllocationsManager::Allocation::IsValid() method for cleare... (diff) | |
| download | DiligentCore-3594d22c4a575c0551a3aa101c91de8f3c573e07.tar.gz DiligentCore-3594d22c4a575c0551a3aa101c91de8f3c573e07.zip | |
Re-enabled idling GPU in VulkanDynamicMemoryManager::AllocateMasterBlock() since that seems to not cause a deadlock anymore
Diffstat (limited to 'Graphics/GraphicsEngineVulkan')
| -rw-r--r-- | Graphics/GraphicsEngineVulkan/src/VulkanDynamicHeap.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/Graphics/GraphicsEngineVulkan/src/VulkanDynamicHeap.cpp b/Graphics/GraphicsEngineVulkan/src/VulkanDynamicHeap.cpp index 0e5f4957..d14d3fb4 100644 --- a/Graphics/GraphicsEngineVulkan/src/VulkanDynamicHeap.cpp +++ b/Graphics/GraphicsEngineVulkan/src/VulkanDynamicHeap.cpp @@ -160,19 +160,17 @@ VulkanDynamicMemoryManager::MasterBlock VulkanDynamicMemoryManager::AllocateMast if (!Block.IsValid()) { - // Last resort - idle GPU (there seems to be a driver bug: vkQueueWaitIdle() deadlocks and never returns) - //m_DeviceVk.IdleGPU(true); - //auto LastCompletedFenceValue = m_DeviceVk.GetCompletedFenceValue(); - //m_AllocationStrategy.ReleaseStaleAllocations(LastCompletedFenceValue); - //Offset = m_AllocationStrategy.Allocate(SizeInBytes); + // Last resort - idle GPU (there seems to have been a driver bug at some point: vkQueueWaitIdle() would deadlock and never return) + m_DeviceVk.IdleGPU(); + Block = TBase::AllocateMasterBlock(SizeInBytes, Alignment); if (!Block.IsValid()) { LOG_ERROR_MESSAGE("Space in dynamic heap is exausted! After idling for ", std::fixed, std::setprecision(1), IdleDuration.count()*1000.0, " ms still no space is available. Increase the size of the heap by setting EngineVkAttribs::DynamicHeapSize to a greater value or optimize dynamic resource usage"); } - //else - //{ - // LOG_WARNING_MESSAGE("Space in dynamic heap is almost exausted. Allocation forced idling the GPU. Increase the size of the heap by setting EngineVkAttribs::DynamicHeapSize to a greater value or optimize dynamic resource usage"); - //} + else + { + LOG_WARNING_MESSAGE("Space in dynamic heap is almost exausted. Allocation forced idling the GPU. Increase the size of the heap by setting EngineVkAttribs::DynamicHeapSize to a greater value or optimize dynamic resource usage"); + } } else { |
