MCPcopy Create free account
hub / github.com/ErrorAtLine0/infinipaint / DebugLogAllocation

Method DebugLogAllocation

include/vk_mem_alloc.h:6828–6854  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6826 m_IsVirtual(isVirtual) {}
6827
6828void VmaBlockMetadata::DebugLogAllocation(VkDeviceSize offset, VkDeviceSize size, void* userData) const
6829{
6830 if (IsVirtual())
6831 {
6832 VMA_LEAK_LOG_FORMAT("UNFREED VIRTUAL ALLOCATION; Offset: %" PRIu64 "; Size: %" PRIu64 "; UserData: %p", offset, size, userData);
6833 }
6834 else
6835 {
6836 VMA_ASSERT(userData != VMA_NULL);
6837 VmaAllocation allocation = reinterpret_cast<VmaAllocation>(userData);
6838
6839 userData = allocation->GetUserData();
6840 const char* name = allocation->GetName();
6841
6842#if VMA_STATS_STRING_ENABLED
6843 VMA_LEAK_LOG_FORMAT("UNFREED ALLOCATION; Offset: %" PRIu64 "; Size: %" PRIu64 "; UserData: %p; Name: %s; Type: %s; Usage: %" PRIu64,
6844 offset, size, userData, name ? name : "vma_empty",
6845 VMA_SUBALLOCATION_TYPE_NAMES[allocation->GetSuballocationType()],
6846 (uint64_t)allocation->GetBufferImageUsage().Value);
6847#else
6848 VMA_LEAK_LOG_FORMAT("UNFREED ALLOCATION; Offset: %" PRIu64 "; Size: %" PRIu64 "; UserData: %p; Name: %s; Type: %u",
6849 offset, size, userData, name ? name : "vma_empty",
6850 (unsigned)allocation->GetSuballocationType());
6851#endif // VMA_STATS_STRING_ENABLED
6852 }
6853
6854}
6855
6856#if VMA_STATS_STRING_ENABLED
6857void VmaBlockMetadata::PrintDetailedMap_Begin(class VmaJsonWriter& json,

Callers

nothing calls this directly

Calls 4

GetUserDataMethod · 0.80
GetSuballocationTypeMethod · 0.80
GetBufferImageUsageMethod · 0.80
GetNameMethod · 0.45

Tested by

no test coverage detected