Realm

vk::mem · Functions · I1

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

FnRustExperimental

Fnvk::mem::invalidate

pub unsafe fn invalidate( allocator: &Allocator<'_>, allocation: &Allocation, offset: u64, size: u64, ) -> Result<(), AllocError>
Invalidate a bounded allocation-relative mapped range; never waits for the GPU.

Contract

Invalidate a bounded allocation-relative mapped range; never waits for the GPU.

Safety

Complete device writes first and do not race host accesses.

Fnvk::mem::invalidate_many

pub unsafe fn invalidate_many( allocator: &Allocator<'_>, ranges: &[CacheRange<'_>], ) -> Result<(), AllocError>
Invalidate checked ranges in one native call; never waits for device writes.

Contract

Invalidate checked ranges in one native call; never waits for device writes.

Errors

Same checked identity/map/range and native errors as flush_many.

Safety

Device writes must have completed; synchronize every host/GPU access first.