Realm

vk::mem · Functions · M1

4 public declarations with native signatures and source-owned contracts.

FnRustExperimental

Fnvk::mem::map

pub unsafe fn map( allocator: &mut Allocator<'_>, allocation: &Allocation, ) -> Result<*mut c_void, AllocError>
Map one allocation. Distinct regions share a reference-counted block mapping. Repeated explicit maps acquire checked holds on the same native mapping.

Contract

Map one allocation. Distinct regions share a reference-counted block mapping. Repeated explicit maps acquire checked holds on the same native mapping.

Safety

Synchronize host/GPU access. Pointers remain valid only while an explicit or persistent hold for this allocation remains live. Do not alias Rust references.

Fnvk::mem::mapped_pointer

pub fn mapped_pointer( allocator: &Allocator<'_>, allocation: &Allocation, ) -> Result<Option<*mut c_void>, AllocError>
Return a region pointer only if that region has an explicit or persistent hold. Does not map, acquire a hold, synchronize, or authorize pointer dereferences.

Contract

Return a region pointer only if that region has an explicit or persistent hold. Does not map, acquire a hold, synchronize, or authorize pointer dereferences.

Fnvk::mem::memory_properties

pub fn memory_properties<'a>( allocator: &'a Allocator<'_>, ) -> Result<&'a PhysicalDeviceMemoryProperties, AllocError>
Borrow validated native memory metadata used by this allocator’s selection policy.

Contract

Borrow validated native memory metadata used by this allocator’s selection policy.

Fnvk::mem::memory_type_properties

Contract

Observe one checked native memory type’s actual property flags.