tp::DescriptorPool class

Enables efficient creation, storage and reuse of tp::DescriptorSet objects.

Base classes

class Ownable
A customizable base class that is used for objects returned by the API in an OwningPtr.

Public functions

void allocateDescriptorSets(const DescriptorSetLayout* descriptorSetLayout, ArrayParameter<const DescriptorSetSetup> descriptorSetSetups, ArrayParameter<DescriptorSet*const> allocatedDescriptorSets)
Allocates multiple descriptor sets with the same layout from the pool.
void reserve(const DescriptorSetLayout* descriptorSetLayout, uint32_t descriptorSetCount)
Preallocates space for the given number of descriptor sets using the provided layout. If usage characteristics are known ahead of time, it may be more efficient to preallocate the required space at once.

Function documentation

void tp::DescriptorPool::allocateDescriptorSets(const DescriptorSetLayout* descriptorSetLayout, ArrayParameter<const DescriptorSetSetup> descriptorSetSetups, ArrayParameter<DescriptorSet*const> allocatedDescriptorSets)

Allocates multiple descriptor sets with the same layout from the pool.

Parameters
descriptorSetLayout The layout to be used for the descriptor sets.
descriptorSetSetups The setup structures used to create each descriptor set.
allocatedDescriptorSets An output array of pointers to the descriptor sets to be allocated. Must be of the same size as descriptorSetSetups.

void tp::DescriptorPool::reserve(const DescriptorSetLayout* descriptorSetLayout, uint32_t descriptorSetCount)

Preallocates space for the given number of descriptor sets using the provided layout. If usage characteristics are known ahead of time, it may be more efficient to preallocate the required space at once.

Parameters
descriptorSetLayout The descriptor set layout for which the memory will be reserved.
descriptorSetCount The number of descriptor sets using the provided layout for which the memory will be reserved.