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

dma_copy_to_vram_start

Function dma_copy_to_vram_start 

Source
pub unsafe fn dma_copy_to_vram_start(
    _dma: &mut GpuDma,
    rect: VramRect,
    words: *const u32,
) -> bool
Expand description

dma_copy_to_vram without the completion wait: send the copy header, kick the block DMA and return, so the CPU keeps working while channel 2 feeds the GPU. Poll dma_copy_to_vram_done; abort channel 2 (psx_io::dma::abort) if it never finishes. Returns false, having touched nothing, for a transfer the DMA cannot express (see dma_copy_to_vram).

words points at the (rect.w / 2) * rect.h pixel words, as the slice of dma_copy_to_vram would.

§Safety

words must point at that many readable words, alive and unmodified until dma_copy_to_vram_done returns true or channel 2 is aborted. Until then nothing else may write GP0 or program channel 2, so no drawing, other upload or frame submission; the &mut GpuDma borrow only covers the call itself.