|
VulkanRaytracingCycles 0.0.0
Cycles Render Engine With VulkanRaytracingShaderModules. ( Experiment , in progress)
|
#include <AllocatorVk.h>
Public Types | |
| typedef tbb::concurrent_unordered_map< int, vkmm::Allocation, std::hash< int >, std::equal_to< int >, front::tbbTAllocator > | AllocMapTy |
| COM VmaBlockVector* m_pBlockVectors[VK_MAX_MEMORY_TYPES];. More... | |
| typedef tbb::concurrent_unordered_map< int, AllocMapTy, std::hash< int >, std::equal_to< int >, front::tbbTAllocator > | AllocMapMapTy |
Public Member Functions | |
| Allocator_T () | |
| Allocator_T (const AllocatorCreateInfo *pCreateInfo) | |
| VkResult | Init (const AllocatorCreateInfo *pCreateInfo) |
| ~Allocator_T () | |
| const VkAllocationCallbacks * | GetAllocationCallbacks () const |
| VkDeviceSize | GetBufferImageGranularity () const |
| uint32_t | GetMemoryHeapCount () const |
| uint32_t | GetMemoryTypeCount () const |
| uint32_t | MemoryTypeIndexToHeapIndex (uint32_t memTypeIndex) const |
| bool | IsMemoryTypeNonCoherent (uint32_t memTypeIndex) const |
| VkDeviceSize | GetMemoryTypeMinAlignment (uint32_t memTypeIndex) const |
| bool | IsIntegratedGpu () const |
| void | GetBufferMemoryRequirements (VkBuffer hBuffer, VkMemoryRequirements &memReq, bool &requiresDedicatedAllocation, bool &prefersDedicatedAllocation) const |
| void | GetImageMemoryRequirements (VkImage hImage, VkMemoryRequirements &memReq, bool &requiresDedicatedAllocation, bool &prefersDedicatedAllocation) const |
| VkResult | AllocateMemory (const VkMemoryRequirements &vkMemReq, bool requiresDedicatedAllocation, bool prefersDedicatedAllocation, VkBuffer dedicatedBuffer, VkImage dedicatedImage, AllocationCreateInfo &createInfo, SuballocationType suballocType, Allocation *pAllocation) |
| void | FreeMemory (const Allocation allocation) |
| void | CalculateStats (Stats *pStats) |
| VkResult | Defragment (Allocation *pAllocations, size_t allocationCount, VkBool32 *pAllocationsChanged, const DefragmentationInfo *pDefragmentationInfo, DefragmentationStats *pDefragmentationStats) |
| void | GetAllocationInfo (Allocation hAllocation, AllocationInfo *pAllocationInfo) |
| bool | TouchAllocation (Allocation hAllocation) |
| VkResult | CreatePool (const PoolCreateInfo *pCreateInfo, Pool *pPool) |
| void | DestroyPool (Pool pool) |
| void | GetPoolStats (Pool pool, PoolStats *pPoolStats) |
| void | SetCurrentFrameIndex (uint32_t frameIndex) |
| uint32_t | GetCurrentFrameIndex () const |
| void | MakePoolAllocationsLost (Pool hPool, size_t *pLostAllocationCount) |
| VkResult | CheckPoolCorruption (Pool hPool) |
| VkResult | CheckCorruption (uint32_t memoryTypeBits) |
| void | CreateLostAllocation (Allocation *pAllocation) |
| VkResult | AllocateVulkanMemory (VkMemoryAllocateInfo *pAllocateInfo, VkDeviceMemory *pMemory) |
| void | FreeVulkanMemory (uint32_t memoryType, VkDeviceSize size, VkDeviceMemory hMemory) |
| VkResult | Map (Allocation hAllocation, void **ppData) |
| void | Unmap (Allocation hAllocation) |
| VkResult | BindBufferMemory (Allocation hAllocation, VkBuffer hBuffer) |
| VkResult | BindImageMemory (Allocation hAllocation, VkImage hImage) |
| void | FlushOrInvalidateAllocation (Allocation hAllocation, VkDeviceSize offset, VkDeviceSize size, CACHE_OPERATION op) |
| void | FillAllocation (const Allocation hAllocation, uint8_t pattern) |
| VkDeviceSize | CalcPreferredBlockSize (uint32_t memTypeIndex) |
| COM VmaVulkanFunctions m_VulkanFunctions;. More... | |
| VkResult | AllocateMemoryOfType (VkDeviceSize size, VkDeviceSize alignment, bool dedicatedAllocation, VkBuffer dedicatedBuffer, VkImage dedicatedImage, AllocationCreateInfo &createInfo, uint32_t memTypeIndex, SuballocationType suballocType, Allocation *pAllocation) |
| VkResult | AllocateDedicatedMemory (VkDeviceSize size, SuballocationType suballocType, uint32_t memTypeIndex, bool map, bool isUserDataString, AllocationCreateInfo &createInfo, VkBuffer dedicatedBuffer, VkImage dedicatedImage, Allocation *pAllocation) |
| void | FreeDedicatedMemory (Allocation allocation) |
Public Attributes | |
| SRWLOCK | slim |
| bool | m_UseMutex |
| bool | m_UseKhrDedicatedAllocation |
| VkDevice | m_hDevice |
| bool | m_AllocationCallbacksSpecified |
| VkAllocationCallbacks | m_AllocationCallbacks |
| DeviceMemoryCallbacks | m_DeviceMemoryCallbacks |
| VkDeviceSize | m_HeapSizeLimit [VK_MAX_MEMORY_HEAPS_MIN] |
| VkPhysicalDeviceProperties | m_PhysicalDeviceProperties |
| COM VMA_MUTEX m_HeapSizeLimitMutex;. More... | |
| VkPhysicalDeviceMemoryProperties | m_MemProps |
| AllocMapMapTy | m_pDedicatedAllocations |
| VkDeviceSize | m_PreferredLargeHeapBlockSize |
| private: More... | |
| VkPhysicalDevice | m_PhysicalDevice |
| std::atomic< UINT > | m_CurrentFrameIndex |
| VkmmVector< Pool, StlAllocator< Pool > > | m_Pools |
| COM VMA_MUTEX m_PoolsMutex;. More... | |
| uint32_t | m_NextPoolId |
Definition at line 907 of file AllocatorVk.h.
| typedef tbb::concurrent_unordered_map<int, AllocMapTy, std::hash<int>, std::equal_to<int>, front::tbbTAllocator> vkmm::Allocator_T::AllocMapMapTy |
Definition at line 934 of file AllocatorVk.h.
| typedef tbb::concurrent_unordered_map<int, vkmm::Allocation, std::hash<int>, std::equal_to<int>, front::tbbTAllocator> vkmm::Allocator_T::AllocMapTy |
COM VmaBlockVector* m_pBlockVectors[VK_MAX_MEMORY_TYPES];.
Definition at line 933 of file AllocatorVk.h.
|
inline |
Definition at line 939 of file AllocatorVk.h.
| vkmm::Allocator_T::Allocator_T | ( | const AllocatorCreateInfo * | pCreateInfo | ) |
COM ImportVulkanFunctions(pCreateInfo->pVulkanFunctions);
Definition at line 1189 of file AllocatorVk.cpp.
| vkmm::Allocator_T::~Allocator_T | ( | ) |
COM assert(m_Pools.empty());
COM Delete(this, m_pBlockVectors[i]);
Definition at line 1297 of file AllocatorVk.cpp.
| VkResult vkmm::Allocator_T::AllocateDedicatedMemory | ( | VkDeviceSize | size, |
| SuballocationType | suballocType, | ||
| uint32_t | memTypeIndex, | ||
| bool | map, | ||
| bool | isUserDataString, | ||
| AllocationCreateInfo & | createInfo, | ||
| VkBuffer | dedicatedBuffer, | ||
| VkImage | dedicatedImage, | ||
| Allocation * | pAllocation | ||
| ) |
Definition at line 1315 of file AllocatorVk.cpp.
| VkResult vkmm::Allocator_T::AllocateMemory | ( | const VkMemoryRequirements & | vkMemReq, |
| bool | requiresDedicatedAllocation, | ||
| bool | prefersDedicatedAllocation, | ||
| VkBuffer | dedicatedBuffer, | ||
| VkImage | dedicatedImage, | ||
| AllocationCreateInfo & | createInfo, | ||
| SuballocationType | suballocType, | ||
| Allocation * | pAllocation | ||
| ) |
Definition at line 1525 of file AllocatorVk.cpp.
| VkResult vkmm::Allocator_T::AllocateMemoryOfType | ( | VkDeviceSize | size, |
| VkDeviceSize | alignment, | ||
| bool | dedicatedAllocation, | ||
| VkBuffer | dedicatedBuffer, | ||
| VkImage | dedicatedImage, | ||
| AllocationCreateInfo & | createInfo, | ||
| uint32_t | memTypeIndex, | ||
| SuballocationType | suballocType, | ||
| Allocation * | pAllocation | ||
| ) |
Definition at line 1407 of file AllocatorVk.cpp.
| VkResult vkmm::Allocator_T::AllocateVulkanMemory | ( | VkMemoryAllocateInfo * | pAllocateInfo, |
| VkDeviceMemory * | pMemory | ||
| ) |
VmaMutexLock lock(m_HeapSizeLimitMutex, m_UseMutex);
Definition at line 1074 of file AllocatorVk.cpp.
| VkResult vkmm::Allocator_T::BindBufferMemory | ( | Allocation | hAllocation, |
| VkBuffer | hBuffer | ||
| ) |
Definition at line 854 of file AllocatorVk.cpp.
| VkResult vkmm::Allocator_T::BindImageMemory | ( | Allocation | hAllocation, |
| VkImage | hImage | ||
| ) |
| VkDeviceSize vkmm::Allocator_T::CalcPreferredBlockSize | ( | uint32_t | memTypeIndex | ) |
COM VmaVulkanFunctions m_VulkanFunctions;.
COM void ImportVulkanFunctions(const VmaVulkanFunctions* pVulkanFunctions);
Definition at line 1774 of file AllocatorVk.cpp.
| void vkmm::Allocator_T::CalculateStats | ( | Stats * | pStats | ) |
| VkResult vkmm::Allocator_T::CheckCorruption | ( | uint32_t | memoryTypeBits | ) |
| VkResult vkmm::Allocator_T::CheckPoolCorruption | ( | Pool | hPool | ) |
| void vkmm::Allocator_T::CreateLostAllocation | ( | Allocation * | pAllocation | ) |
| VkResult vkmm::Allocator_T::CreatePool | ( | const PoolCreateInfo * | pCreateInfo, |
| Pool * | pPool | ||
| ) |
| VkResult vkmm::Allocator_T::Defragment | ( | Allocation * | pAllocations, |
| size_t | allocationCount, | ||
| VkBool32 * | pAllocationsChanged, | ||
| const DefragmentationInfo * | pDefragmentationInfo, | ||
| DefragmentationStats * | pDefragmentationStats | ||
| ) |
| void vkmm::Allocator_T::DestroyPool | ( | Pool | pool | ) |
| void vkmm::Allocator_T::FillAllocation | ( | const Allocation | hAllocation, |
| uint8_t | pattern | ||
| ) |
Definition at line 628 of file AllocatorVk.cpp.
| void vkmm::Allocator_T::FlushOrInvalidateAllocation | ( | Allocation | hAllocation, |
| VkDeviceSize | offset, | ||
| VkDeviceSize | size, | ||
| CACHE_OPERATION | op | ||
| ) |
Definition at line 682 of file AllocatorVk.cpp.
| void vkmm::Allocator_T::FreeDedicatedMemory | ( | Allocation | allocation | ) |
Definition at line 1144 of file AllocatorVk.cpp.
| void vkmm::Allocator_T::FreeMemory | ( | const Allocation | allocation | ) |
Definition at line 1663 of file AllocatorVk.cpp.
| void vkmm::Allocator_T::FreeVulkanMemory | ( | uint32_t | memoryType, |
| VkDeviceSize | size, | ||
| VkDeviceMemory | hMemory | ||
| ) |
Definition at line 1057 of file AllocatorVk.cpp.
|
inline |
Definition at line 944 of file AllocatorVk.h.
| void vkmm::Allocator_T::GetAllocationInfo | ( | Allocation | hAllocation, |
| AllocationInfo * | pAllocationInfo | ||
| ) |
Definition at line 575 of file AllocatorVk.cpp.
|
inline |
Definition at line 950 of file AllocatorVk.h.
| void vkmm::Allocator_T::GetBufferMemoryRequirements | ( | VkBuffer | hBuffer, |
| VkMemoryRequirements & | memReq, | ||
| bool & | requiresDedicatedAllocation, | ||
| bool & | prefersDedicatedAllocation | ||
| ) | const |
Definition at line 1110 of file AllocatorVk.cpp.
|
inline |
Definition at line 1034 of file AllocatorVk.h.
| void vkmm::Allocator_T::GetImageMemoryRequirements | ( | VkImage | hImage, |
| VkMemoryRequirements & | memReq, | ||
| bool & | requiresDedicatedAllocation, | ||
| bool & | prefersDedicatedAllocation | ||
| ) | const |
|
inline |
Definition at line 957 of file AllocatorVk.h.
|
inline |
Definition at line 958 of file AllocatorVk.h.
|
inline |
Definition at line 972 of file AllocatorVk.h.
| void vkmm::Allocator_T::GetPoolStats | ( | Pool | pool, |
| PoolStats * | pPoolStats | ||
| ) |
| VkResult vkmm::Allocator_T::Init | ( | const AllocatorCreateInfo * | pCreateInfo | ) |
Definition at line 1290 of file AllocatorVk.cpp.
|
inline |
Definition at line 979 of file AllocatorVk.h.
|
inline |
Definition at line 966 of file AllocatorVk.h.
| void vkmm::Allocator_T::MakePoolAllocationsLost | ( | Pool | hPool, |
| size_t * | pLostAllocationCount | ||
| ) |
| VkResult vkmm::Allocator_T::Map | ( | Allocation | hAllocation, |
| void ** | ppData | ||
| ) |
Definition at line 882 of file AllocatorVk.cpp.
|
inline |
Definition at line 960 of file AllocatorVk.h.
| void vkmm::Allocator_T::SetCurrentFrameIndex | ( | uint32_t | frameIndex | ) |
| bool vkmm::Allocator_T::TouchAllocation | ( | Allocation | hAllocation | ) |
Definition at line 648 of file AllocatorVk.cpp.
| void vkmm::Allocator_T::Unmap | ( | Allocation | hAllocation | ) |
Definition at line 913 of file AllocatorVk.cpp.
| VkAllocationCallbacks vkmm::Allocator_T::m_AllocationCallbacks |
Definition at line 918 of file AllocatorVk.h.
| bool vkmm::Allocator_T::m_AllocationCallbacksSpecified |
Definition at line 917 of file AllocatorVk.h.
| std::atomic<UINT> vkmm::Allocator_T::m_CurrentFrameIndex |
Definition at line 1064 of file AllocatorVk.h.
| DeviceMemoryCallbacks vkmm::Allocator_T::m_DeviceMemoryCallbacks |
Definition at line 919 of file AllocatorVk.h.
| VkDevice vkmm::Allocator_T::m_hDevice |
Definition at line 916 of file AllocatorVk.h.
| VkDeviceSize vkmm::Allocator_T::m_HeapSizeLimit[VK_MAX_MEMORY_HEAPS_MIN] |
Definition at line 922 of file AllocatorVk.h.
| VkPhysicalDeviceMemoryProperties vkmm::Allocator_T::m_MemProps |
Definition at line 926 of file AllocatorVk.h.
| uint32_t vkmm::Allocator_T::m_NextPoolId |
Definition at line 1069 of file AllocatorVk.h.
| AllocMapMapTy vkmm::Allocator_T::m_pDedicatedAllocations |
Definition at line 936 of file AllocatorVk.h.
| VkPhysicalDevice vkmm::Allocator_T::m_PhysicalDevice |
Definition at line 1063 of file AllocatorVk.h.
| VkPhysicalDeviceProperties vkmm::Allocator_T::m_PhysicalDeviceProperties |
COM VMA_MUTEX m_HeapSizeLimitMutex;.
Definition at line 925 of file AllocatorVk.h.
| VkmmVector<Pool, StlAllocator<Pool> > vkmm::Allocator_T::m_Pools |
COM VMA_MUTEX m_PoolsMutex;.
Definition at line 1068 of file AllocatorVk.h.
| VkDeviceSize vkmm::Allocator_T::m_PreferredLargeHeapBlockSize |
private:
Definition at line 1061 of file AllocatorVk.h.
| bool vkmm::Allocator_T::m_UseKhrDedicatedAllocation |
Definition at line 915 of file AllocatorVk.h.
| bool vkmm::Allocator_T::m_UseMutex |
Definition at line 914 of file AllocatorVk.h.
| SRWLOCK vkmm::Allocator_T::slim |
Definition at line 912 of file AllocatorVk.h.