gfx-rs / gfx

[maintenance mode] A low-overhead Vulkan-like GPU API for Rust.
http://gfx-rs.github.io/
Apache License 2.0
5.35k stars 551 forks source link

[0.7/dx12] Reset command allocators periodically #3728

Closed grovesNL closed 3 years ago

grovesNL commented 3 years ago

Backport #3680 to hal-0.7 to avoid excess memory usage in DX12.

Some Bevy users were hitting this through wgpu, so it might be nice to backport this fix this in 0.7 too (instead of waiting for the next wgpu release).

I tried hal-0.7 with and without the fix on quad by repeatedly resizing the window, and the memory grows without the fix but seems stable with it (as expected).

PR checklist:

bors[bot] commented 3 years ago

Build succeeded:

kvark commented 3 years ago

This is published in 0.7.1 now 🚀

grovesNL commented 3 years ago

Thank you!