SubbufferAllocatorCreateInfo

Struct SubbufferAllocatorCreateInfo 

Source
pub struct SubbufferAllocatorCreateInfo {
    pub arena_size: u64,
    pub buffer_usage: BufferUsage,
    pub memory_type_filter: MemoryTypeFilter,
    pub _ne: NonExhaustive,
}
Expand description

Parameters to create a new SubbufferAllocator.

Fields§

§arena_size: u64

Initial size of an arena in bytes.

Ideally this should fit all the data you need to update per frame. So for example, if you need to allocate buffers of size 1K, 2K and 5K each frame, then this should be 8K. If your data is dynamically-sized then try to make an educated guess or simply leave the default.

The default value is 0.

§buffer_usage: BufferUsage

The buffer usage that all allocated buffers should have.

The default value is empty, which must be overridden.

§memory_type_filter: MemoryTypeFilter

The memory type filter all buffers should be allocated with.

The default value is MemoryTypeFilter::PREFER_DEVICE.

§_ne: NonExhaustive

Trait Implementations§

Auto Trait Implementations§

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> 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, 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.