refactor(rendering): infer raster pass graph io from declared context
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user