refactor(rendering): formalize shared render-graph recording context
This commit is contained in:
@@ -8,29 +8,6 @@
|
||||
|
||||
namespace XCEngine {
|
||||
namespace Rendering {
|
||||
namespace {
|
||||
|
||||
RenderGraphRecordingContext BuildCommonContext(
|
||||
const RenderPipelineMainSceneRenderGraphContext& context,
|
||||
Containers::String passName) {
|
||||
return {
|
||||
context.graphBuilder,
|
||||
passName,
|
||||
context.renderContext,
|
||||
context.sceneData,
|
||||
context.surfaceTemplate,
|
||||
context.sourceSurface,
|
||||
context.sourceColorView,
|
||||
context.sourceColorState,
|
||||
context.sourceColorTexture,
|
||||
context.colorTargets,
|
||||
context.depthTarget,
|
||||
context.executionSucceeded,
|
||||
context.blackboard
|
||||
};
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
Containers::String BuildRenderPipelineMainScenePhasePassName(
|
||||
const Containers::String& baseName,
|
||||
@@ -54,7 +31,7 @@ bool RecordRenderPipelineMainSceneFeaturePasses(
|
||||
bool* recordedAnyPass) {
|
||||
const SceneRenderFeaturePassRenderGraphContext featureContext =
|
||||
BuildSceneRenderFeaturePassRenderGraphContext(
|
||||
BuildCommonContext(context, context.passName),
|
||||
BuildRenderGraphRecordingContext(context),
|
||||
clearAttachments,
|
||||
beginPassCallback,
|
||||
endPassCallback);
|
||||
@@ -73,8 +50,8 @@ bool RecordRenderPipelineMainScenePhasePass(
|
||||
std::vector<RenderGraphTextureHandle> additionalReadTextures) {
|
||||
const RenderPassRenderGraphContext passContext =
|
||||
BuildRenderPassRenderGraphContext(
|
||||
BuildCommonContext(
|
||||
context,
|
||||
CloneRenderGraphRecordingContext(
|
||||
BuildRenderGraphRecordingContext(context),
|
||||
BuildRenderPipelineMainScenePhasePassName(
|
||||
context.passName,
|
||||
scenePhase)),
|
||||
|
||||
Reference in New Issue
Block a user