gfx-rs / wgpu-native

Native WebGPU implementation based on wgpu-core
Apache License 2.0
843 stars 96 forks source link

How to interpret RegistryReport #367

Open almarklein opened 7 months ago

almarklein commented 7 months ago

The RegistryReport entries have fields:

But to me it's unclear how to interpret these num values. My first guess was that num_allocated is the cumulative number of objects that have been allocated in this session, while num_released_from_user is the cumulative number of released objects. So num_kept_from_user should be the difference. However, I do see in some cases that kept + released > allocated.

The docs of gpu-core don't help.

Could someone please explain what the values mean? In wgpu-py we use these in diagnostics to measure the number of live objects, and also have tests for this to detect/prevent memory leaks.

I could submit a PR to improve the wgpu-core docs, once I understand how these work :)