Centralize render-graph recording context builders

This commit is contained in:
2026-04-15 01:18:15 +08:00
parent 65b3078c7f
commit d0ce2d7883
7 changed files with 331 additions and 67 deletions

View File

@@ -1,6 +1,7 @@
#include "Rendering/SceneRenderFeatureHost.h"
#include "Debug/Logger.h"
#include "Rendering/Internal/RenderGraphRecordingContextBuilders.h"
#include <string>
@@ -118,28 +119,15 @@ bool SceneRenderFeatureHost::Record(
continue;
}
const SceneRenderFeaturePassRenderGraphContext featureContext = {
context.graphBuilder,
BuildFeatureGraphPassName(
context.passName,
injectionPoint,
*featurePass,
featureIndex),
context.renderContext,
context.sceneData,
context.surface,
context.sourceSurface,
context.sourceColorView,
context.sourceColorState,
context.sourceColorTexture,
context.colorTargets,
context.depthTarget,
clearAttachments,
context.executionSucceeded,
context.beginPassCallback,
context.endPassCallback,
context.blackboard
};
const SceneRenderFeaturePassRenderGraphContext featureContext =
Internal::CloneSceneRenderFeaturePassRenderGraphContext(
context,
BuildFeatureGraphPassName(
context.passName,
injectionPoint,
*featurePass,
featureIndex),
clearAttachments);
if (!featurePass->RecordRenderGraph(featureContext)) {
Debug::Logger::Get().Error(
Debug::LogCategory::Rendering,