Files
NazaraEngine/include/Nazara/VulkanRenderer/VulkanRenderPipelineLayout.inl
SirLynix 5130a2ff84 Remove Config.hpp options and refactor headers
- Rename Config.hpp to Export.hpp
- Remove Debug.hpp and DebugOff.hpp (not used anymore)
2024-02-19 15:11:34 +01:00

36 lines
832 B
C++

// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Vulkan renderer"
// For conditions of distribution and use, see copyright notice in Export.hpp
namespace Nz
{
inline Vk::Device* VulkanRenderPipelineLayout::GetDevice() const
{
return m_device.Get();
}
inline const Vk::PipelineLayout& VulkanRenderPipelineLayout::GetPipelineLayout() const
{
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())
break;
poolCount--;
}
m_descriptorPools.resize(poolCount);
}
}
}