From d21dd29a00e6bf08876ab88f881dea4b0e23547b Mon Sep 17 00:00:00 2001 From: Zeqiang Li Date: Wed, 20 Sep 2023 22:56:27 +0800 Subject: [PATCH] comment & rename --- .../renderer/pipeline/custom/FrameGraphDispatcher.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/native/cocos/renderer/pipeline/custom/FrameGraphDispatcher.cpp b/native/cocos/renderer/pipeline/custom/FrameGraphDispatcher.cpp index 5c833132a6c..d62b32525f4 100644 --- a/native/cocos/renderer/pipeline/custom/FrameGraphDispatcher.cpp +++ b/native/cocos/renderer/pipeline/custom/FrameGraphDispatcher.cpp @@ -803,7 +803,7 @@ struct SubpassComparator { struct PassComparator { bool operator()(const AttachmentSortKey &lhs, const AttachmentSortKey &rhs) const { - return std::tie(lhs.slotID, lhs.name) < std::tie(rhs.slotID, rhs.name); + return lhs.slotID < rhs.slotID; } }; @@ -819,8 +819,8 @@ template using AttachmentMap = ccstd::pmr::map; } // namespace -template -void fillRenderPassInfo(const T &colorMap, +template +void fillRenderPassInfo(const AttachmentMap &colorMap, FGRenderPassInfo &fgRenderpassInfo, const ResourceGraph &resg) { for (const auto &pair : colorMap) { @@ -1228,7 +1228,7 @@ void startRenderSubpass(const Graphs &graphs, uint32_t passID, const RasterSubpa auto parentRagVertID = resourceAccessGraph.passIndex.at(parentID); auto &fgRenderpassInfo = get(ResourceAccessGraph::RenderPassInfoTag{}, resourceAccessGraph, parentRagVertID); - const auto &rg = renderGraph; + auto &rg = renderGraph; auto &rag = resourceAccessGraph; auto &resg = resourceGraph; @@ -1322,6 +1322,7 @@ void startRenderSubpass(const Graphs &graphs, uint32_t passID, const RasterSubpa CC_ASSERT(parentPass); if (parentPass->subpassGraph.subpasses.size() == 1) { + // for those renderpass which consist of only 1 subpass AttachmentMap colorMap(resourceAccessGraph.get_allocator()); process(colorMap); } else {