Introduced a rule that custom pool with linear algorithm must have maxBlockCount = 1 (or 0 for default).

This commit is contained in:
Adam Sawicki 2018-08-23 10:40:30 +02:00
parent 0ebdf0c63e
commit f799c4f146
2 changed files with 22 additions and 2 deletions

View file

@ -1821,6 +1821,16 @@ static void TestLinearAllocator()
bufInfo.clear();
}
// Try to create pool with maxBlockCount higher than 1. It should fail.
{
VmaPoolCreateInfo altPoolCreateInfo = poolCreateInfo;
altPoolCreateInfo.maxBlockCount = 2;
VmaPool altPool = nullptr;
res = vmaCreatePool(g_hAllocator, &altPoolCreateInfo, &altPool);
assert(res != VK_SUCCESS);
}
vmaDestroyPool(g_hAllocator, pool);
}