Open VincentJousse opened 3 months ago
Did you use a new texture in every frame? if so, the old texture should call destroy explicitly before being dropped on the web platform. maybe this issue is related https://github.com/gfx-rs/wgpu/issues/4092
I call device.create_texture() at initialization only, and queue.write_texture() for each frame.
I've seen this before in my wgpu/webgl codebase. It's something to do with the retention of write_buffer/texture intermediate buffers. they balloon out of control then randomly snap back to normal. I have yet to be able to track down what is going on inside of wgpu, but it's definitely within wgpu. You can see it if you pull stack traces of all live large allocations using a custom allocator.
@cwfitzgerald Have you found a workaround ? Or may I contribute to wgpu if you give me some help ?
Description I use wgpu to develop a video player. when rendering 4K 12bits textures, the browser's developer tools shows very high memory usage. It seems that some texture memory is not freed.
Repro steps I can try to extract an example if needed.
Expected vs observed behavior I would have expected a constant memory footprint, but I reach 3.5Go after 192 frames displayed.
Platform linux, wgpu: 0.15 and 0.20