Reality Display Processor/Commands: Difference between revisions

Parameter names and short descriptions for Triangle commands
(Start Load Block/Tile/TLUT)
(Parameter names and short descriptions for Triangle commands)
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;"
! colspan="18"|Fill Triangle <code>0x08</code> through <code>0x0F</code>
|-
| rowspan="4"|Word 0 || 63:48 || — || — || 0 || 0 || 1 || shade || texture || zbuffer || lmajor || — || colspan=3| level[2:0] || colspan=3| tile[2:0]
|-
| 47:32 || — || — || colspan=14| y.loyl[13:0]
|-
| 31:16 || — || — || colspan=14| y.mdym[13:0]
|-
| 15:0 || — || — || colspan=14| y.hiyh[13:0]
|-
| rowspan="4"|Word 1 || 63:48 || — || — || — || — || colspan=1612| x.lo.cxl.i[1511:0]
|-
| 47:32 || colspan=16| x.lo.cxl.f[15:0]
|-
| 31:16 || — || — || colspan=1614| x.lo.sdxldy.i[1513:0]
|-
| 15:0 || colspan=16| x.lo.sdxldy.f[15:0]
|-
| rowspan="4"|Word 2 || 63:48 || — || — || — || — || colspan=1612| x.hi.cxh.i[15:0]
|-
| 47:32 || colspan=16| x.hi.cxh.f[15:0]
|-
| 31:16 || — || — || colspan=1614| x.hi.sdxhdy.i[15:0]
|-
| 15:0 || colspan=16| x.hi.sdxhdy.f[15:0]
|-
| rowspan="4"|Word 3 || 63:48 || — || — || — || — || colspan=1612| x.md.cxm.i[15:0]
|-
| 47:32 || colspan=16| x.md.cxm.f[15:0]
|-
| 31:16 || — || — || colspan=1614| x.md.sdxmdy.i[15:0]
|-
| 15:0 || colspan=16| x.md.sdxmdy.f[15:0]
|}
'''Word 0'''
{{#invoke:Register table|definitions
| 61:56 | command | 0x08 through 0x0F depending on features specified
| 58 | shade | ifIf 1, command is followed by 8 words specifying shading instructionscoefficients
| 57 | texture | ifIf 1, command is followed by 8 words specifying texturing instructionscoefficients
| 56 | zbuffer | ifIf 1, command is followed by 2 words specifying zbufferingz-buffering instructionscoefficients
| 55 | lmajor | Left-major flag, if enabled rendering occurs from left-to-right, otherwise rendering occurs from right-to-left
| 55 | lmajor | ?
| 53:51 | level[2:0] | -Maximum LOD level
| 50:48 | tile[2:0] | -Base tile descriptor index
| 45:32 | yl[13:0] | Lowest y coordinate (largest value), rasterization ends at this height (s11.2 format)
| 45:32 | y.lo[13:0] | -
| 29:16 | ym[13:0] | Middle y coordinate (middle value), rasterization swaps dxmdy for dxldy (s11.2 format)
| 29:16 | y.md[13:0] | -
| 13:0 | yh[13:0] | Highest y coordinate (highest value), rasterization begins at this height (s11.2 format)
| 13:0 | y.hi[13:0] | -
}}
'''Word 1'''
{{#invoke:Register table|definitions
| 59:48 | xl.i[11:0] | Integer part of x coordinate on dxldy line at height ym (s11.16 format)
| 63:48 | x.lo.c.i[15:0] | -
| 47:32 | x.lo.cxl.f[15:0] | -Fractional part of x coordinate on dxldy line at height ym (s11.16 format)
| 29:16 | dxldy.i[13:0] | Integer part of change in x per change in y of line connecting middle and lowest vertices (s13.16 format)
| 31:16 | x.lo.s.i[15:0] | -
| 15:0 | dxldy.f[15:0] | Fractional part of change in x per change in y of line connecting middle and lowest vertices (s13.16 format)
| 15:0 | x.lo.s.f[15:0] | -
}}
'''Word 2'''
{{#invoke:Register table|definitions
| 59:48 | xh.i[11:0] | Integer part of x coordinate on dxhdy line at height floor(yh) (s11.16 format)
| 63:48 | x.hi.c.i[15:0] | -
| 47:32 | xh.f[15:0] | Fractional part of x coordinate on dxhdy line at height floor(yh) (s11.16 format)
| 47:32 | x.hi.c.f[15:0] | -
| 29:16 | dxhdy.i[13:0] | Integer part of change in x per change in y of line connecting highest and lowest vertices (s13.16 format)
| 31:16 | x.hi.s.i[15:0] | -
| 15:0 | dxhdy.f[15:0] | Fractional part of change in x per change in y of line connecting highest and lowest vertices (s13.16 format)
| 15:0 | x.hi.s.f[15:0] | -
}}
'''Word 3'''
{{#invoke:Register table|definitions
| 59:48 | xm.i[11:0] | Integer part of x coordinate on dxmdy line at height floor(yh) (s11.16 format)
| 63:48 | x.md.c.i[15:0] | -
| 47:32 | xm.f[15:0] | Fractional part of x coordinate on dxmdy line at height floor(yh) (s11.16 format)
| 47:32 | x.md.c.f[15:0] | -
| 29:16 | dxmdy.i[13:0] | Integer part of change in x per change in y of line connecting highest and middle vertices (s13.16 format)
| 31:16 | x.md.s.i[15:0] | -
| 15:0 | dxmdy.f[15:0] | Fractional part of change in x per change in y of line connecting highest and middle vertices (s13.16 format)
| 15:0 | x.md.s.f[15:0] | -
}}
 
====<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 instructions:
 
{| class="wikitable" style="text-align: center; white-space:nowrap;"
! colspan="18"|Fill Shaded Triangle (suffix) <code>0x0C</code> … <code>0x0F</code>
|-
| rowspan="4"|Word 0 || 63:48 || - || - || - || - || - || - || - || colspan=169| r.c.i[158:0]
|-
| 47:32 || - || - || - || - || - || - || - || colspan=169| g.c.i[158:0]
|-
| 31:16 || - || - || - || - || - || - || - || colspan=169| b.c.i[158:0]
|-
| 15:0 || - || - || - || - || - || - || - || colspan=169| a.c.i[158:0]
|-
| rowspan="4"|Word 1 || 63:48 || colspan=16| r.xdrdx.i[15:0]
|-
| 47:32 || colspan=16| g.xdgdx.i[15:0]
|-
| 31:16 || colspan=16| b.xdbdx.i[15:0]
|-
| 15:0 || colspan=16| a.xdadx.i[15:0]
|-
| rowspan="4"|Word 2 || 63:48 || colspan=16| r.c.f[15:0]
|-
| 47:32 || colspan=16| g.c.f[15:0]
|-
| 31:16 || colspan=16| b.c.f[15:0]
|-
| 15:0 || colspan=16| a.c.f[15:0]
|-
| rowspan="4"|Word 3 || 63:48 || colspan=16| r.xdrdx.f[15:0]
|-
| 47:32 || colspan=16| g.xdgdx.f[15:0]
|-
| 31:16 || colspan=16| b.xdbdx.f[15:0]
|-
| 15:0 || colspan=16| a.xdadx.f[15:0]
|-
| rowspan="4"|Word 4 || 63:48 || colspan=16| r.edrde.i[15:0]
|-
| 47:32 || colspan=16| g.edgde.i[15:0]
|-
| 31:16 || colspan=16| b.edbde.i[15:0]
|-
| 15:0 || colspan=16| a.edade.i[15:0]
|-
| rowspan="4"|Word 5 || 63:48 || colspan=16| r.ydrdy.i[15:0]
|-
| 47:32 || colspan=16| g.ydgdy.i[15:0]
|-
| 31:16 || colspan=16| b.ydbdy.i[15:0]
|-
| 15:0 || colspan=16| a.ydady.i[15:0]
|-
| rowspan="4"|Word 6 || 63:48 || colspan=16| r.edrde.f[15:0]
|-
| 47:32 || colspan=16| g.edgde.f[15:0]
|-
| 31:16 || colspan=16| b.edbde.f[15:0]
|-
| 15:0 || colspan=16| a.edade.f[15:0]
|-
| rowspan="4"|Word 7 || 63:48 || colspan=16| r.ydrdy.f[15:0]
|-
| 47:32 || colspan=16| g.ydgdy.f[15:0]
|-
| 31:16 || colspan=16| b.ydbdy.f[15:0]
|-
| 15:0 || colspan=16| a.ydady.f[15:0]
|}
'''Word 0'''
{{#invoke:Register table|definitions
| 56:48 | r.i[8:0] | Integer part of red channel shade color at '''(xh, floor(yh))''' (s8.16 format)
| 63:48 | r.c.i[15:0] | -
| 40:32 | g.i[8:0] | Integer part of green channel shade color at '''(xh, floor(yh))''' (s8.16 format)
| 47:32 | g.c.i[15:0] | -
| 24:16 | b.i[8:0] | Integer part of blue channel shade color at '''(xh, floor(yh))''' (s8.16 format)
| 31:16 | b.c.i[15:0] | -
| 8:0 | a.i[8:0] | Integer part of alpha channel shade color at '''(xh, floor(yh))''' (s8.16 format)
| 15:0 | a.c.i[15:0] | -
}}
'''Word 1'''
{{#invoke:Register table|definitions
| 63:48 | drdx.i[15:0] | Integer part of change in red channel shade color horizontally along a scanline (s15.16 format)
| 63:48 | r.x.i[15:0] | -
| 47:32 | dgdx.i[15:0] | Integer part of change in green channel shade color horizontally along a scanline (s15.16 format)
| 47:32 | g.x.i[15:0] | -
| 31:16 | dbdx.i[15:0] | Integer part of change in blue channel shade color horizontally along a scanline (s15.16 format)
| 31:16 | b.x.i[15:0] | -
| 15:0 | dadx.i[15:0] | Integer part of change in alpha channel shade color horizontally along a scanline (s15.16 format)
| 15:0 | a.x.i[15:0] | -
}}
'''Word 2'''
{{#invoke:Register table|definitions
| 63:48 | r.c.f[15:0] | -Fractional part of red channel shade color at '''(xh, floor(yh))''' (s8.16 format)
| 47:32 | g.c.f[15:0] | -Fractional part of green channel shade color at '''(xh, floor(yh))''' (s8.16 format)
| 31:16 | b.c.f[15:0] | -Fractional part of blue channel shade color at '''(xh, floor(yh))''' (s8.16 format)
| 15:0 | a.f[15:0] | Fractional part of alpha channel shade color at '''(xh, floor(yh))''' (s8.16 format)
| 15:0 | a.c.f[15:0] | -
}}
'''Word 3'''
{{#invoke:Register table|definitions
| 63:48 | drdx.f[15:0] | Fractional part of change in red channel shade color horizontally along a scanline (s15.16 format)
| 63:48 | r.x.f[15:0] | -
| 47:32 | dgdx.f[15:0] | Fractional part of change in green channel shade color horizontally along a scanline (s15.16 format)
| 47:32 | g.x.f[15:0] | -
| 31:16 | dbdx.f[15:0] | Fractional part of change in blue channel shade color horizontally along a scanline (s15.16 format)
| 31:16 | b.x.f[15:0] | -
| 15:0 | dadx.f[15:0] | Fractional part of change in alpha channel shade color horizontally along a scanline (s15.16 format)
| 15:0 | a.x.f[15:0] | -
}}
'''Word 4'''
{{#invoke:Register table|definitions
| 63:48 | drde.i[15:0] | Integer part of change in red channel shade color along the major edge (s15.16 format)
| 63:48 | r.e.i[15:0] | -
| 47:32 | dgde.i[15:0] | Integer part of change in green channel shade color along the major edge (s15.16 format)
| 47:32 | g.e.i[15:0] | -
| 31:16 | dbde.i[15:0] | Integer part of change in blue channel shade color along the major edge (s15.16 format)
| 31:16 | b.e.i[15:0] | -
| 15:0 | dade.i[15:0] | Integer part of change in alpha channel shade color along the major edge (s15.16 format)
| 15:0 | a.e.i[15:0] | -
}}
'''Word 5'''
{{#invoke:Register table|definitions
| 63:48 | drdy.i[15:0] | Integer part of change in red channel shade color for each scanline (s15.16 format)
| 63:48 | r.y.i[15:0] | -
| 47:32 | dgdy.i[15:0] | Integer part of change in green channel shade color for each scanline (s15.16 format)
| 47:32 | g.y.i[15:0] | -
| 31:16 | dbdy.i[15:0] | Integer part of change in blue channel shade color for each scanline (s15.16 format)
| 31:16 | b.y.i[15:0] | -
| 15:0 | dady.i[15:0] | Integer part of change in alpha channel shade color for each scanline (s15.16 format)
| 15:0 | a.y.i[15:0] | -
}}
'''Word 6'''
{{#invoke:Register table|definitions
| 63:48 | drde.f[15:0] | Fractional part of change in red channel shade color along the major edge (s15.16 format)
| 63:48 | r.e.f[15:0] | -
| 47:32 | dgde.f[15:0] | Fractional part of change in green channel shade color along the major edge (s15.16 format)
| 47:32 | g.e.f[15:0] | -
| 31:16 | dbde.f[15:0] | Fractional part of change in blue channel shade color along the major edge (s15.16 format)
| 31:16 | b.e.f[15:0] | -
| 15:0 | dade.f[15:0] | Fractional part of change in alpha channel shade color along the major edge (s15.16 format)
| 15:0 | a.e.f[15:0] | -
}}
'''Word 7'''
{{#invoke:Register table|definitions
| 63:48 | drdy.f[15:0] | Fractional part of change in red channel shade color for each scanline (s15.16 format)
| 63:48 | r.y.f[15:0] | -
| 47:32 | dgdy.f[15:0] | Fractional part of change in green channel shade color for each scanline (s15.16 format)
| 47:32 | g.y.f[15:0] | -
| 31:16 | dbdy.f[15:0] | Fractional part of change in blue channel shade color for each scanline (s15.16 format)
| 31:16 | b.y.f[15:0] | -
| 15:0 | dady.f[15:0] | Fractional part of change in alpha channel shade color for each scanline (s15.16 format)
| 15:0 | a.y.f[15:0] | -
}}
 
====<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 instructions:
{| class="wikitable" style="text-align: center; white-space:nowrap;"
! colspan="18"|Fill Textured Triangle (A,B,E,F)
|-
| rowspan="4"|Word 0 || 63:48 || colspan=16| s.c.i[15:0]
|-
| 47:32 || colspan=16| t.c.i[15:0]
|-
| 31:16 || colspan=16| w.c.i[15:0]
|-
| 15:0 || — || — || — || — || — || — || — || — || — || — || — || — || — || — || — || —
|-
| rowspan="4"|Word 1 || 63:48 || colspan=16| s.xdsdx.i[15:0]
|-
| 47:32 || colspan=16| t.xdtdx.i[15:0]
|-
| 31:16 || colspan=16| w.xdwdx.i[15:0]
|-
| 15:0 || — || — || — || — || — || — || — || — || — || — || — || — || — || — || — || —
|-
| rowspan="4"|Word 2 || 63:48 || colspan=16| s.c.f[15:0]
|-
| 47:32 || colspan=16| t.c.f[15:0]
|-
| 31:16 || colspan=16| w.c.f[15:0]
|-
| 15:0 || — || — || — || — || — || — || — || — || — || — || — || — || — || — || — || —
|-
| rowspan="4"|Word 3 || 63:48 || colspan=16| s.xdsdx.f[15:0]
|-
| 47:32 || colspan=16| t.xdtdx.f[15:0]
|-
| 31:16 || colspan=16| w.xdwdx.f[15:0]
|-
| 15:0 || — || — || — || — || — || — || — || — || — || — || — || — || — || — || — || —
|-
| rowspan="4"|Word 4 || 63:48 || colspan=16| s.edsde.i[15:0]
|-
| 47:32 || colspan=16| t.edtde.i[15:0]
|-
| 31:16 || colspan=16| w.edwde.i[15:0]
|-
| 15:0 || — || — || — || — || — || — || — || — || — || — || — || — || — || — || — || —
|-
| rowspan="4"|Word 5 || 63:48 || colspan=16| s.ydsdy.i[15:0]
|-
| 47:32 || colspan=16| t.ydtdy.i[15:0]
|-
| 31:16 || colspan=16| w.ydwdy.i[15:0]
|-
| 15:0 || — || — || — || — || — || — || — || — || — || — || — || — || — || — || — || —
|-
| rowspan="4"|Word 6 || 63:48 || colspan=16| s.edsde.f[15:0]
|-
| 47:32 || colspan=16| t.edtde.f[15:0]
|-
| 31:16 || colspan=16| w.edwde.f[15:0]
|-
| 15:0 || — || — || — || — || — || — || — || — || — || — || — || — || — || — || — || —
|-
| rowspan="4"|Word 7 || 63:48 || colspan=16| s.ydsdy.f[15:0]
|-
| 47:32 || colspan=16| t.ydtdy.f[15:0]
|-
| 31:16 || colspan=16| w.ydwdy.f[15:0]
|-
| 15:0 || — || — || — || — || — || — || — || — || — || — || — || — || — || — || — || —
Line 313:
'''Word 0'''
{{#invoke:Register table|definitions
| 63:48 | s.c.i[15:0] | Integer part of s-axis texture coordinate at '''(xh, floor(yh))'''
| 47:32 | t.c.i[15:0] | Integer part of t-axis texture coordinate at '''(xh, floor(yh))'''
| 31:16 | w.c.i[15:0] | -Integer part of perspective scale at '''(xh, floor(yh))'''
}}
'''Word 1'''
{{#invoke:Register table|definitions
| 63:48 | s.xdsdx.i[15:0] | Integer part of change in s-axis texture coordinate horizontally along a scanline
| 47:32 | t.xdtdx.i[15:0] | Integer part of change in t-axis texture coordinate horizontally along a scanline
| 31:16 | w.xdwdx.i[15:0] | -Integer part of change in perspective scale horizontally along a scanline
}}
'''Word 2'''
{{#invoke:Register table|definitions
| 63:48 | s.c.f[15:0] | Fractional part of s-axis texture coordinate at '''(xh, floor(yh))'''
| 47:32 | t.c.f[15:0] | Fractional part of t-axis texture coordinate at '''(xh, floor(yh))'''
| 31:16 | w.c.f[15:0] | -Fractional part of perspective scale at '''(xh, floor(yh))'''
}}
'''Word 3'''
{{#invoke:Register table|definitions
| 63:48 | s.xdsdx.f[15:0] | Fractional part of change in s-axis texture coordinate horizontally along a scanline
| 47:32 | t.xdtdx.f[15:0] | Fractional part of change in t-axis texture coordinate horizontally along a scanline
| 31:16 | w.xdwdx.f[15:0] | -Fractional part of change in perspective scale horizontally along a scanline
}}
'''Word 4'''
{{#invoke:Register table|definitions
| 63:48 | s.edsde.i[15:0] | Integer part of change in s-axis texture coordinate along the major edge
| 47:32 | t.edtde.i[15:0] | Integer part of change in t-axis texture coordinate along the major edge
| 31:16 | w.edwde.i[15:0] | -Integer part of change in perspective scale along the major edge
}}
'''Word 5'''
{{#invoke:Register table|definitions
| 63:48 | s.ydsdy.i[15:0] | Integer part of change in s-axis texture coordinate for each scanline
| 47:32 | t.ydtdy.i[15:0] | Integer part of change in t-axis texture coordinate for each scanline
| 31:16 | w.ydwdy.i[15:0] | -Integer part of change in perspective scale for each scanline
}}
'''Word 6'''
{{#invoke:Register table|definitions
| 63:48 | s.edsde.f[15:0] | Fractional part of change in s-axis texture coordinate along the major edge
| 47:32 | t.edtde.f[15:0] | Fractional part of change in t-axis texture coordinate along the major edge
| 31:16 | w.edwde.f[15:0] | -Fractional part of change in perspective scale along the major edge
}}
'''Word 7'''
{{#invoke:Register table|definitions
| 63:48 | s.ydsdy.f[15:0] | Fractional part of change in s-axis texture coordinate for each scanline
| 47:32 | t.ydtdy.f[15:0] | Fractional part of change in t-axis texture coordinate for each scanline
| 31:16 | w.ydwdy.f[15:0] | -Fractional part of change in perspective scale for each scanline
}}
 
====<span style="display:none;">0x09, 0x0B, 0x0D, 0x0F - ZbufferedFill 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 Zbufferingz-buffering:
{| class="wikitable" style="text-align: center; white-space:nowrap;"
! colspan="18"| ZbufferedFill Z-Buffered Triangle (9,B,D,F)
|-
| rowspan="4"|Word 0 || 63:48 || colspan=16| dz.i[15:0]
|-
| 47:32 || colspan=16| dz.f[15:0]
|-
| 31:16 || colspan=16| xdzdx.i[15:0]
|-
| 15:0 || colspan=16| xdzdx.f[15:0]
|-
| rowspan="4"|Word 1 || 63:48 || colspan=16| edzde.i[15:0]
|-
| 47:32 || colspan=16| edzde.f[15:0]
|-
| 31:16 || colspan=16| ydzdy.i[15:0]
|-
| 15:0 || colspan=16| ydzdy.f[15:0]
|}
'''Word 0'''
{{#invoke:Register table|definitions
| 63:48 | dz.i[15:0] | -Integer part of depth at '''(xh, floor(yh))'''
| 47:32 | dz.f[15:0] | -Fractional part of depth at '''(xh, floor(yh))'''
| 31:16 | xdzdx.i[15:0] | -Integer part of change in depth horizontally along a scanline
| 15:0 | xdzdx.f[15:0] | -Fractional part of change in depth horizontally along a scanline
}}
'''Word 1'''
{{#invoke:Register table|definitions
| 63:48 | edzde.i[15:0] | -Integer part of change in depth along the major edge
| 47:32 | edzde.f[15:0] | -Fractional part of change in depth along the major edge
| 31:16 | ydzdy.i[15:0] | -Integer part of change in depth for each scanline
| 15:0 | ydzdy.f[15:0] | -Fractional part of change in depth for each scanline
}}
 
56

edits