Skip to main content
← PSoXide SDK guides and examples · SDK f2fec1c301f1 · All Cargo features enabled; check feature gates before use.

CommandStreamDma

Trait CommandStreamDma 

Source
pub unsafe trait CommandStreamDma {
    // Required methods
    fn is_busy(&mut self) -> bool;
    unsafe fn submit(&mut self, head: *const u32);
    fn wait(&mut self);
    fn wait_idle(&mut self);
}
Expand description

DMA operations required by an ordered stream.

The default implementation uses the SDK’s GPU channel ownership and bounded waits. Alternate implementations can test the transport without MMIO.

§Safety

OrderedCommandStream is a safe API that rewrites node storage as soon as this transport says the hardware is done with it, so an implementation must tell the truth:

  • after Self::wait returns, nothing reads storage passed to an earlier Self::submit (a timed-out transfer must be stopped, not abandoned);
  • Self::is_busy returns true while a submitted list may still be read, because a false lets the stream start the next list at once;
  • Self::submit reads only the linked nodes it was given.

Required Methods§

Source

fn is_busy(&mut self) -> bool

Whether the previous GPU DMA transfer is still reading its storage.

Source

unsafe fn submit(&mut self, head: *const u32)

Start a valid linked list after the channel becomes idle.

§Safety

head and every linked node must remain valid and immutable until wait returns. Tags must describe aligned RAM addresses and lengths.

Source

fn wait(&mut self)

Wait until the DMA engine no longer reads the submitted storage.

Source

fn wait_idle(&mut self)

Wait until previously submitted GPU drawing has finished.

Implementations on Foreign Types§

Source§

impl CommandStreamDma for GpuDma

Source§

fn is_busy(&mut self) -> bool

Source§

unsafe fn submit(&mut self, head: *const u32)

Source§

fn wait(&mut self)

Source§

fn wait_idle(&mut self)

Implementors§