gfx-rs/wgpu

Some buffer memory does not get freed after the device is dropped

cryscan opened this issue · 3 comments

Description
Some buffer memory not get freed after the device is dropped.
40d0847837d2d92e9c1cd014f5ed97a4

In the picture above, I load the same amount of data twice. Between the loads I drop the adapter, the device and all the buffers. However it seems that there are still some GPU memory not freed.

Expected vs observed behavior

  • Expected: The two loads take the same amount of GPU memory.
  • Observed: The later load takes more memory, and if repeating the process you will get an OOM.

Platform

AdapterInfo {
    name: "AMD Radeon 780M Graphics",
    vendor: 4098,
    device: 5567,
    device_type: IntegratedGpu,
    driver: "AMD proprietary driver",
    driver_info: "22.40.05.11 (LLPC)",
    backend: Vulkan,
}

Maybe related to #3518 and #3498?

Update: Tried

queue.submit(None);
device.poll(Maintain::Wait);

before dropping, it gets mitigated, but each reload still adds 0.2GB.