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

GpuPacket

Trait GpuPacket 

Source
pub unsafe trait GpuPacket {
    const WORDS: u8;
}
Expand description

A GPU packet that can be linked into an ordering table as one DMA node.

crate::frame::OtFrame::add uses it to insert a packet without a separate word count.

§Safety

The implementing type must be #[repr(C)] with 4-byte alignment and a u32 tag word as its first field, followed by at least WORDS more initialised u32s that form the packet’s GP0 payload. WORDS must not exceed crate::chain::MAX_NODE_WORDS. The type must have no interior mutability, so the payload cannot change while it is borrowed.

Required Associated Constants§

Source

const WORDS: u8

Payload words after the tag.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl GpuPacket for ClassicQuadTexturedGouraud

Source§

const WORDS: u8 = ClassicQuadTexturedGouraud::WORDS

Source§

impl GpuPacket for ClassicTriTextured

Source§

const WORDS: u8 = ClassicTriTextured::WORDS

Source§

impl GpuPacket for ClassicTriTexturedGouraud

Source§

const WORDS: u8 = ClassicTriTexturedGouraud::WORDS

Source§

impl GpuPacket for FillRect

Source§

const WORDS: u8 = FillRect::WORDS

Source§

impl GpuPacket for LineGouraud

Source§

const WORDS: u8 = LineGouraud::WORDS

Source§

impl GpuPacket for LineMono

Source§

const WORDS: u8 = LineMono::WORDS

Source§

impl GpuPacket for QuadFlat

Source§

const WORDS: u8 = QuadFlat::WORDS

Source§

impl GpuPacket for QuadGouraud

Source§

const WORDS: u8 = QuadGouraud::WORDS

Source§

impl GpuPacket for QuadGouraudBlended

Source§

const WORDS: u8 = QuadGouraudBlended::WORDS

Source§

impl GpuPacket for QuadTextured

Source§

const WORDS: u8 = QuadTextured::WORDS

Source§

impl GpuPacket for QuadTexturedGouraud

Source§

const WORDS: u8 = QuadTexturedGouraud::WORDS

Source§

impl GpuPacket for QuadTexturedMaterial

Source§

const WORDS: u8 = QuadTexturedMaterial::WORDS

Source§

impl GpuPacket for RectFlat

Source§

const WORDS: u8 = RectFlat::WORDS

Source§

impl GpuPacket for Sprite

Source§

const WORDS: u8 = Sprite::WORDS

Source§

impl GpuPacket for TriFlat

Source§

const WORDS: u8 = TriFlat::WORDS

Source§

impl GpuPacket for TriGouraud

Source§

const WORDS: u8 = TriGouraud::WORDS

Source§

impl GpuPacket for TriTextured

Source§

const WORDS: u8 = TriTextured::WORDS

Source§

impl GpuPacket for TriTexturedGouraud

Source§

const WORDS: u8 = TriTexturedGouraud::WORDS