mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-09-04 19:55:27 +02:00
Debug visualization for the Vulkan memory allocator. Shows some interesting behaviour.
This commit is contained in:
@@ -293,6 +293,13 @@ int VulkanDeviceAllocator::ComputeUsagePercent() const {
|
||||
return blockSum == 0 ? 0 : 100 * blocksUsed / blockSum;
|
||||
}
|
||||
|
||||
std::vector<uint8_t> VulkanDeviceAllocator::GetSlabUsage(int slabIndex) const {
|
||||
if (slabIndex < 0 || slabIndex >= (int)slabs_.size())
|
||||
return std::vector<uint8_t>();
|
||||
const Slab &slab = slabs_[slabIndex];
|
||||
return slab.usage;
|
||||
}
|
||||
|
||||
void VulkanDeviceAllocator::Free(VkDeviceMemory deviceMemory, size_t offset) {
|
||||
assert(!destroyed_);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user