Vulkan: Replace ShaderBinding& by ShaderBindingPtr

This commit is contained in:
Lynix
2020-04-06 21:13:59 +02:00
parent f443bec6bc
commit ac8b908079
10 changed files with 171 additions and 41 deletions

View File

@@ -21,6 +21,21 @@ namespace Nz
{
return m_pipelineLayout;
}
inline void VulkanRenderPipelineLayout::TryToShrink()
{
std::size_t poolCount = m_descriptorPools.size();
if (poolCount >= 2 && m_descriptorPools.back().freeBindings.TestAll())
{
for (std::size_t i = poolCount - 1; i > 0; ++i)
{
if (m_descriptorPools[i].freeBindings.TestAll())
poolCount--;
}
m_descriptorPools.resize(poolCount);
}
}
}
#include <Nazara/VulkanRenderer/DebugOff.hpp>