[][src]Struct bedrock::resources::DeviceMemory

pub struct DeviceMemory(_);

Opaque handle to a device memory object

Methods

impl DeviceMemory[src]

Following methods are enabled with [feature = "Implements"]

pub fn allocate(device: &Device, size: usize, type_index: u32) -> Result<Self>[src]

Allocate GPU memory

Failures

On failure, this command returns

  • VK_ERROR_OUT_OF_HOST_MEMORY
  • VK_ERROR_OUT_OF_DEVICE_MEMORY
  • VK_ERROR_TOO_MANY_OBJECTS

impl DeviceMemory[src]

Following methods are enabled with [feature = "Implements"]

pub fn map(&self, range: Range<usize>) -> Result<MappedMemoryRange>[src]

Map a memory object into application address space

Failure

On failure, this command returns

  • VK_ERROR_OUT_OF_HOST_MEMORY
  • VK_ERROR_OUT_OF_DEVICE_MEMORY
  • VK_ERROR_MEMORY_MAP_FAILED

pub unsafe fn unmap(&self)[src]

Unmap a previously mapped memory object

Safety

Caller must guarantee that there is no MappedMemoryRange alives.
Accessing the mapped memory after this call has undefined behavior

pub fn commitment_bytes(&self) -> VkDeviceSize[src]

Query the current commitment for a DeviceMemory

Trait Implementations

impl DeviceChild for DeviceMemory[src]

impl VkHandle for DeviceMemory[src]

type Handle = VkDeviceMemory

Auto Trait Implementations

impl !RefUnwindSafe for DeviceMemory

impl !Send for DeviceMemory

impl !Sync for DeviceMemory

impl Unpin for DeviceMemory

impl !UnwindSafe for DeviceMemory

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.