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

@@ -57,7 +57,7 @@ namespace Nz
invalidateFramebuffer = true;
}
VulkanRenderImage& currentFrame = m_concurrentImageData[m_currentFrame];
VulkanRenderImage& currentFrame = *m_concurrentImageData[m_currentFrame];
Vk::Fence& inFlightFence = currentFrame.GetInFlightFence();
// Wait until previous rendering to this image has been done
@@ -564,7 +564,7 @@ namespace Nz
m_concurrentImageData.reserve(imageCount);
for (std::size_t i = 0; i < imageCount; ++i)
m_concurrentImageData.emplace_back(*this);
m_concurrentImageData.emplace_back(std::make_unique<VulkanRenderImage>(*this));
}
return true;