mirror of
https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git
synced 2024-11-10 02:31:48 +00:00
Fixed reporting UserData in JSON dump for dedicated allocations.
This commit is contained in:
parent
6a1f1e2d8d
commit
5bc033f19d
@ -7570,11 +7570,27 @@ void VmaAllocator_T::PrintDetailedMap(VmaJsonWriter& json)
|
|||||||
const VmaAllocation hAlloc = (*pDedicatedAllocVector)[i];
|
const VmaAllocation hAlloc = (*pDedicatedAllocVector)[i];
|
||||||
json.BeginObject(true);
|
json.BeginObject(true);
|
||||||
|
|
||||||
|
json.WriteString("Type");
|
||||||
|
json.WriteString(VMA_SUBALLOCATION_TYPE_NAMES[hAlloc->GetSuballocationType()]);
|
||||||
|
|
||||||
json.WriteString("Size");
|
json.WriteString("Size");
|
||||||
json.WriteNumber(hAlloc->GetSize());
|
json.WriteNumber(hAlloc->GetSize());
|
||||||
|
|
||||||
json.WriteString("Type");
|
const void* pUserData = hAlloc->GetUserData();
|
||||||
json.WriteString(VMA_SUBALLOCATION_TYPE_NAMES[hAlloc->GetSuballocationType()]);
|
if(pUserData != VMA_NULL)
|
||||||
|
{
|
||||||
|
json.WriteString("UserData");
|
||||||
|
if(hAlloc->IsUserDataString())
|
||||||
|
{
|
||||||
|
json.WriteString((const char*)pUserData);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
json.BeginString();
|
||||||
|
json.ContinueString_Pointer(pUserData);
|
||||||
|
json.EndString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
json.EndObject();
|
json.EndObject();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user