refactor(rendering): move stage graph pass context into contract
This commit is contained in:
@@ -19,6 +19,22 @@ CameraFrameRenderGraphSourceBinding BuildCameraFrameStageGraphSourceBinding(
|
||||
};
|
||||
}
|
||||
|
||||
RenderPassContext BuildCameraFrameStageGraphPassContext(
|
||||
const CameraFrameRenderGraphStageContext& context,
|
||||
const CameraFrameStageGraphBuildState& stageState,
|
||||
const RenderSceneData& sceneData) {
|
||||
const CameraFrameRenderGraphSourceBinding sourceBinding =
|
||||
BuildCameraFrameStageGraphSourceBinding(stageState);
|
||||
return {
|
||||
context.plan.request.context,
|
||||
stageState.surfaceTemplate,
|
||||
sceneData,
|
||||
sourceBinding.sourceSurfaceTemplate,
|
||||
sourceBinding.sourceColorView,
|
||||
sourceBinding.sourceColorState
|
||||
};
|
||||
}
|
||||
|
||||
CameraFrameRenderGraphSourceBinding ResolveCameraFrameFullscreenStageGraphSourceBinding(
|
||||
const CameraFramePlan& plan,
|
||||
CameraFrameStage stage,
|
||||
|
||||
@@ -23,6 +23,11 @@ struct CameraFrameStageFallbackSurfaceResolution {
|
||||
CameraFrameRenderGraphSourceBinding BuildCameraFrameStageGraphSourceBinding(
|
||||
const CameraFrameStageGraphBuildState& stageState);
|
||||
|
||||
RenderPassContext BuildCameraFrameStageGraphPassContext(
|
||||
const CameraFrameRenderGraphStageContext& context,
|
||||
const CameraFrameStageGraphBuildState& stageState,
|
||||
const RenderSceneData& sceneData);
|
||||
|
||||
CameraFrameRenderGraphSourceBinding ResolveCameraFrameFullscreenStageGraphSourceBinding(
|
||||
const CameraFramePlan& plan,
|
||||
CameraFrameStage stage,
|
||||
|
||||
@@ -10,22 +10,6 @@
|
||||
namespace XCEngine {
|
||||
namespace Rendering {
|
||||
|
||||
RenderPassContext BuildCameraFrameStageGraphPassContext(
|
||||
const CameraFrameRenderGraphStageContext& context,
|
||||
const CameraFrameStageGraphBuildState& stageState,
|
||||
const RenderSceneData& sceneData) {
|
||||
return {
|
||||
context.plan.request.context,
|
||||
stageState.surfaceTemplate,
|
||||
sceneData,
|
||||
stageState.hasSourceSurface
|
||||
? &stageState.sourceSurfaceTemplate
|
||||
: nullptr,
|
||||
stageState.sourceColorView,
|
||||
stageState.sourceColorState
|
||||
};
|
||||
}
|
||||
|
||||
CameraFrameStageGraphBuildState BuildCameraFrameStageGraphBuildState(
|
||||
CameraFrameStage stage,
|
||||
const CameraFrameRenderGraphStageContext& context) {
|
||||
|
||||
@@ -23,11 +23,6 @@ struct CameraFrameStageGraphBuildState {
|
||||
RenderGraphTextureHandle outputColor = {};
|
||||
};
|
||||
|
||||
RenderPassContext BuildCameraFrameStageGraphPassContext(
|
||||
const CameraFrameRenderGraphStageContext& context,
|
||||
const CameraFrameStageGraphBuildState& stageState,
|
||||
const RenderSceneData& sceneData);
|
||||
|
||||
CameraFrameStageGraphBuildState BuildCameraFrameStageGraphBuildState(
|
||||
CameraFrameStage stage,
|
||||
const CameraFrameRenderGraphStageContext& context);
|
||||
|
||||
Reference in New Issue
Block a user