Go to the documentation of this file.
43 class DescriptorSetAllocator;
44 class RenderDeviceVkImpl;
55 VkDescriptorPool _Pool,
60 CmdQueueMask {_CmdQueueMask },
61 DescrSetAllocator{&_DescrSetAllocator}
71 CmdQueueMask {rhs.CmdQueueMask },
72 DescrSetAllocator{rhs.DescrSetAllocator}
83 CmdQueueMask = rhs.CmdQueueMask;
85 DescrSetAllocator = rhs.DescrSetAllocator;
92 explicit operator bool()
const
94 return Set != VK_NULL_HANDLE;
100 Pool = VK_NULL_HANDLE;
102 DescrSetAllocator =
nullptr;
115 VkDescriptorSet Set = VK_NULL_HANDLE;
116 VkDescriptorPool Pool = VK_NULL_HANDLE;
138 std::string PoolName,
139 std::vector<VkDescriptorPoolSize> PoolSizes,
141 bool AllowFreeing) noexcept;
156 #ifdef DILIGENT_DEVELOPMENT
157 int32_t GetAllocatedPoolCounter()
const
159 return m_AllocatedPoolCounter;
174 std::deque<VulkanUtilities::DescriptorPoolWrapper>
m_Pools;
179 #ifdef DILIGENT_DEVELOPMENT
180 std::atomic_int32_t m_AllocatedPoolCounter;
192 std::string PoolName,
193 std::vector<VkDescriptorPoolSize> PoolSizes,
195 bool AllowFreeing) noexcept :
201 std::move(PoolSizes),
207 #ifdef DILIGENT_DEVELOPMENT
208 m_AllocatedSetCounter = 0;
216 #ifdef DILIGENT_DEVELOPMENT
217 int32_t GetAllocatedDescriptorSetCounter()
const
219 return m_AllocatedSetCounter;
224 void FreeDescriptorSet(VkDescriptorSet Set, VkDescriptorPool Pool,
Uint64 QueueMask);
226 #ifdef DILIGENT_DEVELOPMENT
227 std::atomic_int32_t m_AllocatedSetCounter;
258 m_GlobalPoolMgr{PoolMgr },
259 m_Name {std::move(Name)}
264 VkDescriptorSet
Allocate(VkDescriptorSetLayout SetLayout,
const char* DebugName);
275 const std::string m_Name;
276 std::vector<VulkanUtilities::DescriptorPoolWrapper> m_AllocatedPools;
277 size_t m_PeakPoolCount = 0;
DescriptorPoolManager(RenderDeviceVkImpl &DeviceVkImpl, std::string PoolName, std::vector< VkDescriptorPoolSize > PoolSizes, uint32_t MaxSets, bool AllowFreeing) noexcept
Definition: DescriptorPoolManager.cpp:82
Definition: DescriptorPoolManager.hpp:187
DescriptorSetAllocator(RenderDeviceVkImpl &DeviceVkImpl, std::string PoolName, std::vector< VkDescriptorPoolSize > PoolSizes, uint32_t MaxSets, bool AllowFreeing) noexcept
Definition: DescriptorPoolManager.hpp:191
size_t GetAllocatedPoolCount() const
Definition: DescriptorPoolManager.hpp:271
DescriptorSetAllocation & operator=(const DescriptorSetAllocation &)=delete
~DynamicDescriptorSetAllocator()
Definition: DescriptorPoolManager.cpp:318
Render device implementation in Vulkan backend.
Definition: RenderDeviceVkImpl.hpp:58
Definition: DescriptorPoolManager.hpp:253
DescriptorPoolManager & operator=(const DescriptorPoolManager &)=delete
DescriptorSetAllocation & operator=(DescriptorSetAllocation &&rhs) noexcept
Definition: DescriptorPoolManager.hpp:78
DescriptorSetAllocation Allocate(Uint64 CommandQueueMask, VkDescriptorSetLayout SetLayout, const char *DebugName="")
Definition: DescriptorPoolManager.cpp:198
uint64_t Uint64
64-bit unsigned integer
Definition: BasicTypes.h:50
DescriptorSetAllocation(VkDescriptorSet _Set, VkDescriptorPool _Pool, Uint64 _CmdQueueMask, DescriptorSetAllocator &_DescrSetAllocator) noexcept
Definition: DescriptorPoolManager.hpp:54
const bool m_AllowFreeing
Definition: DescriptorPoolManager.hpp:171
const uint32_t m_MaxSets
Definition: DescriptorPoolManager.hpp:170
const std::vector< VkDescriptorPoolSize > m_PoolSizes
Definition: DescriptorPoolManager.hpp:169
DEFINE_VULKAN_OBJECT_WRAPPER(DescriptorPool) DescriptorPoolWrapper
Definition: VulkanLogicalDevice.hpp:81
const std::string m_PoolName
Definition: DescriptorPoolManager.hpp:167
VkDescriptorSet Allocate(VkDescriptorSetLayout SetLayout, const char *DebugName)
Definition: DescriptorPoolManager.cpp:290
DescriptorSetAllocation(DescriptorSetAllocation &&rhs) noexcept
Definition: DescriptorPoolManager.hpp:68
Definition: DescriptorPoolManager.hpp:50
friend class DescriptorSetAllocation
Definition: DescriptorPoolManager.hpp:190
std::mutex m_Mutex
Definition: DescriptorPoolManager.hpp:173
Definition: DescriptorPoolManager.hpp:133
VulkanUtilities::DescriptorPoolWrapper GetPool(const char *DebugName)
Definition: DescriptorPoolManager.cpp:106
void Release()
Definition: DescriptorPoolManager.cpp:35
DynamicDescriptorSetAllocator(DescriptorPoolManager &PoolMgr, std::string Name)
Definition: DescriptorPoolManager.hpp:256
RenderDeviceVkImpl & m_DeviceVkImpl
Definition: DescriptorPoolManager.hpp:166
std::deque< VulkanUtilities::DescriptorPoolWrapper > m_Pools
Definition: DescriptorPoolManager.hpp:174
RenderDeviceVkImpl & GetDeviceVkImpl()
Definition: DescriptorPoolManager.hpp:154
void ReleasePools(Uint64 QueueMask)
Definition: DescriptorPoolManager.cpp:308
DescriptorSetAllocation() noexcept
Definition: DescriptorPoolManager.hpp:63
void Reset()
Definition: DescriptorPoolManager.hpp:97
~DescriptorPoolManager()
Definition: DescriptorPoolManager.cpp:100
~DescriptorSetAllocation()
Definition: DescriptorPoolManager.hpp:107
VkDescriptorSet GetVkDescriptorSet() const
Definition: DescriptorPoolManager.hpp:112
~DescriptorSetAllocator()
Definition: DescriptorPoolManager.cpp:193
VulkanUtilities::DescriptorPoolWrapper CreateDescriptorPool(const char *DebugName) const
Definition: DescriptorPoolManager.cpp:46
void DisposePool(VulkanUtilities::DescriptorPoolWrapper &&Pool, Uint64 QueueMask)
Definition: DescriptorPoolManager.cpp:124
The library uses Direct3D-style math:
Definition: AdvancedMath.hpp:37