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

Add a way to expire/recycle a texture in wgpu-core #5138

Open
nical opened this issue Jan 24, 2024 · 0 comments
Open

Add a way to expire/recycle a texture in wgpu-core #5138

nical opened this issue Jan 24, 2024 · 0 comments
Labels
type: enhancement New feature or request

Comments

@nical
Copy link
Contributor

nical commented Jan 24, 2024

This is needed for Firefox to implement the canvas presentation efficiently using textures. We must be able to:

  • Mark a texture as expired which from the user's point of view is equivalent to destroying the texture.
  • Recycle the texture memory without allowing old references to the expired textures to affect the recycled versions.

A possible approach is to add a texture "renaming" in wgpu-core which would snatch the hal texture and place it in a new wgpu-core texture. It would leave the old wgpu-core texture alive and unusable and references to it wouldn't be able to affect the texture.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

2 participants