VulkanRenderer: Handle VulkanRenderPass destruction

This commit is contained in:
Jérôme Leclercq
2021-07-17 20:56:36 +02:00
parent 1c77a5e549
commit 40ecdda3cd
4 changed files with 33 additions and 8 deletions

View File

@@ -10,7 +10,7 @@
namespace Nz
{
inline VulkanRenderPass::VulkanRenderPass(Vk::Device& device, std::vector<Attachment> attachments, std::vector<SubpassDescription> subpassDescriptions, std::vector<SubpassDependency> subpassDependencies) :
VulkanRenderPass::VulkanRenderPass(Vk::Device& device, std::vector<Attachment> attachments, std::vector<SubpassDescription> subpassDescriptions, std::vector<SubpassDependency> subpassDependencies) :
RenderPass(std::move(attachments), std::move(subpassDescriptions), std::move(subpassDependencies))
{
std::size_t totalAttachmentReference = 0;
@@ -128,4 +128,9 @@ namespace Nz
if (!m_renderPass.Create(device, renderPassInfo))
throw std::runtime_error("failed to instantiate Vulkan render pass: " + TranslateVulkanError(m_renderPass.GetLastErrorCode()));
}
VulkanRenderPass::~VulkanRenderPass()
{
OnRenderPassRelease(this);
}
}