pub struct AllocationCreateInfo {
pub flags: AllocationCreateFlags,
pub usage: MemoryUsage,
pub required_flags: MemoryPropertyFlags,
pub preferred_flags: MemoryPropertyFlags,
pub memory_type_bits: u32,
pub user_data: usize,
pub priority: f32,
}Fields§
§flags: AllocationCreateFlags§usage: MemoryUsageIntended usage of memory.
You can leave MemoryUsage::Unknown if you specify memory requirements in other way.
If pool is not null, this member is ignored.
required_flags: MemoryPropertyFlagsFlags that must be set in a Memory Type chosen for an allocation.
Leave 0 if you specify memory requirements in other way.
If pool is not null, this member is ignored.
preferred_flags: MemoryPropertyFlagsFlags that preferably should be set in a memory type chosen for an allocation.“]
Set to 0 if no additional flags are preferred.
If pool is not null, this member is ignored.
memory_type_bits: u32Bitmask containing one bit set for every memory type acceptable for this allocation.
Value 0 is equivalent to UINT32_MAX - it means any memory type is accepted if
it meets other requirements specified by this structure, with no further
restrictions on memory type index.
If pool is not null, this member is ignored.
user_data: usizeCustom general-purpose pointer that will be stored in Allocation,
can be read as VmaAllocationInfo::pUserData and changed using vmaSetAllocationUserData().
If #VMA_ALLOCATION_CREATE_USER_DATA_COPY_STRING_BIT is used, it must be either null or pointer to a null-terminated string. The string will be then copied to internal buffer, so it doesn’t need to be valid after allocation call.
priority: f32A floating-point value between 0 and 1, indicating the priority of the allocation relative to other memory allocations.
It is used only when #VMA_ALLOCATOR_CREATE_EXT_MEMORY_PRIORITY_BIT flag was used during creation of the #VmaAllocator object and this allocation ends up as dedicated or is explicitly forced as dedicated using #VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT. Otherwise, it has the priority of a memory block where it is placed and this variable is ignored.
Trait Implementations§
Source§impl Clone for AllocationCreateInfo
impl Clone for AllocationCreateInfo
Source§fn clone(&self) -> AllocationCreateInfo
fn clone(&self) -> AllocationCreateInfo
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more