[][src]Trait gfx_memory::Block

pub trait Block<B: Backend> {
    fn properties(&self) -> Properties;
fn memory(&self) -> &B::Memory;
fn segment(&self) -> Segment;
fn map<'a>(
        &'a mut self,
        device: &B::Device,
        segment: Segment
    ) -> Result<MappedRange<'a, B>, MapError>; }

Block that owns a Segment 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::Memory

Get raw memory object.

fn segment(&self) -> Segment

Get memory segment owned by this block.

fn map<'a>(
    &'a mut self,
    device: &B::Device,
    segment: Segment
) -> Result<MappedRange<'a, B>, MapError>

Get mapping for the block segment. Memory writes to the region performed by device become available for the host.

Loading content...

Implementors

impl<B: Backend> Block<B> for DedicatedBlock<B>[src]

impl<B: Backend> Block<B> for GeneralBlock<B>[src]

impl<B: Backend> Block<B> for LinearBlock<B>[src]

impl<B: Backend> Block<B> for MemoryBlock<B>[src]

Loading content...