-
-
Notifications
You must be signed in to change notification settings - Fork 893
Shaders: Explicitly destroy WGPU images instead of waiting on GC #3149
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
base: master
Are you sure you want to change the base?
Conversation
Any ideas on why this might break vello? Do the textures potentially get destroyed twice when handing them off to vello? |
No, they get destroyed before they are rendered in vello. So vello has no texture left to read from, aka reads border color white. |
Yes I mean does deconstructing the Raster destroy the texture or something like that? |
I don't exactly understand how you're passing data from one node to another, seems to be a lot of cloning going on... But basically, we'd just need vello to "strongly reference" the |
How does this work with caching? Cache nodes are allowed to clone the data that flows through them, wouldn't this lead to some sort of double free? |
I always think of |
145c4f9
to
ecb4fe2
Compare
ecb4fe2
to
e9a8d4f
Compare
wrapped the wgpu texture in an Arc, may work, haven't tested it due to constant build failures... |
Performance Benchmark Results
|
I mean it does seem to work in the build link, I think we should be good to merge then. Just confirmed that this does not break anything else on desktop |
Issue:
This is a fix towards that by explicitly destroying wgpu images instead of waiting for js gc to do it for us. However, it currently breaks the vello renderer when used with GPU nodes.