Parameterized Draw

Parameterized draw iterates one to five pairs of parameters. DrawCtl selects the parameter assigned to each operand position. Its low nibble must differ from 0xB.

Pairs Single instruction Repeated instruction Alignment of D, S2, S1
1 draw1 / F0 rdraw1 / F1 Double-word
2 draw2 / F2 rdraw2 / F3 Quad-word
3 draw3 / F8 rdraw3 / F9 Eight-word
4 draw4 / FA rdraw4 / FB Eight-word
5 draw5 / FC rdraw5 / FD Sixteen-word

S2 contains starting parameters and S1 contains the corresponding deltas at the same offsets. DrawCtl pair fields select E1/O1 through E4/O4. The fifth pair is always G/B. A field marked * updates its register-file destination but is not used by the Pixel Engine.

Count is signed. When Count ≤ 0, no drawing occurs and Count is unchanged. For a single draw, parameter destination registers receive the corresponding addv result only if Count > 0. rdraw does not modify the register-file destinations. The RISC stalls until an rdraw completes.

Leave one instruction after setting Count and three after setting DrawCtl. Updating XShadow has no hazard before a parameterized draw. If Fill is busy, parameterized drawing waits for it to finish.

Perspective and colors

Including Q performs UQ/Q and VQ/Q division per pixel. Perspective-correct forms require at least two pairs, and step q must precede the draw. Q is one pixel ahead of the other parameters.

R, G and B must be iterated together or all omitted. Intensity I supplies a common color value. Set SwapUV before setting U or V.

Timing note

The source gives repeated-draw timing as 2 + 2 × ParamPairs + pixels cycles. It also says a single draw takes three cycles, then gives draw3 launch as eight cycles (2 + 2 × 3). These statements conflict; DRAW_TIMING retains both. They are not combined into one assumed timing rule.

Sources: Technical Spec, p.13, Technical Spec, p.14, Technical Spec, p.15