Add more CSV stats to reduce the unaccounted portion in Renderthread Breakdown graph

[FYI] Ben.Woodhouse


#ROBOMERGE-OWNER: jian.ru
#ROBOMERGE-AUTHOR: jian.ru
#ROBOMERGE-SOURCE: CL 10609548 via CL 10609549 via CL 10609576
#ROBOMERGE-BOT: (v607-10590470)

[CL 10609577 by jian ru in Main branch]
This commit is contained in:
jian ru
2019-12-08 18:18:00 -05:00
parent 79660999cd
commit 3026598d4d
6 changed files with 9 additions and 2 deletions

View File

@@ -55,11 +55,11 @@
<statString>exclusive/gamethread/* gamethreadtime</statString>
</graph>
<graph title="Renderthread Breakdown" showAverages="1" hideStatPrefix="exclusive/RenderThread/" stacked="1" mainStat="renderthreadtime" ignoreStats="exclusive/Renderthread/FetchVisibilityForPrimitives;exclusive/renderthread/eventwait*">
<graph title="Renderthread Breakdown" showAverages="1" hideStatPrefix="exclusive/RenderThread/" stacked="1" mainStat="renderthreadtime" ignoreStats="exclusive/renderthread/eventwait*">
<statString>exclusive/renderthread/* renderthreadtime</statString>
</graph>
<graph title="Renderthread Breakdown Raw" hideStatPrefix="exclusive/RenderThread/" stacked="1" mainStat="renderthreadtime" ignoreStats="exclusive/Renderthread/FetchVisibilityForPrimitives;exclusive/renderthread/eventwait*" smooth="0" maxy="100">
<graph title="Renderthread Breakdown Raw" hideStatPrefix="exclusive/RenderThread/" stacked="1" mainStat="renderthreadtime" ignoreStats="exclusive/renderthread/eventwait*" smooth="0" maxy="100">
<statString>exclusive/renderthread/* renderthreadtime</statString>
</graph>

View File

@@ -2600,6 +2600,7 @@ void FMaterialRenderProxy::UpdateDeferredCachedUniformExpressions()
check(IsInRenderingThread());
CSV_SCOPED_TIMING_STAT_EXCLUSIVE(Material_UpdateDeferredCachedUniformExpressions);
QUICK_SCOPE_CYCLE_COUNTER(STAT_UpdateDeferredCachedUniformExpressions);
for (TSet<FMaterialRenderProxy*>::TConstIterator It(DeferredUniformExpressionCacheRequests); It; ++It)

View File

@@ -7097,6 +7097,7 @@ void FParticleSystemSceneProxy::UpdateData(FParticleDynamicData* NewDynamicData)
ENQUEUE_RENDER_COMMAND(ParticleUpdateDataCommand)(
[Proxy, NewDynamicData](FRHICommandListImmediate& RHICmdList)
{
CSV_SCOPED_TIMING_STAT_EXCLUSIVE(ParticleUpdate);
SCOPE_CYCLE_COUNTER(STAT_ParticleUpdateRTTime);
STAT(FScopeCycleCounter Context(Proxy->GetStatId());)
if (NewDynamicData)

View File

@@ -1134,6 +1134,7 @@ void FDeferredShadingSceneRenderer::Render(FRHICommandListImmediate& RHICmdList)
if (GDoPrepareDistanceFieldSceneAfterRHIFlush && (GRHINeedsExtraDeletionLatency || !GRHICommandList.Bypass()))
{
// we will probably stall on occlusion queries, so might as well have the RHI thread and GPU work while we wait.
CSV_SCOPED_TIMING_STAT_EXCLUSIVE(PostInitViews_FlushDel);
SCOPE_CYCLE_COUNTER(STAT_PostInitViews_FlushDel);
RHICmdList.ImmediateFlush(EImmediateFlushType::FlushRHIThreadFlushResources);
}
@@ -1169,6 +1170,7 @@ void FDeferredShadingSceneRenderer::Render(FRHICommandListImmediate& RHICmdList)
if (!GDoPrepareDistanceFieldSceneAfterRHIFlush && (GRHINeedsExtraDeletionLatency || !GRHICommandList.Bypass()))
{
// we will probably stall on occlusion queries, so might as well have the RHI thread and GPU work while we wait.
CSV_SCOPED_TIMING_STAT_EXCLUSIVE(PostInitViews_FlushDel);
SCOPE_CYCLE_COUNTER(STAT_PostInitViews_FlushDel);
FRHICommandListExecutor::GetImmediateCommandList().ImmediateFlush(EImmediateFlushType::FlushRHIThreadFlushResources);
}

View File

@@ -1623,6 +1623,7 @@ void FScene::AddLight(ULightComponent* Light)
ENQUEUE_RENDER_COMMAND(FAddLightCommand)(
[Scene, LightSceneInfo](FRHICommandListImmediate& RHICmdList)
{
CSV_SCOPED_TIMING_STAT_EXCLUSIVE(Scene_AddLight);
FScopeCycleCounter Context(LightSceneInfo->Proxy->GetStatId());
Scene->AddLightSceneInfo_RenderThread(LightSceneInfo);
});

View File

@@ -3465,6 +3465,8 @@ static void RenderViewFamily_RenderThread(FRHICommandListImmediate& RHICmdList,
SceneRenderer->Render(RHICmdList);
}
CSV_SCOPED_TIMING_STAT_EXCLUSIVE(PostRenderCleanUp);
// Only reset per-frame scene state once all views have processed their frame, including those in planar reflections
for (int32 CacheType = 0; CacheType < UE_ARRAY_COUNT(SceneRenderer->Scene->DistanceFieldSceneData.PrimitiveModifiedBounds); CacheType++)
{