VulkanRenderer: Fix descriptor pool release

This commit is contained in:
Jérôme Leclercq
2021-05-19 20:32:02 +02:00
parent a7235ab02d
commit 49a2cda0a1
3 changed files with 8 additions and 7 deletions

View File

@@ -53,7 +53,7 @@ namespace Nz
using BindingStorage = std::aligned_storage_t<sizeof(VulkanShaderBinding), alignof(VulkanShaderBinding)>;
Bitset<UInt64> freeBindings;
Vk::DescriptorPool descriptorPool;
std::unique_ptr<Vk::DescriptorPool> descriptorPool;
std::unique_ptr<BindingStorage[]> storage;
};

View File

@@ -145,9 +145,8 @@ namespace Nz
inline DescriptorSet& DescriptorSet::operator=(DescriptorSet&& descriptorSet) noexcept
{
m_pool = descriptorSet.m_pool;
std::swap(m_handle, descriptorSet.m_handle);
std::swap(m_pool, descriptorSet.m_pool);
return *this;
}