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 flags: MemoryAllocateFlags,
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.
flags: MemoryAllocateFlags
Additional flags for the memory allocation.
If not empty, the device API version must be at least 1.1, or the
khr_device_group
extension must be
enabled on the device.
The default value is MemoryAllocateFlags::empty()
.
_ne: NonExhaustive
Implementations§
source§impl<'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§
source§impl<'d> Clone for MemoryAllocateInfo<'d>
impl<'d> Clone for MemoryAllocateInfo<'d>
source§fn clone(&self) -> MemoryAllocateInfo<'d>
fn clone(&self) -> MemoryAllocateInfo<'d>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more