mirror of
https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git
synced 2024-11-27 00:44:35 +00:00
Merge branch 'master' of https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator
This commit is contained in:
commit
ce7351bb16
@ -1960,7 +1960,9 @@ void vmaCalculateStats(
|
|||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
VmaStats* pStats);
|
VmaStats* pStats);
|
||||||
|
|
||||||
|
#ifndef VMA_STATS_STRING_ENABLED
|
||||||
#define VMA_STATS_STRING_ENABLED 1
|
#define VMA_STATS_STRING_ENABLED 1
|
||||||
|
#endif
|
||||||
|
|
||||||
#if VMA_STATS_STRING_ENABLED
|
#if VMA_STATS_STRING_ENABLED
|
||||||
|
|
||||||
@ -3561,6 +3563,8 @@ static inline bool VmaStrIsEmpty(const char* pStr)
|
|||||||
return pStr == VMA_NULL || *pStr == '\0';
|
return pStr == VMA_NULL || *pStr == '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if VMA_STATS_STRING_ENABLED
|
||||||
|
|
||||||
static const char* VmaAlgorithmToStr(uint32_t algorithm)
|
static const char* VmaAlgorithmToStr(uint32_t algorithm)
|
||||||
{
|
{
|
||||||
switch(algorithm)
|
switch(algorithm)
|
||||||
@ -3577,6 +3581,8 @@ static const char* VmaAlgorithmToStr(uint32_t algorithm)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // #if VMA_STATS_STRING_ENABLED
|
||||||
|
|
||||||
#ifndef VMA_SORT
|
#ifndef VMA_SORT
|
||||||
|
|
||||||
template<typename Iterator, typename Compare>
|
template<typename Iterator, typename Compare>
|
||||||
@ -12972,7 +12978,6 @@ VkResult VmaDefragmentationAlgorithm_Fast::Defragment(
|
|||||||
size_t freeSpaceOrigBlockIndex = m_BlockInfos[freeSpaceInfoIndex].origBlockIndex;
|
size_t freeSpaceOrigBlockIndex = m_BlockInfos[freeSpaceInfoIndex].origBlockIndex;
|
||||||
VmaDeviceMemoryBlock* pFreeSpaceBlock = m_pBlockVector->GetBlock(freeSpaceOrigBlockIndex);
|
VmaDeviceMemoryBlock* pFreeSpaceBlock = m_pBlockVector->GetBlock(freeSpaceOrigBlockIndex);
|
||||||
VmaBlockMetadata_Generic* pFreeSpaceMetadata = (VmaBlockMetadata_Generic*)pFreeSpaceBlock->m_pMetadata;
|
VmaBlockMetadata_Generic* pFreeSpaceMetadata = (VmaBlockMetadata_Generic*)pFreeSpaceBlock->m_pMetadata;
|
||||||
VkDeviceSize freeSpaceBlockSize = pFreeSpaceMetadata->GetSize();
|
|
||||||
|
|
||||||
// Same block
|
// Same block
|
||||||
if(freeSpaceInfoIndex == srcBlockInfoIndex)
|
if(freeSpaceInfoIndex == srcBlockInfoIndex)
|
||||||
|
Loading…
Reference in New Issue
Block a user