====== Parallel Draw ====== Parallel draw operates on blocks within 32-bit destination words. Away from the left and right edges it draws ''4 / sizeof(pixel)'' pixels per cycle, including source reads, unless memory bandwidth fills the Pixel Engine pipeline. ^ Opcode ^ Instruction ^ Behavior ^ | ''E0'' | ''drawp D,S2,S1'' | Single parallel draw; update XShadow and U. | | ''E1'' | ''rdrawp D,S2,S1'' | Repeated parallel draw; do not modify destination registers. | | ''E4'' | ''drawpxy D,S2,S1'' | Single resetting parallel draw. | | ''E5'' | ''rdrawpxy D,S2,S1'' | Repeated resetting parallel draw, suitable for consecutive rectangle scan lines. | Count is an unsigned 16-bit value. Count zero performs no draw and remains zero. ''drawp'' updates the destination pair as an ''addv'' only when Count is nonzero. The ''pxy'' forms restore Count and XShadow to their starting values and update the destination pair once as an ''addv''; operands are H and Y. ===== Setup ===== Use ''stepv xy'' to set X, XDirection and Y. The sign of S1 supplies XDirection. Leave the one-instruction hazard after setting Count or XShadow. * Left-to-right: XDirection = 0; source dU = 0. * Right-to-left: XDirection = 1; source dU = ''0xFFF80000''. * Clear SwapUV before setting V. Set UMask and VMask to all ones; disable UClamp and VClamp. * Patterning requires left-to-right drawing and pattern width at least ''8 / sizeof(pixel)''. FGColor and BGColor contain four 8-bit pixels, two 16-bit pixels or one 32-bit pixel in this mode. The left pixel occupies the most significant bits. See [[registers:pixel-engine:pixel_fgcolor|FGColor]] and [[pixel:pattern|patterning]]. Sources: [[https://verite.3d32.org/_media/source/v2200spec.pdf#page=12|Technical Spec, p.12]], [[https://verite.3d32.org/_media/source/v2200spec.pdf#page=13|Technical Spec, p.13]], [[https://verite.3d32.org/_media/source/v2200spec.pdf#page=35|Technical Spec, p.35]]