Add more memory profiling coverage
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user