[−][src]Trait amethyst_rendy::rendy::memory::Block
Block that owns a Range
of the Memory
.
Implementor must ensure that there can't be any other blocks
with overlapping range (either through type system or safety notes for unsafe functions).
Provides access to safe memory range mapping.
Required methods
fn properties(&self) -> Properties
Get memory properties of the block.
fn memory(&self) -> &<B as Backend>::Memory
Get raw memory object.
fn range(&self) -> Range<u64>
Get memory range owned by this block.
fn map(
&'a mut self,
device: &<B as Backend>::Device,
range: Range<u64>
) -> Result<MappedRange<'a, B, MaybeCoherent>, Error>
&'a mut self,
device: &<B as Backend>::Device,
range: Range<u64>
) -> Result<MappedRange<'a, B, MaybeCoherent>, Error>
Get mapping for the buffer range. Memory writes to the region performed by device become available for the host.
fn unmap(&mut self, device: &<B as Backend>::Device)
Release memory mapping. Must be called after successful map
call.
No-op if block is not mapped.
Provided methods
Loading content...Implementors
impl<B> Block<B> for DedicatedBlock<B> where
B: Backend,
[src]
B: Backend,
fn properties(&self) -> Properties
[src]
fn memory(&self) -> &<B as Backend>::Memory
[src]
fn range(&self) -> Range<u64>
[src]
fn map(
&'a mut self,
device: &<B as Backend>::Device,
range: Range<u64>
) -> Result<MappedRange<'a, B, MaybeCoherent>, Error>
[src]
&'a mut self,
device: &<B as Backend>::Device,
range: Range<u64>
) -> Result<MappedRange<'a, B, MaybeCoherent>, Error>
fn unmap(&mut self, device: &<B as Backend>::Device)
[src]
impl<B> Block<B> for DynamicBlock<B> where
B: Backend,
[src]
B: Backend,
fn properties(&self) -> Properties
[src]
fn memory(&self) -> &<B as Backend>::Memory
[src]
fn range(&self) -> Range<u64>
[src]
fn map(
&'a mut self,
_device: &<B as Backend>::Device,
range: Range<u64>
) -> Result<MappedRange<'a, B, MaybeCoherent>, Error>
[src]
&'a mut self,
_device: &<B as Backend>::Device,
range: Range<u64>
) -> Result<MappedRange<'a, B, MaybeCoherent>, Error>
fn unmap(&mut self, _device: &<B as Backend>::Device)
[src]
impl<B> Block<B> for LinearBlock<B> where
B: Backend,
[src]
B: Backend,
fn properties(&self) -> Properties
[src]
fn memory(&self) -> &<B as Backend>::Memory
[src]
fn range(&self) -> Range<u64>
[src]
fn map(
&'a mut self,
_device: &<B as Backend>::Device,
range: Range<u64>
) -> Result<MappedRange<'a, B, MaybeCoherent>, Error>
[src]
&'a mut self,
_device: &<B as Backend>::Device,
range: Range<u64>
) -> Result<MappedRange<'a, B, MaybeCoherent>, Error>
fn unmap(&mut self, _device: &<B as Backend>::Device)
[src]
impl<B> Block<B> for MemoryBlock<B> where
B: Backend,
[src]
B: Backend,
fn properties(&self) -> Properties
[src]
fn memory(&self) -> &<B as Backend>::Memory
[src]
fn range(&self) -> Range<u64>
[src]
fn map(
&'a mut self,
device: &<B as Backend>::Device,
range: Range<u64>
) -> Result<MappedRange<'a, B, MaybeCoherent>, Error>
[src]
&'a mut self,
device: &<B as Backend>::Device,
range: Range<u64>
) -> Result<MappedRange<'a, B, MaybeCoherent>, Error>