-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
automatically barrier reconstruction #13
Conversation
const ResourceGraph &resourceGraph; | ||
|
||
ExternalResMap & externalMap; //last frame to curr frame status transition | ||
PmrFlatSet<PmrString> externalResNames; //first meet in this frame |
There was a problem hiding this comment.
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]; |
There was a problem hiding this comment.
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);
。
这两个值应该是一样的?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
是一样的
@@ -633,8 +422,10 @@ void FrameGraphDispatcher::buildBarriers() const { | |||
// : or no extra barrier needed. | |||
BarrierMap batchedBarriers; | |||
|
|||
static ExternalResMap externalMap; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
尽量不要用static变量,不排除有多个FrameGraphDispatcher在多个线程同时被使用。
Re: cocos-creator/3d-tasks#
Changelog:
with doc: https://github.com/cocos/3d-tasks/pull/11854