refactor(rendering): add callback helpers for common graph pass contracts
This commit is contained in:
@@ -59,5 +59,27 @@ inline bool RecordColorDepthRasterPass(
|
||||
BuildColorDepthRasterPassGraphIO());
|
||||
}
|
||||
|
||||
inline bool RecordSourceColorFullscreenCallbackRasterPass(
|
||||
const RenderPassRenderGraphContext& context,
|
||||
RenderPassGraphExecutePassCallback executePassCallback,
|
||||
std::vector<RenderGraphTextureHandle> additionalReadTextures = {}) {
|
||||
return RecordCallbackRasterRenderPass(
|
||||
context,
|
||||
BuildSourceColorFullscreenRasterPassGraphIO(),
|
||||
std::move(executePassCallback),
|
||||
std::move(additionalReadTextures));
|
||||
}
|
||||
|
||||
inline bool RecordColorDepthCallbackRasterPass(
|
||||
const RenderPassRenderGraphContext& context,
|
||||
RenderPassGraphExecutePassCallback executePassCallback,
|
||||
std::vector<RenderGraphTextureHandle> additionalReadTextures = {}) {
|
||||
return RecordCallbackRasterRenderPass(
|
||||
context,
|
||||
BuildColorDepthRasterPassGraphIO(),
|
||||
std::move(executePassCallback),
|
||||
std::move(additionalReadTextures));
|
||||
}
|
||||
|
||||
} // namespace Rendering
|
||||
} // namespace XCEngine
|
||||
|
||||
@@ -57,13 +57,8 @@ bool RecordRenderPipelineMainScenePhasePass(
|
||||
scenePhase)),
|
||||
beginPassCallback,
|
||||
endPassCallback);
|
||||
return RecordCallbackRasterRenderPass(
|
||||
return RecordColorDepthCallbackRasterPass(
|
||||
passContext,
|
||||
{
|
||||
false,
|
||||
true,
|
||||
context.depthTarget.IsValid()
|
||||
},
|
||||
std::move(executePassCallback),
|
||||
std::move(additionalReadTextures));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user