19 namespace DescriptorSetPool {
25 template <
size_t maxSets>
28 DescriptorSetPool(Renderer& renderer);
30 DescriptorSetPool(
const DescriptorSetPool&) =
delete;
31 DescriptorSetPool(DescriptorSetPool&&) =
delete;
33 DescriptorSetPool& operator=(
const DescriptorSetPool&) =
delete;
34 DescriptorSetPool& operator=(DescriptorSetPool&&) =
delete;
40 std::tuple<bool, const DescriptorSet*> allocate(
size_t hash,
const API::DescriptorSetLayout& descriptorSetLayout);
41 void free(
const DescriptorSet* descriptorSet);
44 DescriptorSet* allocateNewDescriptorSet(
const API::DescriptorSetLayout& descriptorSetLayout);
49 size_t _descriptorSetsCount{0};
52 size_t _freeDescriptorSetsCount{0};
std::map< size_t, DescriptorSet * > _descriptorSetsInUse
API::DescriptorPool descriptorPool
std::array< DescriptorSet, maxSets > _descriptorSets
std::array< DescriptorSet *, maxSets > _freeDescriptorSets