Skip to content

Commit

Permalink
fix web (#165)
Browse files Browse the repository at this point in the history
* fix web

* fix fg dispatcher
  • Loading branch information
star-e authored Oct 9, 2023
1 parent 36a2933 commit 7ccbd91
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cocos/rendering/custom/executor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1249,7 +1249,7 @@ class DeviceComputePass {
const layoutGraph = context.layoutGraph;
const stageId = layoutGraph.locateChild(layoutGraph.nullVertex(), stageName);
if (stageId !== 0xFFFFFFFF) {
this._layout = new RenderPassLayoutInfo(stageId, input);
this._layout = new RenderPassLayoutInfo(stageId, this._computeInfo.id, input);
}
}
}
Expand Down
13 changes: 9 additions & 4 deletions native/cocos/renderer/pipeline/custom/FrameGraphDispatcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -794,10 +794,15 @@ struct AttachmentSortKey {
const ccstd::pmr::string &name;
};

struct AttachmentComparator {
struct SubpassComparator {
bool operator()(const AttachmentSortKey &lhs, const AttachmentSortKey &rhs) const {
return std::tie(rhs.samples, lhs.accessType, lhs.attachmentWeight, lhs.slotID, lhs.slotName, lhs.name) <
std::tie(lhs.samples, rhs.accessType, rhs.attachmentWeight, rhs.slotID, rhs.slotName, rhs.name);
return std::tie(rhs.samples, lhs.accessType, lhs.attachmentWeight, lhs.name) < std::tie(lhs.samples, rhs.accessType, rhs.attachmentWeight, rhs.name);
}
};

struct PassComparator {
bool operator()(const AttachmentSortKey &lhs, const AttachmentSortKey &rhs) const {
return lhs.slotID < rhs.slotID;
}
};

Expand Down Expand Up @@ -1058,7 +1063,7 @@ bool checkResolveResource(const Graphs &graphs,
colorMap.emplace(AttachmentSortKey{desc.sampleCount,
AccessType::WRITE,
ATTACHMENT_TYPE_WEIGHT[static_cast<uint32_t>(attachmentType)],
INVALID_ID,
static_cast<uint32_t>(colorMap.size()),
"",
resolveTargetName},
ViewInfo{desc.format,
Expand Down

0 comments on commit 7ccbd91

Please sign in to comment.