mirror of
https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git
synced 2025-06-06 07:20:47 +00:00
Minor improvement in VmaBlockVector::Allocate. TestPool_SameSize: Added test for it.
This commit is contained in:
parent
c1af66a549
commit
d292417cdb
2 changed files with 23 additions and 0 deletions
|
@ -1585,6 +1585,23 @@ static void TestPool_SameSize()
|
|||
|
||||
items.clear();
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Test for allocation too large for pool
|
||||
|
||||
{
|
||||
VmaAllocationCreateInfo allocCreateInfo = {};
|
||||
allocCreateInfo.pool = pool;
|
||||
|
||||
VkMemoryRequirements memReq;
|
||||
memReq.memoryTypeBits = UINT32_MAX;
|
||||
memReq.alignment = 1;
|
||||
memReq.size = poolCreateInfo.blockSize + 4;
|
||||
|
||||
VmaAllocation alloc = nullptr;
|
||||
res = vmaAllocateMemory(g_hAllocator, &memReq, &allocCreateInfo, &alloc, nullptr);
|
||||
assert(res == VK_ERROR_OUT_OF_DEVICE_MEMORY && alloc == nullptr);
|
||||
}
|
||||
|
||||
vmaDestroyPool(g_hAllocator, pool);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue