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
Auto Trait Implementations
impl RefUnwindSafe for AllocationCreateInfo
impl !Send for AllocationCreateInfo
impl !Sync for AllocationCreateInfo
impl Unpin for AllocationCreateInfo
impl UnwindSafe for AllocationCreateInfo
Blanket Implementations
Mutably borrows from an owned value. Read more