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

Module ot

Module ot 

Source
Expand description

Ordering Table: depth-sorted linked-list of GPU primitives.

The PS1 has no Z-buffer. Games sort primitives back-to-front (painter’s algorithm) by inserting them into an OT slot indexed by depth. Each OT slot is the head of a linked list; primitives prepend themselves so the most-recently-inserted draws first within a slot.

Once a frame’s primitives are inserted, the whole OT is shipped to GPU GP0 via DMA channel 2 in linked-list mode. The DMA walker follows the next pointers embedded in each packet’s first word until it hits 0x00FFFFFF (end of chain).

Each 32-bit OT entry (and primitive header) is:

  bits 0..=23: address of next packet (24-bit, masked into RAM)
  bits 24..=31: word count of this packet's data, at most
                `crate::chain::MAX_NODE_WORDS` (16) on silicon

An “empty OT” has every entry pointing at its predecessor, ending in 0x00FFFFFF. Submitting such an OT sends nothing to GP0. As primitives are added, their packets chain in.

Structs§

OrderingTable
Fixed-size OT. N depth slots. Typical values: 256, 1024, 4096.
Packets
Walks an OrderingTable’s chain in DMA submission order.

Constants§

TAG_SCOPED_TEXTURE_WINDOWDeprecated
A staged-tag bit that tagged-stream insertion ignores: the stream inserts keep only the word count and the slot from a staged tag.