gfx-rs/wgpu

StagingBelt memory usage problems in certain scenarios

Open

#1.441 geöffnet am 8. Mai 2021

Auf GitHub ansehen
 (0 Kommentare) (3 Reaktionen) (0 zugewiesene Personen)Rust (703 Forks)batch import
good first issuetype: bug

Repository-Metriken

Stars
 (9.290 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 10T 7h) (61 gemergte PRs in 30 T)

Beschreibung

Recently I decided to try out Iced but run into some memory problems while testing an example, as can be seen in this issue: https://github.com/hecrj/iced/issues/786 I narrowed it down to the wgpu-rs StagingBelt, and the lack of a way to cleanup unused free Chunks from the belt. The issue with the Game of Life example was that I only added more geometry to the screen, so my buffers got larger, never fitting inside the previous Chunks and so creating new Chunks while the old Chunks stayed unused forever. I managed to fix the issue by implementing a naive GC: https://github.com/eduardobraun/wgpu-rs/commit/a62dd38538b41e2890a0cecd59e692f1d208d6e6

TLDR: StagingBelt needs a way to reclaim memory from free Chunks.

Contributor Guide