pub struct MemoryRequirements {
    pub size: DeviceSize,
    pub alignment: DeviceSize,
    pub memory_type_bits: u32,
    pub prefers_dedicated_allocation: bool,
    pub requires_dedicated_allocation: 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.

prefers_dedicated_allocation: 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 device API version is less than 1.1 and the khr_get_memory_requirements2 extension is not enabled on the device.

requires_dedicated_allocation: bool

Whether implementation requires the use of a dedicated allocation (in other words, allocate a whole block of memory dedicated to this resource alone). This will be false if the device API version is less than 1.1 and the khr_get_memory_requirements2 extension is not enabled on the device.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.