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

@@ -82,6 +82,7 @@ bool CaptureScreenshot::Run()
LOG(Warning, "Missing target render task.");
return true;
}
PROFILE_MEM(Graphics);
// TODO: how about a case two or more screenshots at the same second? update counter and check files
@@ -147,6 +148,7 @@ void Screenshot::Capture(GPUTexture* target, const StringView& path)
LOG(Warning, "Cannot take screenshot. Graphics device is not ready.");
return;
}
PROFILE_MEM(Graphics);
// Faster path for staging textures that contents are ready to access on a CPU
if (target->IsStaging())
@@ -211,6 +213,7 @@ void Screenshot::Capture(SceneRenderTask* target, const StringView& path)
LOG(Warning, "Cannot take screenshot. Graphics device is not ready.");
return;
}
PROFILE_MEM(Graphics);
// Create tasks
auto saveTask = New<CaptureScreenshot>(target, path);