Implemented VmaBlockMetadata_Buddy::GetUnusedRangeSizeMax().
This commit is contained in:
parent
a7863d9664
commit
6540b19ed5
1 changed files with 10 additions and 2 deletions
|
@ -9236,9 +9236,17 @@ bool VmaBlockMetadata_Buddy::Validate() const
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
VkDeviceSize VmaBlockMetadata_Buddy::VmaBlockMetadata_Buddy::GetUnusedRangeSizeMax() const
|
VkDeviceSize VmaBlockMetadata_Buddy::GetUnusedRangeSizeMax() const
|
||||||
{
|
{
|
||||||
return 0; // TODO
|
VkDeviceSize levelNodeSize = GetSize();
|
||||||
|
for(uint32_t level = 0; level < MAX_LEVELS; ++level, levelNodeSize /= 2)
|
||||||
|
{
|
||||||
|
if(m_FreeList[level].front != VMA_NULL)
|
||||||
|
{
|
||||||
|
return levelNodeSize;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void VmaBlockMetadata_Buddy::CalcAllocationStatInfo(VmaStatInfo& outInfo) const
|
void VmaBlockMetadata_Buddy::CalcAllocationStatInfo(VmaStatInfo& outInfo) const
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue