mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-23 04:22:34 +00:00
Add vk_memstats ccmd
This commit is contained in:
parent
04f327677d
commit
01eeb8f7c5
1 changed files with 9 additions and 0 deletions
|
@ -53,6 +53,7 @@
|
||||||
#include "vulkan/system/vk_builders.h"
|
#include "vulkan/system/vk_builders.h"
|
||||||
#include "vulkan/system/vk_swapchain.h"
|
#include "vulkan/system/vk_swapchain.h"
|
||||||
#include "engineerrors.h"
|
#include "engineerrors.h"
|
||||||
|
#include "c_dispatch.h"
|
||||||
|
|
||||||
void Draw2D(F2DDrawer *drawer, FRenderState &state);
|
void Draw2D(F2DDrawer *drawer, FRenderState &state);
|
||||||
|
|
||||||
|
@ -68,6 +69,14 @@ extern bool gpuStatActive;
|
||||||
extern bool keepGpuStatActive;
|
extern bool keepGpuStatActive;
|
||||||
extern FString gpuStatOutput;
|
extern FString gpuStatOutput;
|
||||||
|
|
||||||
|
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));
|
||||||
|
}
|
||||||
|
|
||||||
VulkanFrameBuffer::VulkanFrameBuffer(void *hMonitor, bool fullscreen, VulkanDevice *dev) :
|
VulkanFrameBuffer::VulkanFrameBuffer(void *hMonitor, bool fullscreen, VulkanDevice *dev) :
|
||||||
Super(hMonitor, fullscreen)
|
Super(hMonitor, fullscreen)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue