[−][src]Struct nobs_vkmem::BindInfo
Bundles all information for the Allocator to perform a resource memory binding.
It is possible to additionally specify the size of the resource in bytes (with_size).
This size only matters, if the resource is a buffer that will be mapped into host accessible memory.
If no size is specified with the constructor the size for the memory binding will be retrieved from the buffer's vk::MemoryRequirements
,
which might include a padding at the end. If the buffer is then mapped with get_mapped the retured
Mapped will contain the buffer including padding. By specifying an explicit size this can be circumvented.
When the builders Buffer and Image are used resources will allways be submitted with their actual size.
Methods
impl BindInfo
[src]
pub fn new(handle: Handle<u64>, properties: MemoryPropertyFlags) -> Self
[src]
Create BindInfo from the specified memory properties
Arguments
*handle
- the handle that needs a memory binding
*properties
- the memory properties indicating if the resource is device local or host accessible
pub fn with_size(
handle: Handle<u64>,
size: DeviceSize,
properties: MemoryPropertyFlags
) -> Self
[src]
handle: Handle<u64>,
size: DeviceSize,
properties: MemoryPropertyFlags
) -> Self
Create BindInfo with the specified memory properties and explicit size in bytes
Arguments
*handle
- the handle that needs a memory binding
*size
- the actual size of the resource (in bytes)
*properties
- the memory properties indicating if the resource is device local or host accessible
Trait Implementations
impl Clone for BindInfo
[src]
fn clone(&self) -> BindInfo
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Copy for BindInfo
[src]
impl Debug for BindInfo
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,