pub struct GfxMemoryDevice<B: Backend> { /* private fields */ }
Implementations§
Trait Implementations§
Source§impl<B> MemoryDevice<<B as Backend>::Memory> for GfxMemoryDevice<B>where
B: Backend,
impl<B> MemoryDevice<<B as Backend>::Memory> for GfxMemoryDevice<B>where
B: Backend,
Source§unsafe fn allocate_memory(
&self,
size: u64,
memory_type: u32,
flags: AllocationFlags,
) -> Result<B::Memory, OutOfMemory>
unsafe fn allocate_memory( &self, size: u64, memory_type: u32, flags: AllocationFlags, ) -> Result<B::Memory, 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: B::Memory)
unsafe fn deallocate_memory(&self, memory: B::Memory)
Deallocate memory object. Read more
Source§unsafe fn map_memory(
&self,
memory: &mut B::Memory,
offset: u64,
size: u64,
) -> Result<NonNull<u8>, DeviceMapError>
unsafe fn map_memory( &self, memory: &mut B::Memory, 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 B::Memory)
unsafe fn unmap_memory(&self, memory: &mut B::Memory)
Unmap previously mapped memory region. Read more
Source§unsafe fn invalidate_memory_ranges(
&self,
ranges: &[MappedMemoryRange<'_, B::Memory>],
) -> Result<(), OutOfMemory>
unsafe fn invalidate_memory_ranges( &self, ranges: &[MappedMemoryRange<'_, B::Memory>], ) -> Result<(), OutOfMemory>
Invalidates ranges of memory mapped regions. Read more
Source§unsafe fn flush_memory_ranges(
&self,
ranges: &[MappedMemoryRange<'_, B::Memory>],
) -> Result<(), OutOfMemory>
unsafe fn flush_memory_ranges( &self, ranges: &[MappedMemoryRange<'_, B::Memory>], ) -> Result<(), OutOfMemory>
Flushes ranges of memory mapped regions. Read more
Auto Trait Implementations§
impl<B> Freeze for GfxMemoryDevice<B>
impl<B> RefUnwindSafe for GfxMemoryDevice<B>
impl<B> Send for GfxMemoryDevice<B>
impl<B> Sync for GfxMemoryDevice<B>
impl<B> Unpin for GfxMemoryDevice<B>
impl<B> UnwindSafe for GfxMemoryDevice<B>
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