Struct vulkano::memory::MemoryRequirements
source · [−]pub struct MemoryRequirements {
pub size: DeviceSize,
pub alignment: DeviceSize,
pub memory_type_bits: u32,
pub prefer_dedicated: bool,
}
Expand description
Represents requirements expressed by the Vulkan implementation when it comes to binding memory to a resource.
Fields
size: DeviceSize
Number of bytes of memory required.
alignment: DeviceSize
Alignment of the requirement buffer. The base memory address must be a multiple of this value.
memory_type_bits: u32
Indicates which memory types can be used. Each bit that is set to 1 means that the memory type whose index is the same as the position of the bit can be used.
prefer_dedicated: bool
Whether implementation prefers to use dedicated allocations (in other words, allocate
a whole block of memory dedicated to this resource alone). This will be false
if the
khr_get_memory_requirements2
extension is not enabled on the device.
Note: As its name says, using a dedicated allocation is an optimization and not a requirement.
Trait Implementations
sourceimpl Clone for MemoryRequirements
impl Clone for MemoryRequirements
sourcefn clone(&self) -> MemoryRequirements
fn clone(&self) -> MemoryRequirements
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 Debug for MemoryRequirements
impl Debug for MemoryRequirements
sourceimpl From<MemoryRequirements> for MemoryRequirements
impl From<MemoryRequirements> for MemoryRequirements
sourcefn from(val: MemoryRequirements) -> Self
fn from(val: MemoryRequirements) -> Self
Performs the conversion.
impl Copy for MemoryRequirements
Auto Trait Implementations
impl RefUnwindSafe for MemoryRequirements
impl Send for MemoryRequirements
impl Sync for MemoryRequirements
impl Unpin for MemoryRequirements
impl UnwindSafe for MemoryRequirements
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