Skip to content

Commit

Permalink
comment & rename
Browse files Browse the repository at this point in the history
  • Loading branch information
hana-alice committed Sep 20, 2023
1 parent 72a0cbf commit d21dd29
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
};

Expand All @@ -819,8 +819,8 @@ template <typename Comp>
using AttachmentMap = ccstd::pmr::map<AttachmentSortKey, ViewInfo, Comp>;
} // namespace

template <typename T>
void fillRenderPassInfo(const T &colorMap,
template <typename Comp>
void fillRenderPassInfo(const AttachmentMap<Comp> &colorMap,
FGRenderPassInfo &fgRenderpassInfo,
const ResourceGraph &resg) {
for (const auto &pair : colorMap) {
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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<PassComparator> colorMap(resourceAccessGraph.get_allocator());
process(colorMap);
} else {
Expand Down

0 comments on commit d21dd29

Please sign in to comment.