vk::mem · Structs · M1
3 public declarations with native signatures and source-owned contracts.
Stvk::mem::MemoryPriority
Contract
Finite native memory priority in the inclusive range 0..=1.
Methods and associated items
new
Validate a native allocation priority.
Errors
Returns InvalidRequest for NaN, infinities or values outside 0..=1.
get
clone
fmt
default
eq
self and other values to be equal, and is used by ==.Stvk::mem::MemoryStatistics
Contract
Explicit diagnostic snapshot, indexed by native memory type and heap.
Fields
total
total: DetailedStatisticsmemory_types
memory_types: [DetailedStatistics; 32]heaps
heaps: [DetailedStatistics; 16]Methods and associated items
new
Construct the record with its default state.
set_total
Set total and return the updated record.
set_memory_types
Set memory_types and return the updated record.
set_heaps
Set heaps and return the updated record.
clone
fmt
default
eq
self and other values to be equal, and is used by ==.Stvk::mem::MemoryTypeSelector
Contract
Validated device memory properties and non-coherent atom size.
Methods and associated items
new
find_memory_type
Select a compatible type; preferred-bit ties retain the lower index.
Donor: VMA VmaAllocator_T::FindMemoryTypeIndex, required-bit test and
missing-preferred-bit cost. Adaptation: checked metadata, no hidden usage policy.
find_memory_type_with_preferences
Required flags are mandatory; cost counts missing preferred and present avoided bits.