Renderer: Add release queue to fix deletion while use

This commit is contained in:
Jérôme Leclercq
2021-05-14 02:04:47 +02:00
parent 51ecff2912
commit f280cff0a2
13 changed files with 163 additions and 15 deletions

View File

@@ -45,7 +45,7 @@ namespace Nz
if (!regenerateCommandBuffer)
continue;
passData.commandBuffer.reset(); //< Release command buffer resources before reallocating it
renderFrame.PushForRelease(std::move(passData.commandBuffer));
passData.commandBuffer = m_commandPool->BuildCommandBuffer([&](CommandBufferBuilder& builder)
{
for (auto& textureTransition : passData.transitions)