Add more memory profiling coverage

This commit is contained in:
Wojtek Figat
2025-06-06 14:38:22 +02:00
parent 9d8e75caa3
commit cd637e8a7a
14 changed files with 57 additions and 3 deletions

View File

@@ -3,6 +3,7 @@
#if COMPILE_WITH_PROFILER
#include "ProfilerGPU.h"
#include "ProfilerMemory.h"
#include "Engine/Core/Log.h"
#include "Engine/Engine/Engine.h"
#include "Engine/Graphics/GPUDevice.h"
@@ -45,6 +46,7 @@ void ProfilerGPU::EventBuffer::TryResolve()
}
// Collect queries results and free them
PROFILE_MEM(Profiler);
for (int32 i = 0; i < _data.Count(); i++)
{
auto& e = _data[i];
@@ -58,6 +60,7 @@ void ProfilerGPU::EventBuffer::TryResolve()
int32 ProfilerGPU::EventBuffer::Add(const Event& e)
{
PROFILE_MEM(Profiler);
const int32 index = _data.Count();
_data.Add(e);
return index;
@@ -88,6 +91,7 @@ GPUTimerQuery* ProfilerGPU::GetTimerQuery()
}
else
{
PROFILE_MEM(Profiler);
result = GPUDevice::Instance->CreateTimerQuery();
_timerQueriesPool.Add(result);
}