Skip to content
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

Only keep alive those objects that are necessary. #628

Merged
merged 4 commits into from
Oct 22, 2024

Conversation

fyellin
Copy link
Contributor

@fyellin fyellin commented Oct 21, 2024

As of wgpu 1.25, we no longer need to keep alive as many objects internally as we used to. I have deleted several pieces of code that kept a copy of its arguments to that they wouldn't be released.

The only exception is RenderBundleEncoder. I have filed a bug about it.

Added a test that agressively deletes objects even though they are needed by the GPU, just to make sure that things work correctly.

@fyellin fyellin marked this pull request as ready for review October 21, 2024 22:07
@fyellin fyellin requested a review from Korijn as a code owner October 21, 2024 22:07
Copy link
Member

@almarklein almarklein left a comment

Choose a reason for hiding this comment

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

Thanks for this!

wgpu/_classes.py Show resolved Hide resolved
Copy link
Collaborator

@Korijn Korijn left a comment

Choose a reason for hiding this comment

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

Very cool!!

@Korijn Korijn merged commit b86f810 into pygfx:main Oct 22, 2024
21 checks passed
@fyellin fyellin deleted the gc-objects branch October 22, 2024 16:31
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.

3 participants