[][src]Struct nobs_vkmem::BindInfo

pub struct BindInfo { /* fields omitted */ }

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]

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_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

impl Send for BindInfo

impl Sync for BindInfo

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.