GPU/Internal Registers: Difference between revisions
Steveice10 (talk | contribs) |
Steveice10 (talk | contribs) |
||
| Line 5,350: | Line 5,350: | ||
== Framebuffer registers == | == Framebuffer registers == | ||
=== GPUREG_COLOR_OPERATION === | |||
{| class="wikitable" border="1" | |||
! Bits | |||
! Description | |||
|- | |||
| 0-1 | |||
| Fragment operation mode | |||
|- | |||
| 8 | |||
| Blend mode | |||
|- | |||
| 16-23 | |||
| 0xE4 | |||
|} | |||
Fragment operation mode values: | |||
{| class="wikitable" border="1" | |||
! Value | |||
! Description | |||
|- | |||
| 0 | |||
| Default | |||
|- | |||
| 1 | |||
| Gas | |||
|- | |||
| 3 | |||
| Shadow | |||
|} | |||
Blend mode values: | |||
{| class="wikitable" border="1" | |||
! Value | |||
! Description | |||
|- | |||
| 0 | |||
| Logic op | |||
|- | |||
| 1 | |||
| Blend | |||
|} | |||
=== GPUREG_BLEND_FUNC === | |||
{| class="wikitable" border="1" | |||
! Bits | |||
! Description | |||
|- | |||
| 0-2 | |||
| RGB equation | |||
|- | |||
| 8-10 | |||
| Alpha equation | |||
|- | |||
| 16-19 | |||
| RGB source function | |||
|- | |||
| 20-23 | |||
| RGB destination function | |||
|- | |||
| 24-27 | |||
| Alpha source function | |||
|- | |||
| 28-31 | |||
| Alpha destination function | |||
|} | |||
Equation values: | |||
{| class="wikitable" border="1" | |||
! Value | |||
! Description | |||
|- | |||
| 0 | |||
| Add | |||
|- | |||
| 1 | |||
| Subtract | |||
|- | |||
| 2 | |||
| Reverse subtract | |||
|- | |||
| 3 | |||
| Minimum | |||
|- | |||
| 4 | |||
| Maximum | |||
|} | |||
Function values: | |||
{| class="wikitable" border="1" | |||
! Value | |||
! Description | |||
|- | |||
| 0 | |||
| Zero | |||
|- | |||
| 1 | |||
| One | |||
|- | |||
| 2 | |||
| Source color | |||
|- | |||
| 3 | |||
| One minus source color | |||
|- | |||
| 4 | |||
| Destination color | |||
|- | |||
| 5 | |||
| One minus destination color | |||
|- | |||
| 6 | |||
| Source alpha | |||
|- | |||
| 7 | |||
| One minus source alpha | |||
|- | |||
| 8 | |||
| Destination alpha | |||
|- | |||
| 9 | |||
| One minus destination alpha | |||
|- | |||
| 10 | |||
| Constant color | |||
|- | |||
| 11 | |||
| One minus constant color | |||
|- | |||
| 12 | |||
| Constant alpha | |||
|- | |||
| 13 | |||
| One minus constant alpha | |||
|- | |||
| 14 | |||
| Source alpha saturate | |||
|} | |||
=== GPUREG_LOGIC_OP === | |||
{| class="wikitable" border="1" | |||
! Bits | |||
! Description | |||
|- | |||
| 0-3 | |||
| Logic op | |||
|} | |||
Logic op values: | |||
{| class="wikitable" border="1" | |||
! Value | |||
! Description | |||
|- | |||
| 0 | |||
| Clear | |||
|- | |||
| 1 | |||
| AND | |||
|- | |||
| 2 | |||
| Reverse AND | |||
|- | |||
| 3 | |||
| Copy | |||
|- | |||
| 4 | |||
| Set | |||
|- | |||
| 5 | |||
| Inverted copy | |||
|- | |||
| 6 | |||
| Noop | |||
|- | |||
| 7 | |||
| Invert | |||
|- | |||
| 8 | |||
| NAND | |||
|- | |||
| 9 | |||
| OR | |||
|- | |||
| 10 | |||
| NOR | |||
|- | |||
| 11 | |||
| XOR | |||
|- | |||
| 12 | |||
| Equivalent | |||
|- | |||
| 13 | |||
| Inverted AND | |||
|- | |||
| 14 | |||
| Reverse OR | |||
|- | |||
| 15 | |||
| Inverted OR | |||
|} | |||
=== GPUREG_BLEND_COLOR === | |||
{| class="wikitable" border="1" | |||
! Bits | |||
! Description | |||
|- | |||
| 0-7 | |||
| Red | |||
|- | |||
| 8-15 | |||
| Green | |||
|- | |||
| 16-23 | |||
| Blue | |||
|- | |||
| 24-31 | |||
| Alpha | |||
|} | |||
=== GPUREG_FRAGOP_ALPHA_TEST === | |||
{| class="wikitable" border="1" | |||
! Bits | |||
! Description | |||
|- | |||
| 0 | |||
| Enabled (0 = disabled, 1 = enabled) | |||
|- | |||
| 4-6 | |||
| Function | |||
|- | |||
| 8-15 | |||
| Reference value | |||
|} | |||
Function values: | |||
{| class="wikitable" border="1" | |||
! Value | |||
! Description | |||
|- | |||
| 0 | |||
| Never | |||
|- | |||
| 1 | |||
| Always | |||
|- | |||
| 2 | |||
| Equal | |||
|- | |||
| 3 | |||
| Not equal | |||
|- | |||
| 4 | |||
| Less than | |||
|- | |||
| 5 | |||
| Less than or equal | |||
|- | |||
| 6 | |||
| Greater than | |||
|- | |||
| 7 | |||
| Greater than or equal | |||
|} | |||
=== GPUREG_STENCIL_TEST === | |||
{| class="wikitable" border="1" | |||
! Bits | |||
! Description | |||
|- | |||
| 0 | |||
| Enabled (0 = disabled, 1 = enabled) | |||
|- | |||
| 4-6 | |||
| Function | |||
|- | |||
| 8-15 | |||
| Buffer mask | |||
|- | |||
| 16-23 | |||
| Reference value | |||
|- | |||
| 24-31 | |||
| Mask | |||
|} | |||
Function values: | |||
{| class="wikitable" border="1" | |||
! Value | |||
! Description | |||
|- | |||
| 0 | |||
| Never | |||
|- | |||
| 1 | |||
| Always | |||
|- | |||
| 2 | |||
| Equal | |||
|- | |||
| 3 | |||
| Not equal | |||
|- | |||
| 4 | |||
| Less than | |||
|- | |||
| 5 | |||
| Less than or equal | |||
|- | |||
| 6 | |||
| Greater than | |||
|- | |||
| 7 | |||
| Greater than or equal | |||
|} | |||
=== GPUREG_STENCIL_OP === | |||
{| class="wikitable" border="1" | |||
! Bits | |||
! Description | |||
|- | |||
| 0-2 | |||
| Fail operation | |||
|- | |||
| 4-6 | |||
| Z-fail operation | |||
|- | |||
| 8-10 | |||
| Z-pass operation | |||
|} | |||
Operation values: | |||
{| class="wikitable" border="1" | |||
! Value | |||
! Description | |||
|- | |||
| 0 | |||
| Keep | |||
|- | |||
| 1 | |||
| Zero | |||
|- | |||
| 2 | |||
| Replace | |||
|- | |||
| 3 | |||
| Increment | |||
|- | |||
| 4 | |||
| Decrement | |||
|- | |||
| 5 | |||
| Invert | |||
|- | |||
| 6 | |||
| Increment and wrap | |||
|- | |||
| 7 | |||
| Decrement and wrap | |||
|} | |||
=== GPUREG_DEPTH_COLOR_MASK === | |||
{| class="wikitable" border="1" | |||
! Bits | |||
! Description | |||
|- | |||
| 0 | |||
| Depth test enabled (0 = disabled, 1 = enabled) | |||
|- | |||
| 4-6 | |||
| Depth function | |||
|- | |||
| 8 | |||
| Red write enabled (0 = disabled, 1 = enabled) | |||
|- | |||
| 9 | |||
| Green write enabled (0 = disabled, 1 = enabled) | |||
|- | |||
| 10 | |||
| Blue write enabled (0 = disabled, 1 = enabled) | |||
|- | |||
| 11 | |||
| Alpha write enabled (0 = disabled, 1 = enabled) | |||
|- | |||
| 12 | |||
| Depth write enabled (0 = disabled, 1 = enabled) | |||
|} | |||
Depth function values: | |||
{| class="wikitable" border="1" | |||
! Value | |||
! Description | |||
|- | |||
| 0 | |||
| Never | |||
|- | |||
| 1 | |||
| Always | |||
|- | |||
| 2 | |||
| Equal | |||
|- | |||
| 3 | |||
| Not equal | |||
|- | |||
| 4 | |||
| Less than | |||
|- | |||
| 5 | |||
| Less than or equal | |||
|- | |||
| 6 | |||
| Greater than | |||
|- | |||
| 7 | |||
| Greater than or equal | |||
|} | |||
=== GPUREG_FRAMEBUFFER_INVALIDATE === | === GPUREG_FRAMEBUFFER_INVALIDATE === | ||