Add integration with Tracy profiler to plot main memory categories

This commit is contained in:
Wojtek Figat
2025-05-26 05:37:53 +02:00
parent 9dc4dbc6d7
commit 72ee80242d
2 changed files with 85 additions and 34 deletions

View File

@@ -80,8 +80,8 @@ Window* Engine::MainWindow = nullptr;
int32 Engine::Main(const Char* cmdLine)
{
#if COMPILE_WITH_PROFILER
extern void InitProfilerMemory(const Char*);
InitProfilerMemory(cmdLine);
extern void InitProfilerMemory(const Char* cmdLine, int32 stage);
InitProfilerMemory(cmdLine, 0);
#endif
PROFILE_MEM_BEGIN(Engine);
EngineImpl::CommandLine = cmdLine;
@@ -109,6 +109,9 @@ int32 Engine::Main(const Char* cmdLine)
Platform::Fatal(TEXT("Cannot init platform."));
return -1;
}
#if COMPILE_WITH_PROFILER
InitProfilerMemory(cmdLine, 1);
#endif
Platform::SetHighDpiAwarenessEnabled(!CommandLine::Options.LowDPI.IsTrue());
Time::StartupTime = DateTime::Now();