refactor(rendering): generalize pipeline stage render graph boundary

This commit is contained in:
2026-04-15 19:31:52 +08:00
parent df8f433fbb
commit 7671663b12
20 changed files with 108 additions and 84 deletions

View File

@@ -577,7 +577,7 @@ TEST(BuiltinForwardPipeline_Test, UsesFloat3PositionInputLayoutForStaticMeshVert
TEST(BuiltinForwardPipeline_Test, RecordsMainSceneGraphPassWithSampledShadowDependency) {
BuiltinForwardPipeline pipeline;
EXPECT_TRUE(pipeline.SupportsMainSceneRenderGraph());
EXPECT_TRUE(pipeline.SupportsStageRenderGraph(CameraFrameStage::MainScene));
RenderGraph graph = {};
RenderGraphBuilder graphBuilder(graph);
@@ -634,9 +634,10 @@ TEST(BuiltinForwardPipeline_Test, RecordsMainSceneGraphPassWithSampledShadowDepe
frameResources.mainScene.depth = depthTarget;
frameResources.mainDirectionalShadow = shadowTarget;
bool executionSucceeded = true;
const RenderPipelineMainSceneRenderGraphContext context = {
const RenderPipelineStageRenderGraphContext context = {
graphBuilder,
"MainScene",
CameraFrameStage::MainScene,
renderContext,
sceneData,
surface,
@@ -650,7 +651,7 @@ TEST(BuiltinForwardPipeline_Test, RecordsMainSceneGraphPassWithSampledShadowDepe
&blackboard
};
ASSERT_TRUE(pipeline.RecordMainSceneRenderGraph(context));
ASSERT_TRUE(pipeline.RecordStageRenderGraph(context));
CompiledRenderGraph compiledGraph = {};
String errorMessage;
@@ -1173,9 +1174,10 @@ TEST(BuiltinForwardPipeline_Test, RecordsActiveFeatureInjectionPassesIntoMainSce
frameResources.mainScene.color = colorTarget;
frameResources.mainScene.depth = depthTarget;
bool executionSucceeded = true;
const RenderPipelineMainSceneRenderGraphContext context = {
const RenderPipelineStageRenderGraphContext context = {
graphBuilder,
"MainScene",
CameraFrameStage::MainScene,
renderContext,
sceneData,
surface,
@@ -1189,7 +1191,7 @@ TEST(BuiltinForwardPipeline_Test, RecordsActiveFeatureInjectionPassesIntoMainSce
&blackboard
};
ASSERT_TRUE(pipeline.RecordMainSceneRenderGraph(context));
ASSERT_TRUE(pipeline.RecordStageRenderGraph(context));
CompiledRenderGraph compiledGraph = {};
String errorMessage;
@@ -1272,9 +1274,10 @@ TEST(BuiltinForwardPipeline_Test, ForwardsSourceColorTextureIntoFeatureInjection
RenderSceneData sceneData = {};
RenderGraphBlackboard blackboard = {};
bool executionSucceeded = true;
const RenderPipelineMainSceneRenderGraphContext context = {
const RenderPipelineStageRenderGraphContext context = {
graphBuilder,
"MainScene",
CameraFrameStage::MainScene,
renderContext,
sceneData,
surface,
@@ -1288,7 +1291,7 @@ TEST(BuiltinForwardPipeline_Test, ForwardsSourceColorTextureIntoFeatureInjection
&blackboard
};
ASSERT_TRUE(pipeline.RecordMainSceneRenderGraph(context));
ASSERT_TRUE(pipeline.RecordStageRenderGraph(context));
EXPECT_EQ(featureRaw->recordGraphCallCount, 1u);
EXPECT_TRUE(featureRaw->lastReceivedSourceColorTextureValid);