Optimize Animated Models bones updating with a batches memory pass and manual resource transitions batch

#3917 #3827
This commit is contained in:
Wojtek Figat
2026-02-09 23:03:25 +01:00
parent 0f6c1aea62
commit 55f73b6cf7
4 changed files with 125 additions and 10 deletions

View File

@@ -423,6 +423,7 @@ void RenderInner(SceneRenderTask* task, RenderContext& renderContext, RenderCont
if (setup.UseMotionVectors)
view.Pass |= DrawPass::MotionVectors;
renderContextBatch.GetMainContext() = renderContext; // Sync render context in batch with the current value
renderContext.List->PreDraw(context, renderContextBatch);
bool drawShadows = !isGBufferDebug && EnumHasAnyFlags(view.Flags, ViewFlags::Shadows) && ShadowsPass::Instance()->IsReady();
switch (renderContext.View.Mode)
@@ -462,6 +463,7 @@ void RenderInner(SceneRenderTask* task, RenderContext& renderContext, RenderCont
// Perform custom post-scene drawing (eg. GPU dispatches used by VFX)
for (int32 i = 0; i < renderContextBatch.Contexts.Count(); i++)
renderContextBatch.Contexts[i].List->DrainDelayedDraws(context, renderContextBatch, i);
renderContext.List->PostDraw(context, renderContextBatch);
#if USE_EDITOR
GBufferPass::Instance()->OverrideDrawCalls(renderContext);