vpr::DescriptorPool class

RAII wrapper around a VkDescriptorPool intended to facilitate sharing of descriptor pools between disparate objects, thus increasing resource sharing and avoiding allocating single-use descriptor pools (as this is an expensive operation).

Contents

Public functions

void AddResourceType(const VkDescriptorType& descriptor_type, const uint32_t& descriptor_count)
Effectively requests that this pool adds the given quantity of the given descriptor types to its eventual allocation call.
void Create()
Make sure to call this AFTER setting how many descriptors you require, otherwise nothing will really be created and attempting to use any descriptor sets with this pool will fail.

Function documentation

void vpr::DescriptorPool::AddResourceType(const VkDescriptorType& descriptor_type, const uint32_t& descriptor_count)

Effectively requests that this pool adds the given quantity of the given descriptor types to its eventual allocation call.

If you try to use more of a given descriptor type than has been allocated, bad things will almost certainly occur.