Struct vk_mem_alloc::ffi::VmaAllocationCreateInfo
source · [−]#[repr(C)]pub struct VmaAllocationCreateInfo {
pub flags: VmaAllocationCreateFlags,
pub usage: VmaMemoryUsage,
pub requiredFlags: MemoryPropertyFlags,
pub preferredFlags: MemoryPropertyFlags,
pub memoryTypeBits: u32,
pub pool: VmaPool,
pub pUserData: *mut c_void,
pub priority: f32,
}Expand description
\brief Parameters of new #VmaAllocation.
To be used with functions like vmaCreateBuffer(), vmaCreateImage(), and many others.
Fields
flags: VmaAllocationCreateFlagsUse #VmaAllocationCreateFlagBits enum.
usage: VmaMemoryUsage\brief Intended usage of memory.
You can leave #VMA_MEMORY_USAGE_UNKNOWN if you specify memory requirements in other way. \n
If pool is not null, this member is ignored.
requiredFlags: MemoryPropertyFlags\brief Flags that must be set in a Memory Type chosen for an allocation.
Leave 0 if you specify memory requirements in other way. \n
If pool is not null, this member is ignored.
preferredFlags: MemoryPropertyFlags\brief Flags that preferably should be set in a memory type chosen for an allocation.
Set to 0 if no additional flags are preferred. \n
If pool is not null, this member is ignored.
memoryTypeBits: u32\brief Bitmask 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. \n
If pool is not null, this member is ignored.
pool: VmaPool\brief Pool that this allocation should be created in.
Leave VK_NULL_HANDLE to allocate from default pool. If not null, members:
usage, requiredFlags, preferredFlags, memoryTypeBits are ignored.
pUserData: *mut c_void\brief Custom general-purpose pointer that will be stored in #VmaAllocation, 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: f32\brief A 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.
Auto Trait Implementations
impl RefUnwindSafe for VmaAllocationCreateInfo
impl !Send for VmaAllocationCreateInfo
impl !Sync for VmaAllocationCreateInfo
impl Unpin for VmaAllocationCreateInfo
impl UnwindSafe for VmaAllocationCreateInfo
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more