Profiling: Add more instrumentation

Adds new instrumentation macros throughout the codebase, using the
visualizer to find where current instrumentation is lacking using the
shadowed sponza sample + editor. Some notes from exploring:

- We spend ~5ms in CullingScene: BeginCulling
- PipelineStateCache: Compact usually 1ms
- CompileImageBarriers takes most of the time in CompileResourceBarriers

Signed-off-by: Jacob Hilliard <jhlliar@amazon.com>
This commit is contained in:
Jacob Hilliard
2021-07-20 16:03:22 -07:00
parent db8f78890f
commit 4d618ea619
8 changed files with 17 additions and 3 deletions
@@ -298,6 +298,7 @@ namespace AZ
void PassSystem::ProcessQueuedChanges()
{
AZ_ATOM_PROFILE_FUNCTION("RPI", "PassSystem: ProcessQueuedChanges");
RemovePasses();
BuildPasses();
InitializePasses();
@@ -313,7 +314,11 @@ namespace AZ
m_state = PassSystemState::Rendering;
Pass::FramePrepareParams params{ &frameGraphBuilder };
m_rootPass->FrameBegin(params);
{
AZ_ATOM_PROFILE_TIME_GROUP_REGION("RPI", "Pass: FrameBegin");
m_rootPass->FrameBegin(params);
}
}
void PassSystem::FrameEnd()