-
Notifications
You must be signed in to change notification settings - Fork 7.1k
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
Add custom programs to ProgramCache #20496
Conversation
Store and retrieve custom user-defined programs to ProgramCache.
|
||
void ProgramCache::addCustomProgram(const std::string &key, backend::Program *program) | ||
{ | ||
_cachedCustomPrograms.emplace(key, program); |
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.
need release old program if key is already exist in _cachedCustomPrograms
.
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.
I have fixed this in ironhidegames@69f3933
Should I make a new PR?
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.
Yes, please.
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.
Yes, it would be great.
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.
I have made a new PR: #20550
Add custom programs to ProgramCache (cocos2d#20496)
Store and retrieve custom user-defined programs to ProgramCache.
Store and retrieve custom user-defined programs in ProgramCache.
This feature was in v3 but not present in v4.