Improvements to pass statistics and SRG debugability
Signed-off-by: antonmic <56370189+antonmic@users.noreply.github.com>
This commit is contained in:
@@ -308,6 +308,7 @@ namespace AZ
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzRender);
|
||||
AZ_ATOM_PROFILE_FUNCTION("RPI", "PassSystem: FrameUpdate");
|
||||
|
||||
ResetFrameStatistics();
|
||||
ProcessQueuedChanges();
|
||||
|
||||
m_state = PassSystemState::Rendering;
|
||||
@@ -392,6 +393,29 @@ namespace AZ
|
||||
handler.Connect(m_loadTemplatesEvent);
|
||||
}
|
||||
|
||||
void PassSystem::ResetFrameStatistics()
|
||||
{
|
||||
m_frameStatistics.m_numRenderPassesExecuted = 0;
|
||||
m_frameStatistics.m_totalDrawItemsRendered = 0;
|
||||
m_frameStatistics.m_maxDrawItemsRenderedInAPass = 0;
|
||||
}
|
||||
|
||||
PassSystemFrameStatistics PassSystem::GetFrameStatistics()
|
||||
{
|
||||
return m_frameStatistics;
|
||||
}
|
||||
|
||||
void PassSystem::IncrementFrameDrawItemCount(u32 numDrawItems)
|
||||
{
|
||||
m_frameStatistics.m_totalDrawItemsRendered += numDrawItems;
|
||||
m_frameStatistics.m_maxDrawItemsRenderedInAPass = AZStd::max(m_frameStatistics.m_maxDrawItemsRenderedInAPass, numDrawItems);
|
||||
}
|
||||
|
||||
void PassSystem::IncrementFrameRenderPassCount()
|
||||
{
|
||||
++m_frameStatistics.m_numRenderPassesExecuted;
|
||||
}
|
||||
|
||||
// --- Pass Factory Functions ---
|
||||
|
||||
void PassSystem::AddPassCreator(Name className, PassCreator createFunction)
|
||||
|
||||
Reference in New Issue
Block a user