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::waitreturns, nothing reads storage passed to an earlierSelf::submit(a timed-out transfer must be stopped, not abandoned); Self::is_busyreturnstruewhile a submitted list may still be read, because afalselets the stream start the next list at once;Self::submitreads only the linked nodes it was given.
Required Methods§
Sourcefn is_busy(&mut self) -> bool
fn is_busy(&mut self) -> bool
Whether the previous GPU DMA transfer is still reading its storage.