Struct vulkano::memory::MemoryRequirements [−][src]
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
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
Performs the conversion.
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
Mutably borrows from an owned value. Read more
Builds a pointer to this type from a raw pointer.
Returns true if the size is suitable to store a type like this.
Returns the size of an individual element.