| 6826 | m_IsVirtual(isVirtual) {} |
| 6827 | |
| 6828 | void 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 |
| 6857 | void VmaBlockMetadata::PrintDetailedMap_Begin(class VmaJsonWriter& json, |
nothing calls this directly
no test coverage detected