Realm

vk::mem · Functions · R1

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

FnRustExperimental

Fnvk::mem::refresh_budget

Contract

Refresh an allocator-owned budget snapshot from the retained native context.

Without EXT_memory_budget this records local accounting. A manually constructed EXT allocator needs refresh_budget_with_context before automatic refresh.

Errors

Missing context/PFN or invalid native outputs leave the previous cache intact.

Fnvk::mem::refresh_budget_with_context

pub unsafe fn refresh_budget_with_context( allocator: &mut Allocator<'_>, instance: &Instance, physical: PhysicalDevice, ) -> Result<BudgetSnapshot, AllocError>
Capture a checked budget context for future refreshes, including manual constructors.

Contract

Capture a checked budget context for future refreshes, including manual constructors.

Errors

Preserves context/query errors before changing retained budget state.

Safety

Instance/physical device must be the exact live parents of this allocator’s device and remain live for its complete remaining lifetime. Returned usage is a snapshot, never a reservation. Device retention keeps PFN code loaded only.