Reality Display Processor/Commands: Difference between revisions

Make headings for each command visible (mobile fix attempt)
(Make headings for each command visible (mobile fix attempt))
Line 20:
|}
 
====<span style="display:none;">0x00 through 0x07, 0x10 through 0x23, 0x31 - No Operation ====
----
{| class="wikitable" style="text-align: center; white-space:nowrap;"
Line 41:
(TOVERIFY all of these command ids appear to behave as no-ops and take only 1 cycle to execute in testing so far, however this should be checked more extensively)
 
====<span style="display:none;">0x08 through 0x0F - Fill Triangle ====
----
{| class="wikitable" style="text-align: center; white-space:nowrap;"
Line 113:
}}
 
====<span style="display:none;">0x0C through 0x0F - Fill Shaded Triangle ====
----
After above 4 words describing a triangle, if requested by the command, these 8 words describing shading:
Line 241:
}}
 
====<span style="display:none;">0x0A, 0x0B, 0x0E, 0x0F - Fill Textured Triangle ====
----
After above 4 words describing a triangle, and optional 8 words describing shading, these 8 words describing texturing:
Line 360:
}}
 
====<span style="display:none;">0x09, 0x0B, 0x0D, 0x0F - Fill Z-Buffered Triangle ====
----
After above 4 words describing a triangle, optional 8 words describing shading, and optional 8 words describing texturing, these two words describing z-buffering:
Line 397:
}}
 
====<span style="display:none;">0x24 and 0x25 - Texture Rectangle ====
----
{| class="wikitable" style="text-align: center; white-space:nowrap;"
Line 449:
* In 1-Cycle and 2-Cycle mode using attributes such as shade color and per-pixel depth may be ill-defined. (TOVERIFY: It's either always 0 or uses the last value from previous primitives, check which)
 
====<span style="display:none;">0x26 - Sync Load ====
----
{| class="wikitable" style="text-align: center; white-space:nowrap;"
Line 470:
The stall is always 25 cycles and does not wait on any particular internal signal(s), if a Sync Load is queued when it is not needed it simply wastes the full length of time.
 
====<span style="display:none;">0x27 - Sync Pipe ====
----
{| class="wikitable" style="text-align: center; white-space:nowrap;"
Line 493:
(TOVERIFY/Speculation: Changing an attribute without a sync typically corrupts only up to at most 24 pixels of the last primitive, suggesting the RDP pixel pipeline is ~24 cycles deep. Can a tile sync account for all or at least almost all attribute changes?)
 
====<span style="display:none;">0x28 - Sync Tile ====
----
{| class="wikitable" style="text-align: center; white-space:nowrap;"
Line 514:
The stall is always 33 cycles and does not wait on any particular internal signal(s), if a Sync Tile is queued when it is not needed it simply wastes the full length of time.
 
====<span style="display:none;">0x29 - Sync Full ====
----
{| class="wikitable" style="text-align: center; white-space:nowrap;"
Line 537:
* Ensure no other commands are sent to RDP (via DP_START/DP_END) while a Sync Full is in progress, otherwise the RDP may hang.
 
====<span style="display:none;">0x2a0x2A - Set Key GB ====
----
{| class="wikitable" style="text-align: center; white-space:nowrap;"
Line 568:
Key center and scale are Color Combiner inputs, the expectation is that the Color Combiner is configured to <math>(X - \mathrm{Center}) \cdot \mathrm{Scale}</math> when chroma keying, where <math>X</math> is any color source. If not chroma keying, these may be used as general-purpose Color Combiner inputs.
 
====<span style="display:none;">0x2b0x2B - Set Key R ====
----
{| class="wikitable" style="text-align: center; white-space:nowrap;"
Line 590:
Sets Chroma Key parameters for the red color channel. See '''Set Key GB''' for discussion.
 
====<span style="display:none;">0x2c0x2C - Set Convert ====
----
{| class="wikitable" style="text-align: center; white-space:nowrap;"
Line 642:
K4 and K5 may also simply be used as additional general-purpose CC inputs.
 
====<span style="display:none;">0x2d0x2D - Set Scissor ====
----
{| class="wikitable" style="text-align: center; white-space:nowrap;"
Line 678:
* In FILL mode sometimes scissor works at the level of individual pixels while sometimes it only works at 4-pixel boundaries. (TODO understand this better, probably to do with memory alignment)
 
====<span style="display:none;">0x2e0x2E - Set Primitive Depth ====
----
{| class="wikitable" style="text-align: center; white-space:nowrap;"
Line 706:
* The dz value provided should be a power of 2 to ensure correct operation. RDP hardware uses a cheap integer log2 algorithm for computing log2(dz) that is only guaranteed to produce correct results when the input is a power of 2. Notably, the value 0xFFFF happens to work correctly.
 
====<span style="display:none;">0x2f0x2F - Set Other Modes ====
----
{| class="wikitable" style="text-align: center; white-space:nowrap;"
Line 884:
** 2-Cycle mode pipeline bug: In the second cycle of 2-cycle mode, shade alpha is read from the next pixel.
 
====<span style="display:none;">0x30 - Load TLUT ====
----
{| class="wikitable" style="text-align: center; white-space:nowrap;"
Line 916:
* For correct sampling, the base TMEM address for a TLUT must be aligned to 16 TMEM words or 128 bytes.
 
====<span style="display:none;">0x32 - Set Tile Size ====
----
{| class="wikitable" style="text-align: center; white-space:nowrap;"
Line 944:
The lower-right coordinate specifies the upper extents for clamp/mask/mirror in texture sampling.
 
====<span style="display:none;">0x33 - Load Block ====
----
{| class="wikitable" style="text-align: center; white-space:nowrap;"
Line 976:
* Load Block sets the tile size for the associated tile descriptor to (upper_left.s, upper_left.t, lower_right.s, dxt). This is generally not a useful configuration for rendering the image.
 
====<span style="display:none;">0x34 - Load Tile ====
----
{| class="wikitable" style="text-align: center; white-space:nowrap;"
Line 1,008:
* Loads that extend past the end of TMEM will wrap back to the start.
 
====<span style="display:none;">0x35 - Set Tile ====
----
{| class="wikitable" style="text-align: center; white-space:nowrap;"
Line 1,117:
|}
 
====<span style="display:none;">0x36 - Fill Rectangle ====
----
{| class="wikitable" style="text-align: center; white-space:nowrap;"
Line 1,152:
* In COPY mode, fill rectangle behaves like texture rectangle with all texture attributes (tile, s, t, dsdx, dtdy) set to 0. (TOVERIFY: as above, is it always 0 or is it left over values from previous primitives?)
 
====<span style="display:none;">0x37 - Set Fill Color ====
----
{| class="wikitable" style="text-align: center; white-space:nowrap;"
Line 1,181:
* This is an attribute-setting command that requires pipeline synchronization before use, otherwise currently rendering primitives may be partially rendered using both the old fill color and the new fill color, if it was used.
 
====<span style="display:none;">0x38 - Set Fog Color ====
----
{| class="wikitable" style="text-align: center; white-space:nowrap;"
Line 1,209:
* This is an attribute-setting command that requires pipeline synchronization before use, otherwise currently rendering primitives may be partially rendered using both the old fog color and the new fog color, if it was used.
 
====<span style="display:none;">0x39 - Set Blend Color ====
----
{| class="wikitable" style="text-align: center; white-space:nowrap;"
Line 1,237:
* This is an attribute-setting command that requires pipeline synchronization before use, otherwise currently rendering primitives may be partially rendered using both the old blend color and the new blend color, if it was used.
 
====<span style="display:none;">0x3a0x3A - Set Primitive Color ====
----
{| class="wikitable" style="text-align: center; white-space:nowrap;"
Line 1,276:
Unlike the majority of other attribute-setters, primitive color operates correctly even in the absence of pipeline synchronizations. The primitive color may be changed between primitive rendering without corrupting prior primitives.
 
====<span style="display:none;">0x3b0x3B - Set Environment Color ====
----
{| class="wikitable" style="text-align: center; white-space:nowrap;"
Line 1,304:
* This is an attribute-setting command that requires pipeline synchronization before use, otherwise currently rendering primitives may be partially rendered using both the old environment color and the new environment color, if it was used.
 
====<span style="display:none;">0x3c0x3C - Set Combine Mode ====
----
{| class="wikitable" style="text-align: center; white-space:nowrap;"
Line 1,561:
* The 1 input is valued at 256, not 255. This may contribute to overflow issues.
 
====<span style="display:none;">0x3d0x3D - Set Texture Image ====
----
{| class="wikitable" style="text-align: center; white-space:nowrap;"
Line 1,619:
* Memory alignment should be 8-byte to guarantee operation. If the address falls into the range [1,7] mod 64, the RDP may hang when loading from it.
 
====<span style="display:none;">0x3e0x3E - Set Depth Image ====
----
{| class="wikitable" style="text-align: center; white-space:nowrap;"
Line 1,643:
* Memory alignment must be 64-byte for all rendering operations to behave as expected.
 
====<span style="display:none;">0x3f0x3F - Set Color Image ====
----
{| class="wikitable" style="text-align: center; white-space:nowrap;"
56

edits