Divide Framework 0.1
A free and open-source 3D Framework under heavy development
Loading...
Searching...
No Matches
vke::DescriptorAllocatorPool Class Reference

#include <descriptor_allocator.h>

Public Member Functions

 ~DescriptorAllocatorPool ()
 
void Flip ()
 Not thread safe! Switches default allocators to the next frame. When frames loop it will reset the descriptors of that frame.
 
void SetPoolSizeMultiplier (VkDescriptorType type, float multiplier)
 Not thread safe! Override the pool size for a specific descriptor type. This will be used new pools are allocated.
 
DescriptorAllocatorHandle GetAllocator ()
 

Static Public Member Functions

static DescriptorAllocatorPoolCreate (const VkDevice &device, Divide::I32 nFrames=3)
 

Protected Member Functions

void ReturnAllocator (DescriptorAllocatorHandle &handle, bool bIsFull)
 
VkDescriptorPool createPool (Divide::I32 count, VkDescriptorPoolCreateFlags flags)
 

Private Attributes

VkDevice _device { 0 }
 
PoolSizes _poolSizes
 
Divide::I32 _frameIndex { 0 }
 
Divide::I32 _maxFrames { 3 }
 
Divide::Mutex _poolMutex
 
Divide::vector< std::unique_ptr< PoolStorage > > _descriptorPools
 
Divide::vector< DescriptorAllocator_clearAllocators
 

Friends

struct DescriptorAllocatorHandle
 

Detailed Description

Definition at line 91 of file descriptor_allocator.h.

Constructor & Destructor Documentation

◆ ~DescriptorAllocatorPool()

vke::DescriptorAllocatorPool::~DescriptorAllocatorPool ( )

Definition at line 156 of file descriptor_allocator.cpp.

Member Function Documentation

◆ Create()

vke::DescriptorAllocatorPool * vke::DescriptorAllocatorPool::Create ( const VkDevice &  device,
Divide::I32  nFrames = 3 
)
static

Definition at line 17 of file descriptor_allocator.cpp.

◆ createPool()

VkDescriptorPool vke::DescriptorAllocatorPool::createPool ( Divide::I32  count,
VkDescriptorPoolCreateFlags  flags 
)
protected

Definition at line 126 of file descriptor_allocator.cpp.

◆ Flip()

void vke::DescriptorAllocatorPool::Flip ( )

Not thread safe! Switches default allocators to the next frame. When frames loop it will reset the descriptors of that frame.

Definition at line 176 of file descriptor_allocator.cpp.

◆ GetAllocator()

vke::DescriptorAllocatorHandle vke::DescriptorAllocatorPool::GetAllocator ( )

Definition at line 232 of file descriptor_allocator.cpp.

◆ ReturnAllocator()

void vke::DescriptorAllocatorPool::ReturnAllocator ( DescriptorAllocatorHandle handle,
bool  bIsFull 
)
protected

Definition at line 218 of file descriptor_allocator.cpp.

◆ SetPoolSizeMultiplier()

void vke::DescriptorAllocatorPool::SetPoolSizeMultiplier ( VkDescriptorType  type,
float  multiplier 
)

Not thread safe! Override the pool size for a specific descriptor type. This will be used new pools are allocated.

Definition at line 203 of file descriptor_allocator.cpp.

Friends And Related Function Documentation

◆ DescriptorAllocatorHandle

friend struct DescriptorAllocatorHandle
friend

Definition at line 108 of file descriptor_allocator.h.

Member Data Documentation

◆ _clearAllocators

Divide::vector<DescriptorAllocator> vke::DescriptorAllocatorPool::_clearAllocators
private

Definition at line 120 of file descriptor_allocator.h.

◆ _descriptorPools

Divide::vector<std::unique_ptr<PoolStorage> > vke::DescriptorAllocatorPool::_descriptorPools
private

Definition at line 119 of file descriptor_allocator.h.

◆ _device

VkDevice vke::DescriptorAllocatorPool::_device { 0 }
private

Definition at line 113 of file descriptor_allocator.h.

◆ _frameIndex

Divide::I32 vke::DescriptorAllocatorPool::_frameIndex { 0 }
private

Definition at line 115 of file descriptor_allocator.h.

◆ _maxFrames

Divide::I32 vke::DescriptorAllocatorPool::_maxFrames { 3 }
private

Definition at line 116 of file descriptor_allocator.h.

◆ _poolMutex

Divide::Mutex vke::DescriptorAllocatorPool::_poolMutex
private

Definition at line 118 of file descriptor_allocator.h.

◆ _poolSizes

PoolSizes vke::DescriptorAllocatorPool::_poolSizes
private

Definition at line 114 of file descriptor_allocator.h.


The documentation for this class was generated from the following files: