mirror of
https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git
synced 2025-06-07 07:50:48 +00:00
VmaBlockMetadata_Buddy: Introduced m_LevelCount to limit number of levels in use by particular memory block, considering new constant MIN_NODE_SIZE.
This commit is contained in:
parent
d6e6d6bdf2
commit
a01d4587df
2 changed files with 33 additions and 6 deletions
|
@ -4160,6 +4160,13 @@ static void BasicTestBuddyAllocator()
|
|||
&newBufInfo.Buffer, &newBufInfo.Allocation, &allocInfo);
|
||||
assert(res == VK_SUCCESS);
|
||||
bufInfo.push_back(newBufInfo);
|
||||
|
||||
// Test very small allocation, smaller than minimum node size.
|
||||
bufCreateInfo.size = 1;
|
||||
res = vmaCreateBuffer(g_hAllocator, &bufCreateInfo, &allocCreateInfo,
|
||||
&newBufInfo.Buffer, &newBufInfo.Allocation, &allocInfo);
|
||||
assert(res == VK_SUCCESS);
|
||||
bufInfo.push_back(newBufInfo);
|
||||
|
||||
VmaPoolStats stats = {};
|
||||
vmaGetPoolStats(g_hAllocator, pool, &stats);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue