Struct vulkano::memory::MemoryAllocateInfo
source · [−]pub struct MemoryAllocateInfo<'d> {
pub allocation_size: DeviceSize,
pub memory_type_index: u32,
pub dedicated_allocation: Option<DedicatedAllocation<'d>>,
pub export_handle_types: ExternalMemoryHandleTypes,
pub _ne: NonExhaustive,
}
Expand description
Parameters to allocate a new DeviceMemory
.
Fields
allocation_size: DeviceSize
The number of bytes to allocate.
The default value is 0
, which must be overridden.
memory_type_index: u32
The index of the memory type that should be allocated.
The default value is u32::MAX
, which must be overridden.
dedicated_allocation: Option<DedicatedAllocation<'d>>
Allocates memory for a specific buffer or image.
This value is silently ignored (treated as None
) if the device API version is less than
1.1 and the
khr_dedicated_allocation
extension is not enabled on the device.
export_handle_types: ExternalMemoryHandleTypes
The handle types that can be exported from the allocated memory.
_ne: NonExhaustive
Implementations
sourceimpl<'d> MemoryAllocateInfo<'d>
impl<'d> MemoryAllocateInfo<'d>
sourcepub fn dedicated_allocation(
dedicated_allocation: DedicatedAllocation<'d>
) -> Self
pub fn dedicated_allocation(
dedicated_allocation: DedicatedAllocation<'d>
) -> Self
Returns a MemoryAllocateInfo
with the specified dedicated_allocation
.
Trait Implementations
sourceimpl<'d> Clone for MemoryAllocateInfo<'d>
impl<'d> Clone for MemoryAllocateInfo<'d>
sourcefn clone(&self) -> MemoryAllocateInfo<'d>
fn clone(&self) -> MemoryAllocateInfo<'d>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<'d> Debug for MemoryAllocateInfo<'d>
impl<'d> Debug for MemoryAllocateInfo<'d>
Auto Trait Implementations
impl<'d> RefUnwindSafe for MemoryAllocateInfo<'d>
impl<'d> Send for MemoryAllocateInfo<'d>
impl<'d> Sync for MemoryAllocateInfo<'d>
impl<'d> Unpin for MemoryAllocateInfo<'d>
impl<'d> UnwindSafe for MemoryAllocateInfo<'d>
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more