-
Notifications
You must be signed in to change notification settings - Fork 172
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
igl | opengl | Fix memory leak in RenderPipelineState::activeAttributesLocations_ #187
Conversation
@corporateshark has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
This PR fixes a memory leak, but it may cause some perf overhead if things are unbound and then immediately rebound. Is there a way to fix the memory leak without the perf overhead? |
…or the new draw call, only disable the attribute locations that are not needed. This way, the number of glEnable/glDisableVertexAttribArray calls can be reduced.
@EricGriffith |
@corporateshark has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@corporateshark This PR has opened for a long time ,is there any problem with it ? |
@vinsentli Thank you for following up! We’re still conducting some internal testing. Rest assured, as long as this PR remains open, someone on the team will review it at some point. |
@corporateshark Thanks for your reply. |
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.
Please rebase this on top of the latest main
branch.
done |
@corporateshark has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@corporateshark merged this pull request in 3a61b4e. |
When a RenderCommandEncoder sequentially binds two IRenderPipelineStates, if both of these states have the same VertexInputState, the previous IRenderPipelineState is unable to execute unbindVertexAttributes(). As a result, the activeAttributesLocations_ of the previous RenderPipelineState remains in a continuous state of memory growth and cannot be released.