Struct PoolCreateInfo

Source
pub struct PoolCreateInfo<'a> {
    pub memory_type_index: u32,
    pub flags: AllocatorPoolCreateFlags,
    pub block_size: DeviceSize,
    pub min_block_count: usize,
    pub max_block_count: usize,
    pub priority: f32,
    pub min_allocation_alignment: DeviceSize,
    pub memory_allocate_next: *const c_void,
    pub _marker: PhantomData<&'a mut ()>,
}

Fields§

§memory_type_index: u32

Vulkan memory type index to allocate this pool from.

§flags: AllocatorPoolCreateFlags§block_size: DeviceSize

Size of a single vk::DeviceMemory block to be allocated as part of this pool, in bytes. Optional. Specify nonzero to set explicit, constant size of memory blocks used by this pool. Leave 0 to use default and let the library manage block sizes automatically. Sizes of particular blocks may vary. In this case, the pool will also support dedicated allocations.

§min_block_count: usize

Minimum number of blocks to be always allocated in this pool, even if they stay empty. Set to 0 to have no preallocated blocks and allow the pool be completely empty.

§max_block_count: usize

Maximum number of blocks that can be allocated in this pool. Optional. Set to 0 to use default, which is usize::MAX, which means no limit. Set to same value as VmaPoolCreateInfo::minBlockCount to have fixed amount of memory allocated throughout whole lifetime of this pool.

§priority: f32

A floating-point value between 0 and 1, indicating the priority of the allocations in this pool 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. Otherwise, this variable is ignored.

§min_allocation_alignment: DeviceSize

Additional minimum alignment to be used for all allocations created from this pool. Can be 0. Leave 0 (default) not to impose any additional alignment. If not 0, it must be a power of two. It can be useful in cases where alignment returned by Vulkan by functions like vkGetBufferMemoryRequirements is not enough, e.g. when doing interop with OpenGL.

§memory_allocate_next: *const c_void

Additional pNext chain to be attached to VkMemoryAllocateInfo used for every allocation made by this pool. Optional. If not null, it must point to a pNext chain of structures that can be attached to VkMemoryAllocateInfo. It can be useful for special needs such as adding VkExportMemoryAllocateInfoKHR. Structures pointed by this member must remain alive and unchanged for the whole lifetime of the custom pool. Please note that some structures, e.g. VkMemoryPriorityAllocateInfoEXT, VkMemoryDedicatedAllocateInfoKHR, can be attached automatically by this library when using other, more convenient of its features.

§_marker: PhantomData<&'a mut ()>

Implementations§

Trait Implementations§

Source§

impl<'a> Clone for PoolCreateInfo<'a>

Source§

fn clone(&self) -> PoolCreateInfo<'a>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for PoolCreateInfo<'_>

Source§

fn default() -> Self

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

Auto Trait Implementations§

§

impl<'a> Freeze for PoolCreateInfo<'a>

§

impl<'a> RefUnwindSafe for PoolCreateInfo<'a>

§

impl<'a> !Send for PoolCreateInfo<'a>

§

impl<'a> !Sync for PoolCreateInfo<'a>

§

impl<'a> Unpin for PoolCreateInfo<'a>

§

impl<'a> !UnwindSafe for PoolCreateInfo<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.