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

Fix leaks caused by mapped buffers #6053

Closed
teoxoy opened this issue Jul 26, 2024 · 1 comment
Closed

Fix leaks caused by mapped buffers #6053

teoxoy opened this issue Jul 26, 2024 · 1 comment
Assignees
Labels
type: bug Something isn't working

Comments

@teoxoy
Copy link
Member

teoxoy commented Jul 26, 2024

There are currently 2 instances where we leak:

  • create a mapped_at_creation buffer without BufferUsages::MAP_WRITE, unmap it, make sure to not call .submit()
  • create a buffer with BufferUsages::MAP_WRITE, map it, unmap it, make sure to not call .maintain()
    • this puts the buffer in LifetimeTracker.mapped won't get cleared because we don't call maintain
    • this might not be a problem since users of the wgpu-core API should call maintain behind-the-scenes
@teoxoy teoxoy added the type: bug Something isn't working label Jul 26, 2024
@teoxoy teoxoy self-assigned this Jul 26, 2024
@teoxoy
Copy link
Member Author

teoxoy commented Aug 1, 2024

I talked with @jimblandy about this and we concluded that we don't need to address these leaks because they only affect programs that never actually submit work to the GPU/don't poll devices.

The fixes are also not trivial and will most likely have perf impact.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

1 participant