refactor(rendering): infer raster pass graph io from declared context

This commit is contained in:
2026-04-15 13:07:09 +08:00
parent 2605608685
commit 3f0f279000
4 changed files with 59 additions and 22 deletions

View File

@@ -11,13 +11,6 @@ namespace Rendering {
bool SceneRenderFeaturePass::RecordRenderGraph(
const SceneRenderFeaturePassRenderGraphContext& context) {
const bool usesSourceColor = context.sourceColorTexture.IsValid();
const bool writesColor =
std::any_of(
context.colorTargets.begin(),
context.colorTargets.end(),
[](RenderGraphTextureHandle handle) {
return handle.IsValid();
});
const RenderGraphRecordingContext baseRecordingContext =
BuildRenderGraphRecordingContext(context);
const RenderSurface sourceSurfaceTemplate =
@@ -51,11 +44,7 @@ bool SceneRenderFeaturePass::RecordRenderGraph(
return RecordRasterRenderPass(
*this,
passContext,
{
usesSourceColor,
writesColor,
context.depthTarget.IsValid()
});
BuildDeclaredRasterPassGraphIO(passContext));
}
} // namespace Rendering