Skip to content

Conversation

@hana-alice
Copy link

@hana-alice hana-alice commented Mar 31, 2022

Re: cocos-creator/3d-tasks#

Changelog:
with doc: https://github.com/cocos/3d-tasks/pull/11854

@hana-alice hana-alice changed the title V3.6.0 pipeline automatically barrier reconstruction Mar 31, 2022
@hana-alice hana-alice marked this pull request as draft March 31, 2022 07:50
@hana-alice hana-alice marked this pull request as ready for review March 31, 2022 08:46
@star-e star-e merged commit 26d1945 into star-e:v3.6.0-pipeline Mar 31, 2022
const ResourceGraph &resourceGraph;

ExternalResMap & externalMap; //last frame to curr frame status transition
PmrFlatSet<PmrString> externalResNames; //first meet in this frame
Copy link
Owner

@star-e star-e Apr 1, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PmrFlatSet<PmrString> externalResNames需要保存在visitor外面。visitor经常会被copy来copy去,externalResNames会有多份而不是一份,造成结果不符合预期。

rag.resourceIndex.emplace(rescName, rescID);
rag.resourceNames.emplace_back(rescName);
} else {
rescID = rag.resourceIndex[rescName];
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这行没理解,上面已经取值了uint32_t rescID = rg.valueIndex.at(rescName);
这两个值应该是一样的?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是一样的

// : or no extra barrier needed.
BarrierMap batchedBarriers;

static ExternalResMap externalMap;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

尽量不要用static变量,不排除有多个FrameGraphDispatcher在多个线程同时被使用。

star-e pushed a commit that referenced this pull request Dec 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants