pub struct VulkanaliaMemoryDevice { /* private fields */ }
Expand description
A wrapper around Vulkan device which implements MemoryDevice
.
Implementations§
Trait Implementations§
Source§impl MemoryDevice<DeviceMemory> for VulkanaliaMemoryDevice
impl MemoryDevice<DeviceMemory> for VulkanaliaMemoryDevice
Source§unsafe fn allocate_memory(
&self,
size: u64,
memory_type: u32,
flags: AllocationFlags,
) -> Result<DeviceMemory, OutOfMemory>
unsafe fn allocate_memory( &self, size: u64, memory_type: u32, flags: AllocationFlags, ) -> Result<DeviceMemory, OutOfMemory>
Allocates new memory object from device.
This function may be expensive and even limit maximum number of memory
objects allocated.
Which is the reason for sub-allocation this crate provides. Read more
Source§unsafe fn deallocate_memory(&self, memory: DeviceMemory)
unsafe fn deallocate_memory(&self, memory: DeviceMemory)
Deallocate memory object. Read more
Source§unsafe fn map_memory(
&self,
memory: &mut DeviceMemory,
offset: u64,
size: u64,
) -> Result<NonNull<u8>, DeviceMapError>
unsafe fn map_memory( &self, memory: &mut DeviceMemory, offset: u64, size: u64, ) -> Result<NonNull<u8>, DeviceMapError>
Map region of device memory to host memory space. Read more
Source§unsafe fn unmap_memory(&self, memory: &mut DeviceMemory)
unsafe fn unmap_memory(&self, memory: &mut DeviceMemory)
Unmap previously mapped memory region. Read more
Source§unsafe fn invalidate_memory_ranges(
&self,
ranges: &[MappedMemoryRange<'_, DeviceMemory>],
) -> Result<(), OutOfMemory>
unsafe fn invalidate_memory_ranges( &self, ranges: &[MappedMemoryRange<'_, DeviceMemory>], ) -> Result<(), OutOfMemory>
Invalidates ranges of memory mapped regions. Read more
Source§unsafe fn flush_memory_ranges(
&self,
ranges: &[MappedMemoryRange<'_, DeviceMemory>],
) -> Result<(), OutOfMemory>
unsafe fn flush_memory_ranges( &self, ranges: &[MappedMemoryRange<'_, DeviceMemory>], ) -> Result<(), OutOfMemory>
Flushes ranges of memory mapped regions. Read more
Auto Trait Implementations§
impl Freeze for VulkanaliaMemoryDevice
impl RefUnwindSafe for VulkanaliaMemoryDevice
impl Send for VulkanaliaMemoryDevice
impl Sync for VulkanaliaMemoryDevice
impl Unpin for VulkanaliaMemoryDevice
impl UnwindSafe for VulkanaliaMemoryDevice
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more