Remove GetVulkanFrameBuffer() so nobody is tempted to call it in the future

This commit is contained in:
Magnus Norddahl 2022-06-11 16:34:52 +02:00 committed by Christoph Oelckers
parent 1c4798f059
commit 24bf0c685c
2 changed files with 11 additions and 6 deletions

View file

@ -69,10 +69,17 @@ EXTERN_CVAR(Bool, cl_capfps)
CCMD(vk_memstats)
{
VmaStats stats = {};
vmaCalculateStats(GetVulkanFrameBuffer()->device->allocator, &stats);
Printf("Allocated objects: %d, used bytes: %d MB\n", (int)stats.total.allocationCount, (int)stats.total.usedBytes / (1024 * 1024));
Printf("Unused range count: %d, unused bytes: %d MB\n", (int)stats.total.unusedRangeCount, (int)stats.total.unusedBytes / (1024 * 1024));
if (screen->IsVulkan())
{
VmaStats stats = {};
vmaCalculateStats(static_cast<VulkanFrameBuffer*>(screen)->device->allocator, &stats);
Printf("Allocated objects: %d, used bytes: %d MB\n", (int)stats.total.allocationCount, (int)stats.total.usedBytes / (1024 * 1024));
Printf("Unused range count: %d, unused bytes: %d MB\n", (int)stats.total.unusedRangeCount, (int)stats.total.unusedBytes / (1024 * 1024));
}
else
{
Printf("Vulkan is not the current render device\n");
}
}
VulkanFrameBuffer::VulkanFrameBuffer(void *hMonitor, bool fullscreen, VulkanDevice *dev) :

View file

@ -110,5 +110,3 @@ private:
bool mVSync = false;
};
inline VulkanFrameBuffer *GetVulkanFrameBuffer() { return static_cast<VulkanFrameBuffer*>(screen); }