Struct vulkano::memory::MemoryRequirements
source · pub struct MemoryRequirements {
pub size: usize,
pub alignment: usize,
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: usize
Number of bytes of memory required.
alignment: usize
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
True if the implementation prefers to use dedicated allocations (in other words, allocate
a whole block of memory dedicated to this resource alone). If the
khr_get_memory_requirements2
extension isn’t enabled, then this will be false.
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 moresourceimpl Debug for MemoryRequirements
impl Debug for MemoryRequirements
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 Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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> Content for T
impl<T> Content for T
sourcefn ref_from_ptr<'a>(ptr: *mut c_void, size: usize) -> Option<*mut T>
fn ref_from_ptr<'a>(ptr: *mut c_void, size: usize) -> Option<*mut T>
Builds a pointer to this type from a raw pointer.
sourcefn is_size_suitable(size: usize) -> bool
fn is_size_suitable(size: usize) -> bool
Returns true if the size is suitable to store a type like this.
sourcefn indiv_size() -> usize
fn indiv_size() -> usize
Returns the size of an individual element.