[−][src]Struct bedrock::resources::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
fn native_ptr(&self) -> VkDeviceMemory
[src]
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
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, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,