diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2018-09-24 05:43:54 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2018-09-24 05:43:54 +0000 |
| commit | e3c0280310086a3fbe69d9fbc2411068e2a651ba (patch) | |
| tree | 69a1b24392b8daa64b322624f15fead3a7e0d658 /Graphics/GraphicsEngineNextGenBase | |
| parent | Reworked transient command buffer pool manager to use release queue (diff) | |
| download | DiligentCore-e3c0280310086a3fbe69d9fbc2411068e2a651ba.tar.gz DiligentCore-e3c0280310086a3fbe69d9fbc2411068e2a651ba.zip | |
Couple updates to processing release queue in Vk backend
Diffstat (limited to 'Graphics/GraphicsEngineNextGenBase')
| -rw-r--r-- | Graphics/GraphicsEngineNextGenBase/include/RenderDeviceNextGenBase.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/Graphics/GraphicsEngineNextGenBase/include/RenderDeviceNextGenBase.h b/Graphics/GraphicsEngineNextGenBase/include/RenderDeviceNextGenBase.h index d7c03e0d..8ce07d89 100644 --- a/Graphics/GraphicsEngineNextGenBase/include/RenderDeviceNextGenBase.h +++ b/Graphics/GraphicsEngineNextGenBase/include/RenderDeviceNextGenBase.h @@ -147,12 +147,16 @@ public: void PurgeReleaseQueues(bool ForceRelease = false) { - for(size_t q=0; q < m_CmdQueueCount; ++q) - { - auto& Queue = m_CommandQueues[q]; - auto CompletedFenceValue = ForceRelease ? std::numeric_limits<Uint64>::max() : Queue.CmdQueue->GetCompletedFenceValue(); - Queue.ReleaseQueue.Purge(CompletedFenceValue); - } + for(Uint32 q=0; q < m_CmdQueueCount; ++q) + PurgeReleaseQueue(q); + } + + void PurgeReleaseQueue(Uint32 QueueIndex, bool ForceRelease = false) + { + VERIFY_EXPR(QueueIndex < m_CmdQueueCount); + auto& Queue = m_CommandQueues[QueueIndex]; + auto CompletedFenceValue = ForceRelease ? std::numeric_limits<Uint64>::max() : Queue.CmdQueue->GetCompletedFenceValue(); + Queue.ReleaseQueue.Purge(CompletedFenceValue); } void IdleCommandQueues(bool ReleaseResources) |
