Traverse-Research / gpu-allocator

🦀 GPU memory allocator for Vulkan, DirectX 12 and Metal. Written in pure Rust
https://traverse.nl/
Apache License 2.0
374 stars 49 forks source link

`Allocator::new` should be unsafe #160

Open i509VCB opened 1 year ago

i509VCB commented 1 year ago

Allocator::new should not be safe because there is no guarantee the caller has made sure the ash::Device outlives the allocator.

The AllocatorCreateDesc also needs to be populated so that the instance is the one which created the physical device and the device was created from the physical device.