VV::V3::DescriptorPool class

A descriptor pool maintains a pool of descriptors, from which descriptor sets are allocated. Descriptor pools are externally synchronized, meaning that the application must not allocate and/or free descriptor sets from the same pool in multiple threads simultaneously.

This object represents a device created object on the host. As such ownership is tied to this host object. Due to this design, the object has no copy-construction allowed. Instead, default move constructor and assignment has been defined.

Base classes

struct VV::V2::DescriptorPool
A descriptor pool maintains a pool of descriptors, from which descriptor sets are allocated. Descriptor pools are externally synchronized, meaning that the application must not allocate and/or free descriptor sets from the same pool in multiple threads simultaneously.

Public types

using Parent = V2::DescriptorPool

Constructors, destructors, conversion operators

DescriptorPool()
Default constructor.
DescriptorPool(const LogicalDevice& _device)
Specifies logical device.
DescriptorPool(const LogicalDevice& _device, const Memory::AllocationCallbacks& _allocator)
Specifies logical device and allocator.
DescriptorPool(DescriptorPool&& _other) noexcept
Performs a move operation to transfer ownership of the device object to this host object.
~DescriptorPool()
Destroys a descriptor pool.
operator Handle&()
Implicit conversion to give a reference to its handle.
operator const Handle&() const
Implicit conversion to give a readonly reference to its handle.
operator const Handle*() const
Implicit conversion to give a pointer to its handle.

Public functions

auto Allocate(AllocateInfo& _info, DescriptorSet::Handle* _handlesContainer) const -> EResult
Allocates descriptor sets based on allocate info and provided via the handles container.
auto Allocate(AllocateInfo& _info, DynamicArray<DescriptorSet>& _sets) const -> EResult
Allocates descriptor sets based on allocate info and provided via the descriptor set dynamic array and handle array.
auto Allocate(AllocateInfo& _info, DynamicArray<DescriptorSet>& _sets, DynamicArray<DescriptorSet::Handle>& _handles) const -> EResult
Allocates descriptor sets based on allocate info and provided via the descriptor set dynamic array and handle array.
auto Create(const CreateInfo& _info) -> EResult
Create a descriptor pool.
auto Create(const LogicalDevice& _device, const CreateInfo& _info) -> EResult
Create a descriptor pool (logical device specified).
auto Create(const LogicalDevice& _device, const CreateInfo& _info, const Memory::AllocationCallbacks& _allocator) -> EResult
Create a descriptor pool (logical device and allocator specified).
void Destroy()
Destroy a descriptor set.
auto Free(ui32 _count, DescriptorSet::Handle* _handles) const -> EResult
Free descriptor sets within the specified handles container.
auto Free(DynamicArray<DescriptorSet::Handle> _handles) const -> EResult
Free descriptor sets specified in the dynamic array.
auto Reset(ResetFlags& _flags) const -> EResult
Return all descriptor sets allocated from a given pool to the pool, rather than freeing individual descriptor sets.
auto operator==(const DescriptorPool& _other) const -> bool
Checks to see if its the same object by checking to see if its the same handle.
auto operator=(DescriptorPool&& _other) -> DescriptorPool& noexcept
Performs a move assignment operation to transfer ownership of the device object to this host object.

Protected variables

Handle handle
const Memory::AllocationCallbacks* allocator
const LogicalDevice* device