Add prototype function vmaGetName, vmaSetName, change JSON format and VmaDumpVis.py to use that

This commit is contained in:
Adam Sawicki 2019-11-02 14:43:06 +01:00
parent 6ac1d3a4b7
commit a020fb81cb
3 changed files with 119 additions and 18 deletions

View file

@ -3104,6 +3104,20 @@ static void TestPool_SameSize()
res = vmaCreatePool(g_hAllocator, &poolCreateInfo, &pool);
TEST(res == VK_SUCCESS);
// Test pool name
{
static const char* const POOL_NAME = "Pool name";
vmaSetPoolName(g_hAllocator, pool, POOL_NAME);
const char* fetchedPoolName = nullptr;
vmaGetPoolName(g_hAllocator, pool, &fetchedPoolName);
TEST(strcmp(fetchedPoolName, POOL_NAME) == 0);
SaveAllocatorStatsToFile(L"TEST.json");//DELME
vmaSetPoolName(g_hAllocator, pool, nullptr);
}
vmaSetCurrentFrameIndex(g_hAllocator, 1);
VmaAllocationCreateInfo allocInfo = {};