Struct vk_mem_erupt::AllocationCreateInfo[][src]

pub struct AllocationCreateInfo {
    pub usage: MemoryUsage,
    pub flags: AllocationCreateFlags,
    pub required_flags: MemoryPropertyFlags,
    pub preferred_flags: MemoryPropertyFlags,
    pub memory_type_bits: u32,
    pub pool: Option<AllocatorPool>,
    pub user_data: Option<*mut c_void>,
}
Expand description

Description of an Allocation to be created.

Fields

usage: MemoryUsage

Intended usage of memory.

You can leave MemoryUsage::UNKNOWN if you specify memory requirements in another way.

If pool is not None, this member is ignored.

flags: AllocationCreateFlags

Flags for configuring the allocation

required_flags: MemoryPropertyFlags

Flags 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 None, this member is ignored.

preferred_flags: MemoryPropertyFlags

Flags that preferably should be set in a memory type chosen for an allocation.

Set to 0 if no additional flags are prefered.

If pool is not None, this member is ignored.

memory_type_bits: u32

Bit mask containing one bit set for every memory type acceptable for this allocation.

Value 0 is equivalent to std::u32::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 None, this member is ignored.

pool: Option<AllocatorPool>

Pool that this allocation should be created in.

Specify None to allocate from default pool. If not None, members: usage, required_flags, preferred_flags, memory_type_bits are ignored.

user_data: Option<*mut c_void>

Custom general-purpose pointer that will be stored in Allocation, can be read as Allocation::get_user_data() and changed using Allocator::set_allocation_user_data.

If AllocationCreateFlags::USER_DATA_COPY_STRING 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.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Construct AllocationCreateInfo with default values

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.