Difference between revisions of "GPU/Internal Registers"

From 3dbrew
< GPU
Jump to navigation Jump to search
(Added register names extracted from game)
(→‎Command Header: Size field is 8-bit, not 11-bit (tested on hardware))
 
(146 intermediate revisions by 13 users not shown)
Line 1: Line 1:
[[Category:GFX]]
+
[[Category:GPU]]
(this page is hugely WIP)
 
  
 
== Overview ==
 
== Overview ==
Line 6: Line 5:
 
GPU internal registers are written to through GPU commands. They are used to control the GPU's behavior, that is to say tell it to draw stuff and how we want it drawn.
 
GPU internal registers are written to through GPU commands. They are used to control the GPU's behavior, that is to say tell it to draw stuff and how we want it drawn.
  
== Types ==
+
Each command is at least 8 bytes wide. The first word is the command parameter and the second word constitutes the command header. Optionally, more parameter words may follow (potentially including a padding word to align commands to multiples of 8 bytes).
 +
 
 +
In the simplest case, a command is exactly 8 bytes wide. You can think of such a command as writing the parameter word to an internal register (the index of which is given in the command header). The more general case where more than one parameter word is given is equivalent to multiple simple commands (one for each parameter word). If consecutive writing mode is enabled in the command header, the current command index will be incremented after each parameter write. Otherwise, the parameters will be consecutively written to the same register.
 +
 
 +
For example, the sequence "0xAAAAAAAA 0x802F011C 0xBBBBBBBB 0xCCCCCCCC" is equivalent to a call to commands 0xF011C with parameter 0xAAAAAAAA, 0xF011D with parameter 0xBBBBBBBB and 0xF011E with parameter 0xCCCCCCCC. If consecutive writing mode were disabled, the command would be equivalent to three consecutive calls to 0xF011C (once with parameter 0xAAAAAAAA, once with 0xBBBBBBBB, and finally with 0xCCCCCCCC).
 +
 
 +
Invalid GPU command parameters including NaN floats can cause the GPU to hang, which then causes the GSP module to hang as well.
 +
 
 +
The size of GPU command buffers must be 0x10-byte aligned; the lower 3 bits of the size are cleared. A common pitfall is having the finalization command (write to register 0x0010) not executed because it was the last 8 bytes of a non-0x10 byte aligned command buffer, and having the GPU hang as a result.
 +
 
 +
=== Command Header ===
 +
{| class="wikitable" border="1"
 +
!  Bit
 +
!  Description
 +
|-
 +
| 0-15
 +
| Command ID
 +
|-
 +
| 16-19
 +
| Parameter mask
 +
|-
 +
| 20-27
 +
| Number of extra parameters (may be zero)
 +
|-
 +
| 28-30
 +
| Unused
 +
|-
 +
| 31
 +
| Consecutive writing mode
 +
|}
 +
 
 +
=== Parameter masking ===
 +
 
 +
Using a value other than 0xF, parts of a word in internal GPU memory can be updated without touching the other bits of it. For example, setting bit 16 to zero indicates that the least significant byte of the parameter will not be overwritten, setting bit 17 to zero indicates that the parameter's second LSB will not be overwritten, etc. This means that for instance commands 0x00010107 and 0x00020107 refer to the same thing but write different parts of the parameter.
 +
 
 +
=== Types ===
  
 
There are three main types of registers :
 
There are three main types of registers :
* configuration registers, which directly map to various rendering properties (for example : [[#GPUREG_FACECULLING_CONFIG|GPUREG_FACECULLING_CONFIG]])
+
* configuration registers, which directly map to various rendering properties (for example: [[#GPUREG_FACECULLING_CONFIG|GPUREG_FACECULLING_CONFIG]])
* data transfer registers, which can be seen as FIFOs that let us send sequential chunks of data to the GPU, such as shader code or 1D samplers (for example : [[#GPUREG_GSH_CODETRANSFER_DATA|GPUREG_GSH_CODETRANSFER_DATA]])
+
* data transfer registers, which can be seen as FIFOs that let us send sequential chunks of data to the GPU, such as shader code or 1D samplers (for example: [[#GPUREG_SH_CODETRANSFER_DATA|GPUREG_GSH_CODETRANSFER_DATA]])
* action triggering registers, which tell the GPU to do something, like draw a primitive (for example : [[#GPUREG_DRAWARRAYS|GPUREG_DRAWARRAYS]])
+
* action triggering registers, which tell the GPU to do something, like draw a primitive (for example: [[#GPUREG_DRAWARRAYS|GPUREG_DRAWARRAYS]])
  
== Aliases ==
+
=== Aliases ===
  
It is possible for multiple register (sequential) IDs to correspond to the same register. This is done to leverage the consecutive writing mode for [[GPU Commands]], which makes it possible for a single command to write data to multiple sequential register IDs. For example, register IDs 02C1 through 02C8 all correspond to [[#GPUREG_VSH_FLOATUNIFORM_DATA|GPUREG_VSH_FLOATUNIFORM_DATA]] so that a consecutively writing command based at 02C0 will write its first parameter to [[#GPUREG_VSH_FLOATUNIFORM_CONFIG|GPUREG_VSH_FLOATUNIFORM_CONFIG]] and ever subsequent ones to [[#GPUREG_VSH_FLOATUNIFORM_DATA|GPUREG_VSH_FLOATUNIFORM_DATA]]
+
It is possible for multiple register (sequential) IDs to correspond to the same register. This is done to leverage the consecutive writing mode for GPU commands, which makes it possible for a single command to write data to multiple sequential register IDs. For example, register IDs 02C1 through 02C8 all correspond to [[#GPUREG_VSH_FLOATUNIFORM_DATAi|GPUREG_VSH_FLOATUNIFORM_DATA''i'']] so that a consecutively writing command based at 02C0 will write its first parameter to [[#GPUREG_VSH_FLOATUNIFORM_INDEX|GPUREG_VSH_FLOATUNIFORM_INDEX]] and ever subsequent ones to [[#GPUREG_VSH_FLOATUNIFORM_DATAi|GPUREG_VSH_FLOATUNIFORM_DATA''i'']]
 +
 
 +
=== Data Types ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Name
 +
! Description
 +
|-
 +
| signed
 +
| Signed integer
 +
|-
 +
| unsigned
 +
| Unsigned integer
 +
|-
 +
| floatX.Y.Z
 +
| Floating-point number with X sign bits, Y exponent bits, and Z mantissa bits
 +
|-
 +
| fixedX.Y.Z
 +
| Fixed-point number with X sign bits, Y integer bits, and Z fractional bits
 +
|}
  
 
== Register list ==
 
== Register list ==
 +
 +
=== Miscellaneous registers (0x000-0x03F) ===
  
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 108: Line 163:
 
| [[#GPUREG_FINALIZE|GPUREG_FINALIZE]]
 
| [[#GPUREG_FINALIZE|GPUREG_FINALIZE]]
 
|  
 
|  
|
+
|PICA_REG_INTERRUPT
 
|-
 
|-
 
| 0011
 
| 0011
Line 344: Line 399:
 
|  
 
|  
 
|
 
|
 +
|}
 +
 +
=== Rasterizer registers (0x040-0x07F) ===
 +
 +
{| class="wikitable" border="1"
 +
! Register ID
 +
! Register name
 +
! Notes
 +
! Official Name
 
|-
 
|-
 
| 0040
 
| 0040
Line 351: Line 415:
 
|-
 
|-
 
| 0041
 
| 0041
| [[#GPUREG_0041|GPUREG_0041]]
+
| [[#GPUREG_VIEWPORT_WIDTH|GPUREG_VIEWPORT_WIDTH]]
|?
+
|
 
|PICA_REG_VIEWPORT_WIDTH1
 
|PICA_REG_VIEWPORT_WIDTH1
 
|-
 
|-
 
| 0042
 
| 0042
| [[#GPUREG_0042|GPUREG_0042]]
+
| [[#GPUREG_VIEWPORT_INVW|GPUREG_VIEWPORT_INVW]]
|?
+
|
 
|PICA_REG_VIEWPORT_WIDTH2
 
|PICA_REG_VIEWPORT_WIDTH2
 
|-
 
|-
 
| 0043
 
| 0043
| [[#GPUREG_0043|GPUREG_0043]]
+
| [[#GPUREG_VIEWPORT_HEIGHT|GPUREG_VIEWPORT_HEIGHT]]
|?
+
|
 
|PICA_REG_VIEWPORT_HEIGHT1
 
|PICA_REG_VIEWPORT_HEIGHT1
 
|-
 
|-
 
| 0044
 
| 0044
| [[#GPUREG_0044|GPUREG_0044]]
+
| [[#GPUREG_VIEWPORT_INVH|GPUREG_VIEWPORT_INVH]]
| ?
+
|
 
|PICA_REG_VIEWPORT_HEIGHT2
 
|PICA_REG_VIEWPORT_HEIGHT2
 
|-
 
|-
Line 381: Line 445:
 
|-
 
|-
 
| 0047
 
| 0047
| [[#GPUREG_0047|GPUREG_0047]]
+
| [[#GPUREG_FRAGOP_CLIP|GPUREG_FRAGOP_CLIP]]
 
|?
 
|?
|PICA_REG_FRAG_OP_CLIP
+
|PICA_REG_FRAGOP_CLIP
 
|-
 
|-
 
| 0048
 
| 0048
| [[#GPUREG_0048|GPUREG_0048]]
+
| [[#GPUREG_FRAGOP_CLIP_DATAi|GPUREG_FRAGOP_CLIP_DATA0]]
 
|?  
 
|?  
|PICA_REG_FRAG_OP_CLIP_DATA1
+
|PICA_REG_FRAGOP_CLIP_DATA1
 
|-
 
|-
 
| 0049
 
| 0049
| [[#GPUREG_0049|GPUREG_0049]]
+
| [[#GPUREG_FRAGOP_CLIP_DATAi|GPUREG_FRAGOP_CLIP_DATA1]]
 
|?
 
|?
|PICA_REG_FRAG_OP_CLIP_DATA2
+
|PICA_REG_FRAGOP_CLIP_DATA2
 
|-
 
|-
 
| 004A
 
| 004A
| [[#GPUREG_004A|GPUREG_004A]]
+
| [[#GPUREG_FRAGOP_CLIP_DATAi|GPUREG_FRAGOP_CLIP_DATA2]]
 
|?
 
|?
|PICA_REG_FRAG_OP_CLIP_DATA3
+
|PICA_REG_FRAGOP_CLIP_DATA3
 
|-
 
|-
 
| 004B
 
| 004B
| [[#GPUREG_004B|GPUREG_004B]]
+
| [[#GPUREG_FRAGOP_CLIP_DATAi|GPUREG_FRAGOP_CLIP_DATA3]]
 
|?
 
|?
|PICA_REG_FRAG_OP_CLIP_DATA4
+
|PICA_REG_FRAGOP_CLIP_DATA4
 
|-
 
|-
 
| 004C
 
| 004C
Line 412: Line 476:
 
| 004D
 
| 004D
 
| [[#GPUREG_DEPTHMAP_SCALE|GPUREG_DEPTHMAP_SCALE]]
 
| [[#GPUREG_DEPTHMAP_SCALE|GPUREG_DEPTHMAP_SCALE]]
|  
+
| As f24
|PICA_REG_FRAG_OP_WSCALE_DATA1
+
|PICA_REG_FRAGOP_WSCALE_DATA1
 
|-
 
|-
 
| 004E
 
| 004E
 
| [[#GPUREG_DEPTHMAP_OFFSET|GPUREG_DEPTHMAP_OFFSET]]
 
| [[#GPUREG_DEPTHMAP_OFFSET|GPUREG_DEPTHMAP_OFFSET]]
|  
+
| As f24
|PICA_REG_FRAG_OP_WSCALE_DATA2
+
|PICA_REG_FRAGOP_WSCALE_DATA2
 
|-
 
|-
 
| 004F
 
| 004F
Line 426: Line 490:
 
|-
 
|-
 
| 0050
 
| 0050
| [[#GPUREG_SH_OUTMAP_O0|GPUREG_SH_OUTMAP_O0]]
+
| [[#GPUREG_SH_OUTMAP_Oi|GPUREG_SH_OUTMAP_O0]]
 
|  
 
|  
 
|PICA_REG_GS_OUT_ATTR0 / PICA_REG_VS_OUT_ATTR0
 
|PICA_REG_GS_OUT_ATTR0 / PICA_REG_VS_OUT_ATTR0
 
|-
 
|-
 
| 0051
 
| 0051
| [[#GPUREG_SH_OUTMAP_O1|GPUREG_SH_OUTMAP_O1]]
+
| [[#GPUREG_SH_OUTMAP_Oi|GPUREG_SH_OUTMAP_O1]]
 
|  
 
|  
 
|PICA_REG_GS_OUT_ATTR1 / PICA_REG_VS_OUT_ATTR1
 
|PICA_REG_GS_OUT_ATTR1 / PICA_REG_VS_OUT_ATTR1
 
|-
 
|-
 
| 0052
 
| 0052
| [[#GPUREG_SH_OUTMAP_O2|GPUREG_SH_OUTMAP_O2]]
+
| [[#GPUREG_SH_OUTMAP_Oi|GPUREG_SH_OUTMAP_O2]]
 
|  
 
|  
 
|PICA_REG_GS_OUT_ATTR2 / PICA_REG_VS_OUT_ATTR2
 
|PICA_REG_GS_OUT_ATTR2 / PICA_REG_VS_OUT_ATTR2
 
|-
 
|-
 
| 0053
 
| 0053
| [[#GPUREG_SH_OUTMAP_O3|GPUREG_SH_OUTMAP_O3]]
+
| [[#GPUREG_SH_OUTMAP_Oi|GPUREG_SH_OUTMAP_O3]]
 
|  
 
|  
 
|PICA_REG_GS_OUT_ATTR3 / PICA_REG_VS_OUT_ATTR3
 
|PICA_REG_GS_OUT_ATTR3 / PICA_REG_VS_OUT_ATTR3
 
|-
 
|-
 
| 0054
 
| 0054
| [[#GPUREG_SH_OUTMAP_O4|GPUREG_SH_OUTMAP_O4]]
+
| [[#GPUREG_SH_OUTMAP_Oi|GPUREG_SH_OUTMAP_O4]]
 
|  
 
|  
 
|PICA_REG_GS_OUT_ATTR4 / PICA_REG_VS_OUT_ATTR4
 
|PICA_REG_GS_OUT_ATTR4 / PICA_REG_VS_OUT_ATTR4
 
|-
 
|-
 
| 0055
 
| 0055
| [[#GPUREG_SH_OUTMAP_O5|GPUREG_SH_OUTMAP_O5]]
+
| [[#GPUREG_SH_OUTMAP_Oi|GPUREG_SH_OUTMAP_O5]]
 
|  
 
|  
 
|PICA_REG_GS_OUT_ATTR5 / PICA_REG_VS_OUT_ATTR5
 
|PICA_REG_GS_OUT_ATTR5 / PICA_REG_VS_OUT_ATTR5
 
|-
 
|-
 
| 0056
 
| 0056
| [[#GPUREG_SH_OUTMAP_O6|GPUREG_SH_OUTMAP_O6]]
+
| [[#GPUREG_SH_OUTMAP_Oi|GPUREG_SH_OUTMAP_O6]]
 
|  
 
|  
 
|PICA_REG_GS_OUT_ATTR6 / PICA_REG_VS_OUT_ATTR6
 
|PICA_REG_GS_OUT_ATTR6 / PICA_REG_VS_OUT_ATTR6
Line 511: Line 575:
 
|-
 
|-
 
| 0061
 
| 0061
| [[#GPUREG_0061|GPUREG_0061]]
+
| [[#GPUREG_EARLYDEPTH_FUNC|GPUREG_EARLYDEPTH_FUNC]]
 
|?
 
|?
 
|PICA_REG_EARLY_DEPTH_FUNC
 
|PICA_REG_EARLY_DEPTH_FUNC
 
|-
 
|-
 
| 0062
 
| 0062
| [[#GPUREG_0062|GPUREG_0062]]
+
| [[#GPUREG_EARLYDEPTH_TEST1|GPUREG_EARLYDEPTH_TEST1]]
 
|?
 
|?
 
|PICA_REG_EARLY_DEPTH_TEST1
 
|PICA_REG_EARLY_DEPTH_TEST1
 
|-
 
|-
 
| 0063
 
| 0063
| [[#GPUREG_0063|GPUREG_0063]]
+
| [[#GPUREG_EARLYDEPTH_CLEAR|GPUREG_EARLYDEPTH_CLEAR]]
 
|  
 
|  
|
+
|PICA_REG_EARLY_DEPTH_CLEAR
 
|-
 
|-
 
| 0064
 
| 0064
| [[#GPUREG_0064|GPUREG_0064]]
+
| [[#GPUREG_SH_OUTATTR_MODE|GPUREG_SH_OUTATTR_MODE]]
 
|?
 
|?
 
|PICA_REG_GS_OUT_ATTR_MODE / PICA_REG_VS_OUT_ATTR_MODE
 
|PICA_REG_GS_OUT_ATTR_MODE / PICA_REG_VS_OUT_ATTR_MODE
Line 546: Line 610:
 
|-
 
|-
 
| 0068
 
| 0068
| [[#GPUREG_0068|GPUREG_0068]]
+
| [[#GPUREG_VIEWPORT_XY|GPUREG_VIEWPORT_XY]]
|  
+
|
 
|PICA_REG_VIEWPORT_XY
 
|PICA_REG_VIEWPORT_XY
 
|-
 
|-
Line 556: Line 620:
 
|-
 
|-
 
| 006A
 
| 006A
| [[#GPUREG_006A|GPUREG_006A]]
+
| [[#GPUREG_EARLYDEPTH_DATA|GPUREG_EARLYDEPTH_DATA]]
 
|
 
|
 
|PICA_REG_EARLY_DEPTH_DATA
 
|PICA_REG_EARLY_DEPTH_DATA
Line 571: Line 635:
 
|-
 
|-
 
| 006D
 
| 006D
| [[#GPUREG_006D|GPUREG_006D]]
+
| [[#GPUREG_DEPTHMAP_ENABLE|GPUREG_DEPTHMAP_ENABLE]]
 
|?
 
|?
|PICA_REG_FRAG_OP_WSCALE
+
|PICA_REG_FRAGOP_WSCALE
 
|-
 
|-
 
| 006E
 
| 006E
| [[#GPUREG_006E|GPUREG_006E]]
+
| [[#GPUREG_RENDERBUF_DIM|GPUREG_RENDERBUF_DIM]]
 
|?
 
|?
 
|PICA_REG_RENDER_BUF_RESOLUTION1
 
|PICA_REG_RENDER_BUF_RESOLUTION1
 
|-
 
|-
 
| 006F
 
| 006F
| [[#GPUREG_006F|GPUREG_006F]]
+
| [[#GPUREG_SH_OUTATTR_CLOCK|GPUREG_SH_OUTATTR_CLOCK]]
 
|?
 
|?
 
|PICA_REG_GS_OUT_ATTR_CLK / PICA_REG_VS_OUT_ATTR_CLK
 
|PICA_REG_GS_OUT_ATTR_CLK / PICA_REG_VS_OUT_ATTR_CLK
Line 664: Line 728:
 
|  
 
|  
 
|
 
|
 +
|}
 +
 +
=== Texturing registers (0x080-0x0FF) ===
 +
 +
{| class="wikitable" border="1"
 +
! Register ID
 +
! Register name
 +
! Notes
 +
! Official Name
 
|-
 
|-
 
| 0080
 
| 0080
| [[#GPUREG_TEXUNITS_CONFIG|GPUREG_TEXUNITS_CONFIG]]
+
| [[#GPUREG_TEXUNIT_CONFIG|GPUREG_TEXUNIT_CONFIG]]
|  
+
|
 
|PICA_REG_TEXTURE_FUNC
 
|PICA_REG_TEXTURE_FUNC
 
|-
 
|-
 
| 0081
 
| 0081
| [[#GPUREG_0081|GPUREG_0081]]
+
| [[#GPUREG_TEXUNITi_BORDER_COLOR|GPUREG_TEXUNIT0_BORDER_COLOR]]
|?
+
|
 
|PICA_REG_TEXTURE0_BORDER_COLOR
 
|PICA_REG_TEXTURE0_BORDER_COLOR
 
|-
 
|-
 
| 0082
 
| 0082
| [[#GPUREG_TEXUNIT0_DIM|GPUREG_TEXUNIT0_DIM]]
+
| [[#GPUREG_TEXUNITi_DIM|GPUREG_TEXUNIT0_DIM]]
 
|
 
|
 
|PICA_REG_TEXTURE0_SIZE
 
|PICA_REG_TEXTURE0_SIZE
 
|-
 
|-
 
| 0083
 
| 0083
| [[#GPUREG_TEXUNIT0_PARAM|GPUREG_TEXUNIT0_PARAM]]
+
| [[#GPUREG_TEXUNITi_PARAM|GPUREG_TEXUNIT0_PARAM]]
 
|  
 
|  
 
|PICA_REG_TEXTURE0_WRAP_FILTER
 
|PICA_REG_TEXTURE0_WRAP_FILTER
 
|-
 
|-
 
| 0084
 
| 0084
| [[#GPUREG_0084|GPUREG_0084]]
+
| [[#GPUREG_TEXUNITi_LOD|GPUREG_TEXUNIT0_LOD]]
 
|?
 
|?
 
|PICA_REG_TEXTURE0_LOD
 
|PICA_REG_TEXTURE0_LOD
 
|-
 
|-
 
| 0085
 
| 0085
| [[#GPUREG_TEXUNIT0_LOC|GPUREG_TEXUNIT0_LOC]]
+
| [[#GPUREG_TEXUNITi_ADDRi|GPUREG_TEXUNIT0_ADDR1]]
 
|  
 
|  
 
|PICA_REG_TEXTURE0_ADDR1
 
|PICA_REG_TEXTURE0_ADDR1
 
|-
 
|-
 
| 0086
 
| 0086
| [[#GPUREG_0086|GPUREG_0086]]
+
| [[#GPUREG_TEXUNITi_ADDRi|GPUREG_TEXUNIT0_ADDR2]]
 
|  
 
|  
 
|PICA_REG_TEXTURE0_ADDR2
 
|PICA_REG_TEXTURE0_ADDR2
 
|-
 
|-
 
| 0087
 
| 0087
| [[#GPUREG_0087|GPUREG_0087]]
+
| [[#GPUREG_TEXUNITi_ADDRi|GPUREG_TEXUNIT0_ADDR3]]
 
|  
 
|  
 
|PICA_REG_TEXTURE0_ADDR3
 
|PICA_REG_TEXTURE0_ADDR3
 
|-
 
|-
 
| 0088
 
| 0088
| [[#GPUREG_0088|GPUREG_0088]]
+
| [[#GPUREG_TEXUNITi_ADDRi|GPUREG_TEXUNIT0_ADDR4]]
 
|  
 
|  
 
|PICA_REG_TEXTURE0_ADDR4
 
|PICA_REG_TEXTURE0_ADDR4
 
|-
 
|-
 
| 0089
 
| 0089
| [[#GPUREG_0089|GPUREG_0089]]
+
| [[#GPUREG_TEXUNITi_ADDRi|GPUREG_TEXUNIT0_ADDR5]]
 
|  
 
|  
 
|PICA_REG_TEXTURE0_ADDR5
 
|PICA_REG_TEXTURE0_ADDR5
 
|-
 
|-
 
| 008A
 
| 008A
| [[#GPUREG_008A|GPUREG_008A]]
+
| [[#GPUREG_TEXUNITi_ADDRi|GPUREG_TEXUNIT0_ADDR6]]
 
|  
 
|  
 
|PICA_REG_TEXTURE0_ADDR6
 
|PICA_REG_TEXTURE0_ADDR6
 
|-
 
|-
 
| 008B
 
| 008B
| [[#GPUREG_008B|GPUREG_008B]]
+
| [[#GPUREG_TEXUNITi_SHADOW|GPUREG_TEXUNIT0_SHADOW]]
 
|?
 
|?
 
|PICA_REG_TEXTURE0_SHADOW
 
|PICA_REG_TEXTURE0_SHADOW
Line 736: Line 809:
 
|-
 
|-
 
| 008E
 
| 008E
| [[#GPUREG_TEXUNIT0_TYPE|GPUREG_TEXUNIT0_TYPE]]
+
| [[#GPUREG_TEXUNITi_TYPE|GPUREG_TEXUNIT0_TYPE]]
 
|?
 
|?
 
|PICA_REG_TEXTURE0_FORMAT
 
|PICA_REG_TEXTURE0_FORMAT
 
|-
 
|-
 
| 008F
 
| 008F
| [[#GPUREG_008F|GPUREG_008F]]
+
| [[#GPUREG_LIGHTING_ENABLE0|GPUREG_LIGHTING_ENABLE0]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT_EN0
 
|PICA_REG_FRAG_LIGHT_EN0
Line 751: Line 824:
 
|-
 
|-
 
| 0091
 
| 0091
| [[#GPUREG_0091|GPUREG_0091]]
+
| [[#GPUREG_TEXUNITi_BORDER_COLOR|GPUREG_TEXUNIT1_BORDER_COLOR]]
|?
+
|
 
|PICA_REG_TEXTURE1_BORDER_COLOR
 
|PICA_REG_TEXTURE1_BORDER_COLOR
 
|-
 
|-
 
| 0092
 
| 0092
| [[#GPUREG_TEXUNIT1_DIM|GPUREG_TEXUNIT1_DIM]]
+
| [[#GPUREG_TEXUNITi_DIM|GPUREG_TEXUNIT1_DIM]]
 
|  
 
|  
 
|PICA_REG_TEXTURE1_SIZE
 
|PICA_REG_TEXTURE1_SIZE
 
|-
 
|-
 
| 0093
 
| 0093
| [[#GPUREG_TEXUNIT1_PARAM|GPUREG_TEXUNIT1_PARAM]]
+
| [[#GPUREG_TEXUNITi_PARAM|GPUREG_TEXUNIT1_PARAM]]
 
|  
 
|  
 
|PICA_REG_TEXTURE1_WRAP_FILTER
 
|PICA_REG_TEXTURE1_WRAP_FILTER
 
|-
 
|-
 
| 0094
 
| 0094
| [[#GPUREG_0094|GPUREG_0094]]
+
| [[#GPUREG_TEXUNITi_LOD|GPUREG_TEXUNIT1_LOD]]
 
|?
 
|?
 
|PICA_REG_TEXTURE1_LOD
 
|PICA_REG_TEXTURE1_LOD
 
|-
 
|-
 
| 0095
 
| 0095
| [[#GPUREG_TEXUNIT1_LOC|GPUREG_TEXUNIT1_LOC]]
+
| [[#GPUREG_TEXUNITi_ADDRi|GPUREG_TEXUNIT1_ADDR]]
 
|  
 
|  
 
|PICA_REG_TEXTURE1_ADDR
 
|PICA_REG_TEXTURE1_ADDR
 
|-
 
|-
 
| 0096
 
| 0096
| [[#GPUREG_TEXUNIT1_TYPE|GPUREG_TEXUNIT1_TYPE]]
+
| [[#GPUREG_TEXUNITi_TYPE|GPUREG_TEXUNIT1_TYPE]]
 
|  
 
|  
 
|PICA_REG_TEXTURE1_FORMAT
 
|PICA_REG_TEXTURE1_FORMAT
Line 791: Line 864:
 
|-
 
|-
 
| 0099
 
| 0099
| [[#GPUREG_0099|GPUREG_0099]]
+
| [[#GPUREG_TEXUNITi_BORDER_COLOR|GPUREG_TEXUNIT2_BORDER_COLOR]]
|?
+
|
 
|PICA_REG_TEXTURE2_BORDER_COLOR
 
|PICA_REG_TEXTURE2_BORDER_COLOR
 
|-
 
|-
 
| 009A
 
| 009A
| [[#GPUREG_TEXUNIT2_DIM|GPUREG_TEXUNIT2_DIM]]
+
| [[#GPUREG_TEXUNITi_DIM|GPUREG_TEXUNIT2_DIM]]
 
|  
 
|  
 
|PICA_REG_TEXTURE2_SIZE
 
|PICA_REG_TEXTURE2_SIZE
 
|-
 
|-
 
| 009B
 
| 009B
| [[#GPUREG_TEXUNIT2_PARAM|GPUREG_TEXUNIT2_PARAM]]
+
| [[#GPUREG_TEXUNITi_PARAM|GPUREG_TEXUNIT2_PARAM]]
 
|  
 
|  
 
|PICA_REG_TEXTURE2_WRAP_FILTER
 
|PICA_REG_TEXTURE2_WRAP_FILTER
 
|-
 
|-
 
| 009C
 
| 009C
| [[#GPUREG_009C|GPUREG_009C]]
+
| [[#GPUREG_TEXUNITi_LOD|GPUREG_TEXUNIT2_LOD]]
 
|?
 
|?
 
|PICA_REG_TEXTURE2_LOD
 
|PICA_REG_TEXTURE2_LOD
 
|-
 
|-
 
| 009D
 
| 009D
| [[#GPUREG_TEXUNIT2_LOC|GPUREG_TEXUNIT2_LOC]]
+
| [[#GPUREG_TEXUNITi_ADDRi|GPUREG_TEXUNIT2_ADDR]]
 
|
 
|
 
|PICA_REG_TEXTURE2_ADDR
 
|PICA_REG_TEXTURE2_ADDR
 
|-
 
|-
 
| 009E
 
| 009E
| [[#GPUREG_TEXUNIT2_TYPE|GPUREG_TEXUNIT2_TYPE]]
+
| [[#GPUREG_TEXUNITi_TYPE|GPUREG_TEXUNIT2_TYPE]]
 
|  
 
|  
 
|PICA_REG_TEXTURE2_FORMAT
 
|PICA_REG_TEXTURE2_FORMAT
Line 866: Line 939:
 
|-
 
|-
 
| 00A8
 
| 00A8
| [[#GPUREG_00A8|GPUREG_00A8]]
+
| [[#GPUREG_TEXUNIT3_PROCTEX0|GPUREG_TEXUNIT3_PROCTEX0]]
 
|?
 
|?
|PICA_REG_TEXTURE3_PROTEX0
+
|PICA_REG_TEXTURE3_PROCTEX0
 
|-
 
|-
 
| 00A9
 
| 00A9
| [[#GPUREG_00A9|GPUREG_00A9]]
+
| [[#GPUREG_TEXUNIT3_PROCTEX1|GPUREG_TEXUNIT3_PROCTEX1]]
 
|?
 
|?
|PICA_REG_TEXTURE3_PROTEX1
+
|PICA_REG_TEXTURE3_PROCTEX1
 
|-
 
|-
 
| 00AA
 
| 00AA
| [[#GPUREG_00AA|GPUREG_00AA]]
+
| [[#GPUREG_TEXUNIT3_PROCTEX2|GPUREG_TEXUNIT3_PROCTEX2]]
 
|?  
 
|?  
|PICA_REG_TEXTURE3_PROTEX2
+
|PICA_REG_TEXTURE3_PROCTEX2
 
|-
 
|-
 
| 00AB
 
| 00AB
| [[#GPUREG_00AB|GPUREG_00AB]]
+
| [[#GPUREG_TEXUNIT3_PROCTEX3|GPUREG_TEXUNIT3_PROCTEX3]]
 
|?
 
|?
|PICA_REG_TEXTURE3_PROTEX3
+
|PICA_REG_TEXTURE3_PROCTEX3
 
|-
 
|-
 
| 00AC
 
| 00AC
| [[#GPUREG_00AC|GPUREG_00AC]]
+
| [[#GPUREG_TEXUNIT3_PROCTEX4|GPUREG_TEXUNIT3_PROCTEX4]]
 
|?
 
|?
|PICA_REG_TEXTURE3_PROTEX4
+
|PICA_REG_TEXTURE3_PROCTEX4
 
|-
 
|-
 
| 00AD
 
| 00AD
| [[#GPUREG_00AD|GPUREG_00AD]]
+
| [[#GPUREG_TEXUNIT3_PROCTEX5|GPUREG_TEXUNIT3_PROCTEX5]]
 
|?
 
|?
|PICA_REG_TEXTURE3_PROTEX5
+
|PICA_REG_TEXTURE3_PROCTEX5
 
|-
 
|-
 
| 00AE
 
| 00AE
Line 901: Line 974:
 
|-
 
|-
 
| 00AF
 
| 00AF
| [[#GPUREG_00AF|GPUREG_00AF]]
+
| [[#GPUREG_PROCTEX_LUT|GPUREG_PROCTEX_LUT]]
 
|?
 
|?
|PICA_REG_PROTEX_LUT
+
|PICA_REG_PROCTEX_LUT
 
|-
 
|-
 
| 00B0
 
| 00B0
| [[#GPUREG_00B0|GPUREG_00B0]]
+
| [[#GPUREG_PROCTEX_LUT_DATAi|GPUREG_PROCTEX_LUT_DATA0]]
 
| ?
 
| ?
|PICA_REG_PROTEX_LUT_DATA0
+
|PICA_REG_PROCTEX_LUT_DATA0
 
|-
 
|-
 
| 00B1
 
| 00B1
| [[#GPUREG_00B1|GPUREG_00B1]]
+
| [[#GPUREG_PROCTEX_LUT_DATAi|GPUREG_PROCTEX_LUT_DATA1]]
 
| ?
 
| ?
|PICA_REG_PROTEX_LUT_DATA1
+
|PICA_REG_PROCTEX_LUT_DATA1
 
|-
 
|-
 
| 00B2
 
| 00B2
| [[#GPUREG_00B2|GPUREG_00B2]]
+
| [[#GPUREG_PROCTEX_LUT_DATAi|GPUREG_PROCTEX_LUT_DATA2]]
 
| ?
 
| ?
|PICA_REG_PROTEX_LUT_DATA2
+
|PICA_REG_PROCTEX_LUT_DATA2
 
|-
 
|-
 
| 00B3
 
| 00B3
| [[#GPUREG_00B3|GPUREG_00B3]]
+
| [[#GPUREG_PROCTEX_LUT_DATAi|GPUREG_PROCTEX_LUT_DATA3]]
 
| ?
 
| ?
|PICA_REG_PROTEX_LUT_DATA3
+
|PICA_REG_PROCTEX_LUT_DATA3
 
|-
 
|-
 
| 00B4
 
| 00B4
| [[#GPUREG_00B4|GPUREG_00B4]]
+
| [[#GPUREG_PROCTEX_LUT_DATAi|GPUREG_PROCTEX_LUT_DATA4]]
 
| ?
 
| ?
|PICA_REG_PROTEX_LUT_DATA4
+
|PICA_REG_PROCTEX_LUT_DATA4
 
|-
 
|-
 
| 00B5
 
| 00B5
| [[#GPUREG_00B5|GPUREG_00B5]]
+
| [[#GPUREG_PROCTEX_LUT_DATAi|GPUREG_PROCTEX_LUT_DATA5]]
 
| ?
 
| ?
|PICA_REG_PROTEX_LUT_DATA5
+
|PICA_REG_PROCTEX_LUT_DATA5
 
|-
 
|-
 
| 00B6
 
| 00B6
| [[#GPUREG_00B6|GPUREG_00B6]]
+
| [[#GPUREG_PROCTEX_LUT_DATAi|GPUREG_PROCTEX_LUT_DATA6]]
 
| ?
 
| ?
|PICA_REG_PROTEX_LUT_DATA6
+
|PICA_REG_PROCTEX_LUT_DATA6
 
|-
 
|-
 
| 00B7
 
| 00B7
| [[#GPUREG_00B7|GPUREG_00B7]]
+
| [[#GPUREG_PROCTEX_LUT_DATAi|GPUREG_PROCTEX_LUT_DATA7]]
 
| ?
 
| ?
|PICA_REG_PROTEX_LUT_DATA7
+
|PICA_REG_PROCTEX_LUT_DATA7
 
|-
 
|-
 
| 00B8
 
| 00B8
Line 986: Line 1,059:
 
|-
 
|-
 
| 00C0
 
| 00C0
| [[#GPUREG_TEXENV0_CONFIG0|GPUREG_TEXENV0_CONFIG0]]
+
| [[#GPUREG_TEXENVi_SOURCE|GPUREG_TEXENV0_SOURCE]]
 
|  
 
|  
 
|PICA_REG_TEX_ENV_0
 
|PICA_REG_TEX_ENV_0
 
|-
 
|-
 
| 00C1
 
| 00C1
| [[#GPUREG_TEXENV0_CONFIG1|GPUREG_TEXENV0_CONFIG1]]
+
| [[#GPUREG_TEXENVi_OPERAND|GPUREG_TEXENV0_OPERAND]]
 
|  
 
|  
 
|PICA_REG_TEX_ENV_0_OPERAND
 
|PICA_REG_TEX_ENV_0_OPERAND
 
|-
 
|-
 
| 00C2
 
| 00C2
| [[#GPUREG_TEXENV0_CONFIG2|GPUREG_TEXENV0_CONFIG2]]
+
| [[#GPUREG_TEXENVi_COMBINER|GPUREG_TEXENV0_COMBINER]]
 
|  
 
|  
 
|PICA_REG_TEX_ENV_0_COMBINE
 
|PICA_REG_TEX_ENV_0_COMBINE
 
|-
 
|-
 
| 00C3
 
| 00C3
| [[#GPUREG_TEXENV0_CONFIG3|GPUREG_TEXENV0_CONFIG3]]
+
| [[#GPUREG_TEXENVi_COLOR|GPUREG_TEXENV0_COLOR]]
 
|  
 
|  
 
|PICA_REG_TEX_ENV_0_COLOR
 
|PICA_REG_TEX_ENV_0_COLOR
 
|-
 
|-
 
| 00C4
 
| 00C4
| [[#GPUREG_TEXENV0_CONFIG4|GPUREG_TEXENV0_CONFIG4]]
+
| [[#GPUREG_TEXENVi_SCALE|GPUREG_TEXENV0_SCALE]]
 
|  
 
|  
 
|PICA_REG_TEX_ENV_0_SCALE
 
|PICA_REG_TEX_ENV_0_SCALE
Line 1,026: Line 1,099:
 
|-
 
|-
 
| 00C8
 
| 00C8
| [[#GPUREG_TEXENV1_CONFIG0|GPUREG_TEXENV1_CONFIG0]]
+
| [[#GPUREG_TEXENVi_SOURCE|GPUREG_TEXENV1_SOURCE]]
 
|  
 
|  
 
|PICA_REG_TEX_ENV_1
 
|PICA_REG_TEX_ENV_1
 
|-
 
|-
 
| 00C9
 
| 00C9
| [[#GPUREG_TEXENV1_CONFIG1|GPUREG_TEXENV1_CONFIG1]]
+
| [[#GPUREG_TEXENVi_OPERAND|GPUREG_TEXENV1_OPERAND]]
 
|  
 
|  
 
|PICA_REG_TEX_ENV_1_OPERAND
 
|PICA_REG_TEX_ENV_1_OPERAND
 
|-
 
|-
 
| 00CA
 
| 00CA
| [[#GPUREG_TEXENV1_CONFIG2|GPUREG_TEXENV1_CONFIG2]]
+
| [[#GPUREG_TEXENVi_COMBINER|GPUREG_TEXENV1_COMBINER]]
 
|  
 
|  
 
|PICA_REG_TEX_ENV_1_COMBINE
 
|PICA_REG_TEX_ENV_1_COMBINE
 
|-
 
|-
 
| 00CB
 
| 00CB
| [[#GPUREG_TEXENV1_CONFIG3|GPUREG_TEXENV1_CONFIG3]]
+
| [[#GPUREG_TEXENVi_COLOR|GPUREG_TEXENV1_COLOR]]
 
|  
 
|  
 
|PICA_REG_TEX_ENV_1_COLOR
 
|PICA_REG_TEX_ENV_1_COLOR
 
|-
 
|-
 
| 00CC
 
| 00CC
| [[#GPUREG_TEXENV1_CONFIG4|GPUREG_TEXENV1_CONFIG4]]
+
| [[#GPUREG_TEXENVi_SCALE|GPUREG_TEXENV1_SCALE]]
 
|  
 
|  
 
|PICA_REG_TEX_ENV_1_SCALE
 
|PICA_REG_TEX_ENV_1_SCALE
Line 1,066: Line 1,139:
 
|-
 
|-
 
| 00D0
 
| 00D0
| [[#GPUREG_TEXENV2_CONFIG0|GPUREG_TEXENV2_CONFIG0]]
+
| [[#GPUREG_TEXENVi_SOURCE|GPUREG_TEXENV2_SOURCE]]
 
|  
 
|  
 
|PICA_REG_TEX_ENV_2
 
|PICA_REG_TEX_ENV_2
 
|-
 
|-
 
| 00D1
 
| 00D1
| [[#GPUREG_TEXENV2_CONFIG1|GPUREG_TEXENV2_CONFIG1]]
+
| [[#GPUREG_TEXENVi_OPERAND|GPUREG_TEXENV2_OPERAND]]
 
|  
 
|  
 
|PICA_REG_TEX_ENV_2_OPERAND
 
|PICA_REG_TEX_ENV_2_OPERAND
 
|-
 
|-
 
| 00D2
 
| 00D2
| [[#GPUREG_TEXENV2_CONFIG2|GPUREG_TEXENV2_CONFIG2]]
+
| [[#GPUREG_TEXENVi_COMBINER|GPUREG_TEXENV2_COMBINER]]
 
|  
 
|  
 
|PICA_REG_TEX_ENV_2_COMBINE
 
|PICA_REG_TEX_ENV_2_COMBINE
 
|-
 
|-
 
| 00D3
 
| 00D3
| [[#GPUREG_TEXENV2_CONFIG3|GPUREG_TEXENV2_CONFIG3]]
+
| [[#GPUREG_TEXENVi_COLOR|GPUREG_TEXENV2_COLOR]]
 
|  
 
|  
 
|PICA_REG_TEX_ENV_2_COLOR
 
|PICA_REG_TEX_ENV_2_COLOR
 
|-
 
|-
 
| 00D4
 
| 00D4
| [[#GPUREG_TEXENV2_CONFIG4|GPUREG_TEXENV2_CONFIG4]]
+
| [[#GPUREG_TEXENVi_SCALE|GPUREG_TEXENV2_SCALE]]
 
|  
 
|  
 
|PICA_REG_TEX_ENV_2_SCALE
 
|PICA_REG_TEX_ENV_2_SCALE
Line 1,106: Line 1,179:
 
|-
 
|-
 
| 00D8
 
| 00D8
| [[#GPUREG_TEXENV3_CONFIG0|GPUREG_TEXENV3_CONFIG0]]
+
| [[#GPUREG_TEXENVi_SOURCE|GPUREG_TEXENV3_SOURCE]]
 
|  
 
|  
 
|PICA_REG_TEX_ENV_3
 
|PICA_REG_TEX_ENV_3
 
|-
 
|-
 
| 00D9
 
| 00D9
| [[#GPUREG_TEXENV3_CONFIG1|GPUREG_TEXENV3_CONFIG1]]
+
| [[#GPUREG_TEXENVi_OPERAND|GPUREG_TEXENV3_OPERAND]]
 
|  
 
|  
 
|PICA_REG_TEX_ENV_3_OPERAND
 
|PICA_REG_TEX_ENV_3_OPERAND
 
|-
 
|-
 
| 00DA
 
| 00DA
| [[#GPUREG_TEXENV3_CONFIG2|GPUREG_TEXENV3_CONFIG2]]
+
| [[#GPUREG_TEXENVi_COMBINER|GPUREG_TEXENV3_COMBINER]]
 
|  
 
|  
 
|PICA_REG_TEX_ENV_3_COMBINE
 
|PICA_REG_TEX_ENV_3_COMBINE
 
|-
 
|-
 
| 00DB
 
| 00DB
| [[#GPUREG_TEXENV3_CONFIG3|GPUREG_TEXENV3_CONFIG3]]
+
| [[#GPUREG_TEXENVi_COLOR|GPUREG_TEXENV3_COLOR]]
 
|  
 
|  
 
|PICA_REG_TEX_ENV_3_COLOR
 
|PICA_REG_TEX_ENV_3_COLOR
 
|-
 
|-
 
| 00DC
 
| 00DC
| [[#GPUREG_TEXENV3_CONFIG4|GPUREG_TEXENV3_CONFIG4]]
+
| [[#GPUREG_TEXENVi_SCALE|GPUREG_TEXENV3_SCALE]]
 
|  
 
|  
 
|PICA_REG_TEX_ENV_3_SCALE
 
|PICA_REG_TEX_ENV_3_SCALE
Line 1,146: Line 1,219:
 
|-
 
|-
 
| 00E0
 
| 00E0
| [[#GPUREG_00E0|GPUREG_00E0]]
+
| [[#GPUREG_TEXENV_UPDATE_BUFFER|GPUREG_TEXENV_UPDATE_BUFFER]]
 
|?
 
|?
 
|PICA_REG_GAS_FOG_MODE / PICA_REG_TEX_ENV_BUF_INPUT
 
|PICA_REG_GAS_FOG_MODE / PICA_REG_TEX_ENV_BUF_INPUT
 
|-
 
|-
 
| 00E1
 
| 00E1
| [[#GPUREG_00E1|GPUREG_00E1]]
+
| [[#GPUREG_FOG_COLOR|GPUREG_FOG_COLOR]]
 
|?
 
|?
 
|PICA_REG_FOG_COLOR
 
|PICA_REG_FOG_COLOR
Line 1,166: Line 1,239:
 
|-
 
|-
 
| 00E4
 
| 00E4
| [[#GPUREG_00E4|GPUREG_00E4]]
+
| [[#GPUREG_GAS_ATTENUATION|GPUREG_GAS_ATTENUATION]]
 
|?
 
|?
 
|PICA_REG_GAS_ATTENUATION
 
|PICA_REG_GAS_ATTENUATION
 
|-
 
|-
 
| 00E5
 
| 00E5
| [[#GPUREG_00E5|GPUREG_00E5]]
+
| [[#GPUREG_GAS_ACCMAX|GPUREG_GAS_ACCMAX]]
 
|?
 
|?
 
|PICA_REG_GAS_ACCMAX
 
|PICA_REG_GAS_ACCMAX
 
|-
 
|-
 
| 00E6
 
| 00E6
| [[#GPUREG_00E6|GPUREG_00E6]]
+
| [[#GPUREG_FOG_LUT_INDEX|GPUREG_FOG_LUT_INDEX]]
 
|?
 
|?
 
|PICA_REG_FOG_LUT_INDEX
 
|PICA_REG_FOG_LUT_INDEX
Line 1,186: Line 1,259:
 
|-
 
|-
 
| 00E8
 
| 00E8
| [[#GPUREG_00E8|GPUREG_00E8]]
+
| [[#GPUREG_FOG_LUT_DATAi|GPUREG_FOG_LUT_DATA0]]
 
|?
 
|?
 
|PICA_REG_FOG_LUT_DATA0
 
|PICA_REG_FOG_LUT_DATA0
 
|-
 
|-
 
| 00E9
 
| 00E9
| [[#GPUREG_00E9|GPUREG_00E9]]
+
| [[#GPUREG_FOG_LUT_DATAi|GPUREG_FOG_LUT_DATA1]]
 
|?  
 
|?  
 
|PICA_REG_FOG_LUT_DATA1
 
|PICA_REG_FOG_LUT_DATA1
 
|-
 
|-
 
| 00EA
 
| 00EA
| [[#GPUREG_00EA|GPUREG_00EA]]
+
| [[#GPUREG_FOG_LUT_DATAi|GPUREG_FOG_LUT_DATA2]]
 
|?
 
|?
 
|PICA_REG_FOG_LUT_DATA2
 
|PICA_REG_FOG_LUT_DATA2
 
|-
 
|-
 
| 00EB
 
| 00EB
| [[#GPUREG_00EB|GPUREG_00EB]]
+
| [[#GPUREG_FOG_LUT_DATAi|GPUREG_FOG_LUT_DATA3]]
 
|?
 
|?
 
|PICA_REG_FOG_LUT_DATA3
 
|PICA_REG_FOG_LUT_DATA3
 
|-
 
|-
 
| 00EC
 
| 00EC
| [[#GPUREG_00EC|GPUREG_00EC]]
+
| [[#GPUREG_FOG_LUT_DATAi|GPUREG_FOG_LUT_DATA4]]
 
|?
 
|?
 
|PICA_REG_FOG_LUT_DATA4
 
|PICA_REG_FOG_LUT_DATA4
 
|-
 
|-
 
| 00ED
 
| 00ED
| [[#GPUREG_00ED|GPUREG_00ED]]
+
| [[#GPUREG_FOG_LUT_DATAi|GPUREG_FOG_LUT_DATA5]]
 
|?
 
|?
 
|PICA_REG_FOG_LUT_DATA5
 
|PICA_REG_FOG_LUT_DATA5
 
|-
 
|-
 
| 00EE
 
| 00EE
| [[#GPUREG_00EE|GPUREG_00EE]]
+
| [[#GPUREG_FOG_LUT_DATAi|GPUREG_FOG_LUT_DATA6]]
 
|?
 
|?
 
|PICA_REG_FOG_LUT_DATA6
 
|PICA_REG_FOG_LUT_DATA6
 
|-
 
|-
 
| 00EF
 
| 00EF
| [[#GPUREG_00EF|GPUREG_00EF]]
+
| [[#GPUREG_FOG_LUT_DATAi|GPUREG_FOG_LUT_DATA7]]
 
|?
 
|?
 
|PICA_REG_FOG_LUT_DATA7
 
|PICA_REG_FOG_LUT_DATA7
 
|-
 
|-
 
| 00F0
 
| 00F0
| [[#GPUREG_TEXENV4_CONFIG0|GPUREG_TEXENV4_CONFIG0]]
+
| [[#GPUREG_TEXENVi_SOURCE|GPUREG_TEXENV4_SOURCE]]
 
|  
 
|  
 
|PICA_REG_TEX_ENV_4
 
|PICA_REG_TEX_ENV_4
 
|-
 
|-
 
| 00F1
 
| 00F1
| [[#GPUREG_TEXENV4_CONFIG1|GPUREG_TEXENV4_CONFIG1]]
+
| [[#GPUREG_TEXENVi_OPERAND|GPUREG_TEXENV4_OPERAND]]
 
|  
 
|  
 
|PICA_REG_TEX_ENV_4_OPERAND
 
|PICA_REG_TEX_ENV_4_OPERAND
 
|-
 
|-
 
| 00F2
 
| 00F2
| [[#GPUREG_TEXENV4_CONFIG2|GPUREG_TEXENV4_CONFIG2]]
+
| [[#GPUREG_TEXENVi_COMBINER|GPUREG_TEXENV4_COMBINER]]
 
|  
 
|  
 
|PICA_REG_TEX_ENV_4_COMBINE
 
|PICA_REG_TEX_ENV_4_COMBINE
 
|-
 
|-
 
| 00F3
 
| 00F3
| [[#GPUREG_TEXENV4_CONFIG3|GPUREG_TEXENV4_CONFIG3]]
+
| [[#GPUREG_TEXENVi_COLOR|GPUREG_TEXENV4_COLOR]]
 
|  
 
|  
 
|PICA_REG_TEX_ENV_4_COLOR
 
|PICA_REG_TEX_ENV_4_COLOR
 
|-
 
|-
 
| 00F4
 
| 00F4
| [[#GPUREG_TEXENV4_CONFIG4|GPUREG_TEXENV4_CONFIG4]]
+
| [[#GPUREG_TEXENVi_SCALE|GPUREG_TEXENV4_SCALE]]
 
|  
 
|  
 
|PICA_REG_TEX_ENV_4_SCALE
 
|PICA_REG_TEX_ENV_4_SCALE
Line 1,266: Line 1,339:
 
|-
 
|-
 
| 00F8
 
| 00F8
| [[#GPUREG_TEXENV5_CONFIG0|GPUREG_TEXENV5_CONFIG0]]
+
| [[#GPUREG_TEXENVi_SOURCE|GPUREG_TEXENV5_SOURCE]]
 
|  
 
|  
 
|PICA_REG_TEX_ENV_5
 
|PICA_REG_TEX_ENV_5
 
|-
 
|-
 
| 00F9
 
| 00F9
| [[#GPUREG_TEXENV5_CONFIG1|GPUREG_TEXENV5_CONFIG1]]
+
| [[#GPUREG_TEXENVi_OPERAND|GPUREG_TEXENV5_OPERAND]]
 
|  
 
|  
 
|PICA_REG_TEX_ENV_5_OPERAND
 
|PICA_REG_TEX_ENV_5_OPERAND
 
|-
 
|-
 
| 00FA
 
| 00FA
| [[#GPUREG_TEXENV5_CONFIG2|GPUREG_TEXENV5_CONFIG2]]
+
| [[#GPUREG_TEXENVi_COMBINER|GPUREG_TEXENV5_COMBINER]]
 
|  
 
|  
 
|PICA_REG_TEX_ENV_5_COMBINE
 
|PICA_REG_TEX_ENV_5_COMBINE
 
|-
 
|-
 
| 00FB
 
| 00FB
| [[#GPUREG_TEXENV5_CONFIG3|GPUREG_TEXENV5_CONFIG3]]
+
| [[#GPUREG_TEXENVi_COLOR|GPUREG_TEXENV5_COLOR]]
 
|  
 
|  
 
|PICA_REG_TEX_ENV_5_COLOR
 
|PICA_REG_TEX_ENV_5_COLOR
 
|-
 
|-
 
| 00FC
 
| 00FC
| [[#GPUREG_TEXENV5_CONFIG4|GPUREG_TEXENV5_CONFIG4]]
+
| [[#GPUREG_TEXENVi_SCALE|GPUREG_TEXENV5_SCALE]]
 
|  
 
|  
 
|PICA_REG_TEX_ENV_5_SCALE
 
|PICA_REG_TEX_ENV_5_SCALE
 
|-
 
|-
 
| 00FD
 
| 00FD
| [[#GPUREG_00FD|GPUREG_00FD]]
+
| [[#GPUREG_TEXENV_BUFFER_COLOR|GPUREG_TEXENV_BUFFER_COLOR]]
 
|?
 
|?
 
|PICA_REG_TEX_ENV_BUF_COLOR
 
|PICA_REG_TEX_ENV_BUF_COLOR
Line 1,304: Line 1,377:
 
|  
 
|  
 
|
 
|
 +
|}
 +
 +
=== Framebuffer registers (0x100-0x13F) ===
 +
 +
{| class="wikitable" border="1"
 +
! Register ID
 +
! Register name
 +
! Notes
 +
! Official Name
 
|-
 
|-
 
| 0100
 
| 0100
| [[#GPUREG_COLOROUTPUT_CONFIG|GPUREG_COLOROUTPUT_CONFIG]]
+
| [[#GPUREG_COLOR_OPERATION|GPUREG_COLOR_OPERATION]]
| ?
+
|
 
|PICA_REG_COLOR_OPERATION
 
|PICA_REG_COLOR_OPERATION
 
|-
 
|-
 
| 0101
 
| 0101
| [[#GPUREG_BLEND_CONFIG|GPUREG_BLEND_CONFIG]]
+
| [[#GPUREG_BLEND_FUNC|GPUREG_BLEND_FUNC]]
 
|  
 
|  
 
|PICA_REG_BLEND_FUNC
 
|PICA_REG_BLEND_FUNC
 
|-
 
|-
 
| 0102
 
| 0102
| [[#GPUREG_COLORLOGICOP_CONFIG|GPUREG_COLORLOGICOP_CONFIG]]
+
| [[#GPUREG_LOGIC_OP|GPUREG_LOGIC_OP]]
 
|  
 
|  
 
|PICA_REG_LOGIC_OP
 
|PICA_REG_LOGIC_OP
Line 1,326: Line 1,408:
 
|-
 
|-
 
| 0104
 
| 0104
| [[#GPUREG_ALPHATEST_CONFIG|GPUREG_ALPHATEST_CONFIG]]
+
| [[#GPUREG_FRAGOP_ALPHA_TEST|GPUREG_FRAGOP_ALPHA_TEST]]
 
|  
 
|  
|PICA_REG_FRAG_OP_ALPHA_TEST
+
|PICA_REG_FRAGOP_ALPHA_TEST
 
|-
 
|-
 
| 0105
 
| 0105
| [[#GPUREG_STENCILTEST_CONFIG|GPUREG_STENCILTEST_CONFIG]]
+
| [[#GPUREG_STENCIL_TEST|GPUREG_STENCIL_TEST]]
 
|  
 
|  
 
|PICA_REG_STENCIL_TEST
 
|PICA_REG_STENCIL_TEST
 
|-
 
|-
 
| 0106
 
| 0106
| [[#GPUREG_STENCILOP_CONFIG|GPUREG_STENCILOP_CONFIG]]
+
| [[#GPUREG_STENCIL_OP|GPUREG_STENCIL_OP]]
 
|  
 
|  
 
|PICA_REG_STENCIL_OP
 
|PICA_REG_STENCIL_OP
 
|-
 
|-
 
| 0107
 
| 0107
| [[#GPUREG_DEPTHTEST_CONFIG|GPUREG_DEPTHTEST_CONFIG]]
+
| [[#GPUREG_DEPTH_COLOR_MASK|GPUREG_DEPTH_COLOR_MASK]]
 
|  
 
|  
 
|PICA_REG_DEPTH_COLOR_MASK
 
|PICA_REG_DEPTH_COLOR_MASK
Line 1,386: Line 1,468:
 
|-
 
|-
 
| 0110
 
| 0110
| [[#GPUREG_0110|GPUREG_0110]]
+
| [[#GPUREG_FRAMEBUFFER_INVALIDATE|GPUREG_FRAMEBUFFER_INVALIDATE]]
|?
+
|
 
|PICA_REG_COLOR_BUFFER_CLEAR0
 
|PICA_REG_COLOR_BUFFER_CLEAR0
 
|-
 
|-
 
| 0111
 
| 0111
| [[#GPUREG_0111|GPUREG_0111]]
+
| [[#GPUREG_FRAMEBUFFER_FLUSH|GPUREG_FRAMEBUFFER_FLUSH]]
|?
+
|
 
|PICA_REG_COLOR_BUFFER_CLEAR1
 
|PICA_REG_COLOR_BUFFER_CLEAR1
 
|-
 
|-
Line 1,426: Line 1,508:
 
|-
 
|-
 
| 0118
 
| 0118
| [[#GPUREG_0118|GPUREG_0118]]
+
| [[#GPUREG_EARLYDEPTH_TEST2|GPUREG_EARLYDEPTH_TEST2]]
 
|?
 
|?
 
|PICA_REG_EARLY_DEPTH_TEST2
 
|PICA_REG_EARLY_DEPTH_TEST2
Line 1,441: Line 1,523:
 
|-
 
|-
 
| 011B
 
| 011B
| [[#GPUREG_011B|GPUREG_011B]]
+
| [[#GPUREG_FRAMEBUFFER_BLOCK32|GPUREG_FRAMEBUFFER_BLOCK32]]
|?
+
|
 
|PICA_REG_RENDER_BLOCK_FORMAT
 
|PICA_REG_RENDER_BLOCK_FORMAT
 
|-
 
|-
Line 1,456: Line 1,538:
 
|-
 
|-
 
| 011E
 
| 011E
| [[#GPUREG_OUTBUFFER_DIM|GPUREG_OUTBUFFER_DIM]]
+
| [[#GPUREG_FRAMEBUFFER_DIM|GPUREG_FRAMEBUFFER_DIM]]
 
|  
 
|  
 
|PICA_REG_RENDER_BUF_RESOLUTION0
 
|PICA_REG_RENDER_BUF_RESOLUTION0
Line 1,466: Line 1,548:
 
|-
 
|-
 
| 0120
 
| 0120
| [[#GPUREG_0120|GPUREG_0120]]
+
| [[#GPUREG_GAS_LIGHT_XY|GPUREG_GAS_LIGHT_XY]]
 
|?
 
|?
 
|PICA_REG_GAS_LIGHT_XY
 
|PICA_REG_GAS_LIGHT_XY
 
|-
 
|-
 
| 0121
 
| 0121
| [[#GPUREG_0121|GPUREG_0121]]
+
| [[#GPUREG_GAS_LIGHT_Z|GPUREG_GAS_LIGHT_Z]]
 
|?
 
|?
 
|PICA_REG_GAS_LIGHT_Z
 
|PICA_REG_GAS_LIGHT_Z
 
|-
 
|-
 
| 0122
 
| 0122
| [[#GPUREG_0122|GPUREG_0122]]
+
| [[#GPUREG_GAS_LIGHT_Z_COLOR|GPUREG_GAS_LIGHT_Z_COLOR]]
 
|?
 
|?
 
|PICA_REG_GAS_LIGHT_Z_COLOR
 
|PICA_REG_GAS_LIGHT_Z_COLOR
 
|-
 
|-
 
| 0123
 
| 0123
| [[#GPUREG_0123|GPUREG_0123]]
+
| [[#GPUREG_GAS_LUT_INDEX|GPUREG_GAS_LUT_INDEX]]
 
|?
 
|?
 
|PICA_REG_GAS_LUT_INDEX
 
|PICA_REG_GAS_LUT_INDEX
 
|-
 
|-
 
| 0124
 
| 0124
| [[#GPUREG_0124|GPUREG_0124]]
+
| [[#GPUREG_GAS_LUT_DATA|GPUREG_GAS_LUT_DATA]]
 
|?
 
|?
 
|PICA_REG_GAS_LUT_DATA
 
|PICA_REG_GAS_LUT_DATA
Line 1,496: Line 1,578:
 
|-
 
|-
 
| 0126
 
| 0126
| [[#GPUREG_0126|GPUREG_0126]]
+
| [[#GPUREG_GAS_DELTAZ_DEPTH|GPUREG_GAS_DELTAZ_DEPTH]]
 
|?
 
|?
 
|PICA_REG_GAS_DELTAZ_DEPTH
 
|PICA_REG_GAS_DELTAZ_DEPTH
Line 1,546: Line 1,628:
 
|-
 
|-
 
| 0130
 
| 0130
| [[#GPUREG_0130|GPUREG_0130]]
+
| [[#GPUREG_FRAGOP_SHADOW|GPUREG_FRAGOP_SHADOW]]
 
|?
 
|?
|PICA_REG_FRAG_OP_SHADOW
+
|PICA_REG_FRAGOP_SHADOW
 
|-
 
|-
 
| 0131
 
| 0131
Line 1,624: Line 1,706:
 
|  
 
|  
 
|
 
|
 +
|}
 +
 +
=== Fragment lighting registers (0x140-0x1FF) ===
 +
 +
{| class="wikitable" border="1"
 +
! Register ID
 +
! Register name
 +
! Notes
 +
! Official Name
 
|-
 
|-
 
| 0140
 
| 0140
| [[#GPUREG_0140|GPUREG_0140]]
+
| [[#GPUREG_LIGHTi_SPECULAR0|GPUREG_LIGHT0_SPECULAR0]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT0_SPECULAR0 / PICA_REG_FRAG_LIGHT_START
 
|PICA_REG_FRAG_LIGHT0_SPECULAR0 / PICA_REG_FRAG_LIGHT_START
 
|-
 
|-
 
| 0141
 
| 0141
| [[#GPUREG_0141|GPUREG_0141]]
+
| [[#GPUREG_LIGHTi_SPECULAR1|GPUREG_LIGHT0_SPECULAR1]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT0_SPECULAR1
 
|PICA_REG_FRAG_LIGHT0_SPECULAR1
 
|-
 
|-
 
| 0142
 
| 0142
| [[#GPUREG_0142|GPUREG_0142]]
+
| [[#GPUREG_LIGHTi_DIFFUSE|GPUREG_LIGHT0_DIFFUSE]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT0_DIFFUSE
 
|PICA_REG_FRAG_LIGHT0_DIFFUSE
 
|-
 
|-
 
| 0143
 
| 0143
| [[#GPUREG_0143|GPUREG_0143]]
+
| [[#GPUREG_LIGHTi_AMBIENT|GPUREG_LIGHT0_AMBIENT]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT0_AMBIENT
 
|PICA_REG_FRAG_LIGHT0_AMBIENT
 
|-
 
|-
 
| 0144
 
| 0144
| [[#GPUREG_0144|GPUREG_0144]]
+
| [[#GPUREG_LIGHTi_XY|GPUREG_LIGHT0_XY]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT0_POSITION_XY
 
|PICA_REG_FRAG_LIGHT0_POSITION_XY
 
|-
 
|-
 
| 0145
 
| 0145
| [[#GPUREG_0145|GPUREG_0145]]
+
| [[#GPUREG_LIGHTi_Z|GPUREG_LIGHT0_Z]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT0_POSITION_Z
 
|PICA_REG_FRAG_LIGHT0_POSITION_Z
 
|-
 
|-
 
| 0146
 
| 0146
| [[#GPUREG_0146|GPUREG_0146]]
+
| [[#GPUREG_LIGHTi_SPOTDIR_XY|GPUREG_LIGHT0_SPOTDIR_XY]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT0_SPOT_XY
 
|PICA_REG_FRAG_LIGHT0_SPOT_XY
 
|-
 
|-
 
| 0147
 
| 0147
| [[#GPUREG_0147|GPUREG_0147]]
+
| [[#GPUREG_LIGHTi_SPOTDIR_Z|GPUREG_LIGHT0_SPOTDIR_Z]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT0_SPOT_Z
 
|PICA_REG_FRAG_LIGHT0_SPOT_Z
Line 1,671: Line 1,762:
 
|-
 
|-
 
| 0149
 
| 0149
| [[#GPUREG_0149|GPUREG_0149]]
+
| [[#GPUREG_LIGHTi_CONFIG|GPUREG_LIGHT0_CONFIG]]
 
|  
 
|  
 
|PICA_REG_FRAG_LIGHT0_TYPE
 
|PICA_REG_FRAG_LIGHT0_TYPE
 
|-
 
|-
 
| 014A
 
| 014A
| [[#GPUREG_014A|GPUREG_014A]]
+
| [[#GPUREG_LIGHTi_ATTENUATION_BIAS|GPUREG_LIGHT0_ATTENUATION_BIAS]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT0_DIST_ATTN_BIAS
 
|PICA_REG_FRAG_LIGHT0_DIST_ATTN_BIAS
 
|-
 
|-
 
| 014B
 
| 014B
| [[#GPUREG_014B|GPUREG_014B]]
+
| [[#GPUREG_LIGHTi_ATTENUATION_SCALE|GPUREG_LIGHT0_ATTENUATION_SCALE]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT0_DIST_ATTN_SCALE
 
|PICA_REG_FRAG_LIGHT0_DIST_ATTN_SCALE
Line 1,706: Line 1,797:
 
|-
 
|-
 
| 0150
 
| 0150
| [[#GPUREG_0150|GPUREG_0150]]
+
| [[#GPUREG_LIGHTi_SPECULAR0|GPUREG_LIGHT1_SPECULAR0]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT1_SPECULAR0
 
|PICA_REG_FRAG_LIGHT1_SPECULAR0
 
|-
 
|-
 
| 0151
 
| 0151
| [[#GPUREG_0151|GPUREG_0151]]
+
| [[#GPUREG_LIGHTi_SPECULAR1|GPUREG_LIGHT1_SPECULAR1]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT1_SPECULAR1
 
|PICA_REG_FRAG_LIGHT1_SPECULAR1
 
|-
 
|-
 
| 0152
 
| 0152
| [[#GPUREG_0152|GPUREG_0152]]
+
| [[#GPUREG_LIGHTi_DIFFUSE|GPUREG_LIGHT1_DIFFUSE]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT1_DIFFUSE
 
|PICA_REG_FRAG_LIGHT1_DIFFUSE
 
|-
 
|-
 
| 0153
 
| 0153
| [[#GPUREG_0153|GPUREG_0153]]
+
| [[#GPUREG_LIGHTi_AMBIENT|GPUREG_LIGHT1_AMBIENT]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT1_AMBIENT
 
|PICA_REG_FRAG_LIGHT1_AMBIENT
 
|-
 
|-
 
| 0154
 
| 0154
| [[#GPUREG_0154|GPUREG_0154]]
+
| [[#GPUREG_LIGHTi_XY|GPUREG_LIGHT1_XY]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT1_POSITION_XY
 
|PICA_REG_FRAG_LIGHT1_POSITION_XY
 
|-
 
|-
 
| 0155
 
| 0155
| [[#GPUREG_0155|GPUREG_0155]]
+
| [[#GPUREG_LIGHTi_Z|GPUREG_LIGHT1_Z]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT1_POSITION_Z
 
|PICA_REG_FRAG_LIGHT1_POSITION_Z
 
|-
 
|-
 
| 0156
 
| 0156
| [[#GPUREG_0156|GPUREG_0156]]
+
| [[#GPUREG_LIGHTi_SPOTDIR_XY|GPUREG_LIGHT1_SPOTDIR_XY]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT1_SPOT_XY
 
|PICA_REG_FRAG_LIGHT1_SPOT_XY
 
|-
 
|-
 
| 0157
 
| 0157
| [[#GPUREG_0157|GPUREG_0157]]
+
| [[#GPUREG_LIGHTi_SPOTDIR_Z|GPUREG_LIGHT1_SPOTDIR_Z]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT1_SPOT_Z
 
|PICA_REG_FRAG_LIGHT1_SPOT_Z
Line 1,751: Line 1,842:
 
|-
 
|-
 
| 0159
 
| 0159
| [[#GPUREG_0159|GPUREG_0159]]
+
| [[#GPUREG_LIGHTi_CONFIG|GPUREG_LIGHT1_CONFIG]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT1_TYPE
 
|PICA_REG_FRAG_LIGHT1_TYPE
 
|-
 
|-
 
| 015A
 
| 015A
| [[#GPUREG_015A|GPUREG_015A]]
+
| [[#GPUREG_LIGHTi_ATTENUATION_BIAS|GPUREG_LIGHT1_ATTENUATION_BIAS]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT1_DIST_ATTN_BIAS
 
|PICA_REG_FRAG_LIGHT1_DIST_ATTN_BIAS
 
|-
 
|-
 
| 015B
 
| 015B
| [[#GPUREG_015B|GPUREG_015B]]
+
| [[#GPUREG_LIGHTi_ATTENUATION_SCALE|GPUREG_LIGHT1_ATTENUATION_SCALE]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT1_DIST_ATTN_SCALE
 
|PICA_REG_FRAG_LIGHT1_DIST_ATTN_SCALE
Line 1,786: Line 1,877:
 
|-
 
|-
 
| 0160
 
| 0160
| [[#GPUREG_0160|GPUREG_0160]]
+
| [[#GPUREG_LIGHTi_SPECULAR0|GPUREG_LIGHT2_SPECULAR0]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT2_SPECULAR0
 
|PICA_REG_FRAG_LIGHT2_SPECULAR0
 
|-
 
|-
 
| 0161
 
| 0161
| [[#GPUREG_0161|GPUREG_0161]]
+
| [[#GPUREG_LIGHTi_SPECULAR1|GPUREG_LIGHT2_SPECULAR1]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT2_SPECULAR1
 
|PICA_REG_FRAG_LIGHT2_SPECULAR1
 
|-
 
|-
 
| 0162
 
| 0162
| [[#GPUREG_0162|GPUREG_0162]]
+
| [[#GPUREG_LIGHTi_DIFFUSE|GPUREG_LIGHT2_DIFFUSE]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT2_DIFFUSE
 
|PICA_REG_FRAG_LIGHT2_DIFFUSE
 
|-
 
|-
 
| 0163
 
| 0163
| [[#GPUREG_0163|GPUREG_0163]]
+
| [[#GPUREG_LIGHTi_AMBIENT|GPUREG_LIGHT2_AMBIENT]]
 
|?
 
|?
PICA_REG_FRAG_LIGHT2_AMBIENT
+
|PICA_REG_FRAG_LIGHT2_AMBIENT
 
|-
 
|-
 
| 0164
 
| 0164
| [[#GPUREG_0164|GPUREG_0164]]
+
| [[#GPUREG_LIGHTi_XY|GPUREG_LIGHT2_XY]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT2_POSITION_XY
 
|PICA_REG_FRAG_LIGHT2_POSITION_XY
 
|-
 
|-
 
| 0165
 
| 0165
| [[#GPUREG_0165|GPUREG_0165]]
+
| [[#GPUREG_LIGHTi_Z|GPUREG_LIGHT2_Z]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT2_POSITION_Z
 
|PICA_REG_FRAG_LIGHT2_POSITION_Z
 
|-
 
|-
 
| 0166
 
| 0166
| [[#GPUREG_0166|GPUREG_0166]]
+
| [[#GPUREG_LIGHTi_SPOTDIR_XY|GPUREG_LIGHT2_SPOTDIR_XY]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT2_SPOT_XY
 
|PICA_REG_FRAG_LIGHT2_SPOT_XY
 
|-
 
|-
 
| 0167
 
| 0167
| [[#GPUREG_0167|GPUREG_0167]]
+
| [[#GPUREG_LIGHTi_SPOTDIR_Z|GPUREG_LIGHT2_SPOTDIR_Z]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT2_SPOT_Z
 
|PICA_REG_FRAG_LIGHT2_SPOT_Z
Line 1,831: Line 1,922:
 
|-
 
|-
 
| 0169
 
| 0169
| [[#GPUREG_0169|GPUREG_0169]]
+
| [[#GPUREG_LIGHTi_CONFIG|GPUREG_LIGHT2_CONFIG]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT2_TYPE
 
|PICA_REG_FRAG_LIGHT2_TYPE
 
|-
 
|-
 
| 016A
 
| 016A
| [[#GPUREG_016A|GPUREG_016A]]
+
| [[#GPUREG_LIGHTi_ATTENUATION_BIAS|GPUREG_LIGHT2_ATTENUATION_BIAS]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT2_DIST_ATTN_BIAS
 
|PICA_REG_FRAG_LIGHT2_DIST_ATTN_BIAS
 
|-
 
|-
 
| 016B
 
| 016B
| [[#GPUREG_016B|GPUREG_016B]]
+
| [[#GPUREG_LIGHTi_ATTENUATION_SCALE|GPUREG_LIGHT2_ATTENUATION_SCALE]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT2_DIST_ATTN_SCALE
 
|PICA_REG_FRAG_LIGHT2_DIST_ATTN_SCALE
Line 1,866: Line 1,957:
 
|-
 
|-
 
| 0170
 
| 0170
| [[#GPUREG_0170|GPUREG_0170]]
+
| [[#GPUREG_LIGHTi_SPECULAR0|GPUREG_LIGHT3_SPECULAR0]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT3_SPECULAR0
 
|PICA_REG_FRAG_LIGHT3_SPECULAR0
 
|-
 
|-
 
| 0171
 
| 0171
| [[#GPUREG_0171|GPUREG_0171]]
+
| [[#GPUREG_LIGHTi_SPECULAR1|GPUREG_LIGHT3_SPECULAR1]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT3_SPECULAR1
 
|PICA_REG_FRAG_LIGHT3_SPECULAR1
 
|-
 
|-
 
| 0172
 
| 0172
| [[#GPUREG_0172|GPUREG_0172]]
+
| [[#GPUREG_LIGHTi_DIFFUSE|GPUREG_LIGHT3_DIFFUSE]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT3_DIFFUSE
 
|PICA_REG_FRAG_LIGHT3_DIFFUSE
 
|-
 
|-
 
| 0173
 
| 0173
| [[#GPUREG_0173|GPUREG_0173]]
+
| [[#GPUREG_LIGHTi_AMBIENT|GPUREG_LIGHT3_AMBIENT]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT3_AMBIENT
 
|PICA_REG_FRAG_LIGHT3_AMBIENT
 
|-
 
|-
 
| 0174
 
| 0174
| [[#GPUREG_0174|GPUREG_0174]]
+
| [[#GPUREG_LIGHTi_XY|GPUREG_LIGHT3_XY]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT3_POSITION_XY
 
|PICA_REG_FRAG_LIGHT3_POSITION_XY
 
|-
 
|-
 
| 0175
 
| 0175
| [[#GPUREG_0175|GPUREG_0175]]
+
| [[#GPUREG_LIGHTi_Z|GPUREG_LIGHT3_Z]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT3_POSITION_Z
 
|PICA_REG_FRAG_LIGHT3_POSITION_Z
 
|-
 
|-
 
| 0176
 
| 0176
| [[#GPUREG_0176|GPUREG_0176]]
+
| [[#GPUREG_LIGHTi_SPOTDIR_XY|GPUREG_LIGHT3_SPOTDIR_XY]]
 
|?  
 
|?  
 
|PICA_REG_FRAG_LIGHT3_SPOT_XY
 
|PICA_REG_FRAG_LIGHT3_SPOT_XY
 
|-
 
|-
 
| 0177
 
| 0177
| [[#GPUREG_0177|GPUREG_0177]]
+
| [[#GPUREG_LIGHTi_SPOTDIR_Z|GPUREG_LIGHT3_SPOTDIR_Z]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT3_SPOT_Z
 
|PICA_REG_FRAG_LIGHT3_SPOT_Z
Line 1,911: Line 2,002:
 
|-
 
|-
 
| 0179
 
| 0179
| [[#GPUREG_0179|GPUREG_0179]]
+
| [[#GPUREG_LIGHTi_CONFIG|GPUREG_LIGHT3_CONFIG]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT3_TYPE
 
|PICA_REG_FRAG_LIGHT3_TYPE
 
|-
 
|-
 
| 017A
 
| 017A
| [[#GPUREG_017A|GPUREG_017A]]
+
| [[#GPUREG_LIGHTi_ATTENUATION_BIAS|GPUREG_LIGHT3_ATTENUATION_BIAS]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT3_DIST_ATTN_BIAS
 
|PICA_REG_FRAG_LIGHT3_DIST_ATTN_BIAS
 
|-
 
|-
 
| 017B
 
| 017B
| [[#GPUREG_017B|GPUREG_017B]]
+
| [[#GPUREG_LIGHTi_ATTENUATION_SCALE|GPUREG_LIGHT3_ATTENUATION_SCALE]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT3_DIST_ATTN_SCALE
 
|PICA_REG_FRAG_LIGHT3_DIST_ATTN_SCALE
Line 1,946: Line 2,037:
 
|-
 
|-
 
| 0180
 
| 0180
| [[#GPUREG_0180|GPUREG_0180]]
+
| [[#GPUREG_LIGHTi_SPECULAR0|GPUREG_LIGHT4_SPECULAR0]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT4_SPECULAR0
 
|PICA_REG_FRAG_LIGHT4_SPECULAR0
 
|-
 
|-
 
| 0181
 
| 0181
| [[#GPUREG_0181|GPUREG_0181]]
+
| [[#GPUREG_LIGHTi_SPECULAR1|GPUREG_LIGHT4_SPECULAR1]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT4_SPECULAR1
 
|PICA_REG_FRAG_LIGHT4_SPECULAR1
 
|-
 
|-
 
| 0182
 
| 0182
| [[#GPUREG_0182|GPUREG_0182]]
+
| [[#GPUREG_LIGHTi_DIFFUSE|GPUREG_LIGHT4_DIFFUSE]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT4_DIFFUSE
 
|PICA_REG_FRAG_LIGHT4_DIFFUSE
 
|-
 
|-
 
| 0183
 
| 0183
| [[#GPUREG_0183|GPUREG_0183]]
+
| [[#GPUREG_LIGHTi_AMBIENT|GPUREG_LIGHT4_AMBIENT]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT4_AMBIENT
 
|PICA_REG_FRAG_LIGHT4_AMBIENT
 
|-
 
|-
 
| 0184
 
| 0184
| [[#GPUREG_0184|GPUREG_0184]]
+
| [[#GPUREG_LIGHTi_XY|GPUREG_LIGHT4_XY]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT4_POSITION_XY
 
|PICA_REG_FRAG_LIGHT4_POSITION_XY
 
|-
 
|-
 
| 0185
 
| 0185
| [[#GPUREG_0185|GPUREG_0185]]
+
| [[#GPUREG_LIGHTi_Z|GPUREG_LIGHT4_Z]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT4_POSITION_Z
 
|PICA_REG_FRAG_LIGHT4_POSITION_Z
 
|-
 
|-
 
| 0186
 
| 0186
| [[#GPUREG_0186|GPUREG_0186]]
+
| [[#GPUREG_LIGHTi_SPOTDIR_XY|GPUREG_LIGHT4_SPOTDIR_XY]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT4_SPOT_XY
 
|PICA_REG_FRAG_LIGHT4_SPOT_XY
 
|-
 
|-
 
| 0187
 
| 0187
| [[#GPUREG_0187|GPUREG_0187]]
+
| [[#GPUREG_LIGHTi_SPOTDIR_Z|GPUREG_LIGHT4_SPOTDIR_Z]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT4_SPOT_Z
 
|PICA_REG_FRAG_LIGHT4_SPOT_Z
Line 1,991: Line 2,082:
 
|-
 
|-
 
| 0189
 
| 0189
| [[#GPUREG_0189|GPUREG_0189]]
+
| [[#GPUREG_LIGHTi_CONFIG|GPUREG_LIGHT4_CONFIG]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT4_TYPE
 
|PICA_REG_FRAG_LIGHT4_TYPE
 
|-
 
|-
 
| 018A
 
| 018A
| [[#GPUREG_018A|GPUREG_018A]]
+
| [[#GPUREG_LIGHTi_ATTENUATION_BIAS|GPUREG_LIGHT4_ATTENUATION_BIAS]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT4_DIST_ATTN_BIAS
 
|PICA_REG_FRAG_LIGHT4_DIST_ATTN_BIAS
 
|-
 
|-
 
| 018B
 
| 018B
| [[#GPUREG_018B|GPUREG_018B]]
+
| [[#GPUREG_LIGHTi_ATTENUATION_SCALE|GPUREG_LIGHT4_ATTENUATION_SCALE]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT4_DIST_ATTN_SCALE
 
|PICA_REG_FRAG_LIGHT4_DIST_ATTN_SCALE
Line 2,026: Line 2,117:
 
|-
 
|-
 
| 0190
 
| 0190
| [[#GPUREG_0190|GPUREG_0190]]
+
| [[#GPUREG_LIGHTi_SPECULAR0|GPUREG_LIGHT5_SPECULAR0]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT5_SPECULAR0
 
|PICA_REG_FRAG_LIGHT5_SPECULAR0
 
|-
 
|-
 
| 0191
 
| 0191
| [[#GPUREG_0191|GPUREG_0191]]
+
| [[#GPUREG_LIGHTi_SPECULAR1|GPUREG_LIGHT5_SPECULAR1]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT5_SPECULAR1
 
|PICA_REG_FRAG_LIGHT5_SPECULAR1
 
|-
 
|-
 
| 0192
 
| 0192
| [[#GPUREG_0192|GPUREG_0192]]
+
| [[#GPUREG_LIGHTi_DIFFUSE|GPUREG_LIGHT5_DIFFUSE]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT5_DIFFUSE
 
|PICA_REG_FRAG_LIGHT5_DIFFUSE
 
|-
 
|-
 
| 0193
 
| 0193
| [[#GPUREG_0193|GPUREG_0193]]
+
| [[#GPUREG_LIGHTi_AMBIENT|GPUREG_LIGHT5_AMBIENT]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT5_AMBIENT
 
|PICA_REG_FRAG_LIGHT5_AMBIENT
 
|-
 
|-
 
| 0194
 
| 0194
| [[#GPUREG_0194|GPUREG_0194]]
+
| [[#GPUREG_LIGHTi_XY|GPUREG_LIGHT5_XY]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT5_POSITION_XY
 
|PICA_REG_FRAG_LIGHT5_POSITION_XY
 
|-
 
|-
 
| 0195
 
| 0195
| [[#GPUREG_0195|GPUREG_0195]]
+
| [[#GPUREG_LIGHTi_Z|GPUREG_LIGHT5_Z]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT5_POSITION_Z
 
|PICA_REG_FRAG_LIGHT5_POSITION_Z
 
|-
 
|-
 
| 0196
 
| 0196
| [[#GPUREG_0196|GPUREG_0196]]
+
| [[#GPUREG_LIGHTi_SPOTDIR_XY|GPUREG_LIGHT5_SPOTDIR_XY]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT5_SPOT_XY
 
|PICA_REG_FRAG_LIGHT5_SPOT_XY
 
|-
 
|-
 
| 0197
 
| 0197
| [[#GPUREG_0197|GPUREG_0197]]
+
| [[#GPUREG_LIGHTi_SPOTDIR_Z|GPUREG_LIGHT5_SPOTDIR_Z]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT5_SPOT_Z
 
|PICA_REG_FRAG_LIGHT5_SPOT_Z
Line 2,071: Line 2,162:
 
|-
 
|-
 
| 0199
 
| 0199
| [[#GPUREG_0199|GPUREG_0199]]
+
| [[#GPUREG_LIGHTi_CONFIG|GPUREG_LIGHT5_CONFIG]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT5_TYPE
 
|PICA_REG_FRAG_LIGHT5_TYPE
 
|-
 
|-
 
| 019A
 
| 019A
| [[#GPUREG_019A|GPUREG_019A]]
+
| [[#GPUREG_LIGHTi_ATTENUATION_BIAS|GPUREG_LIGHT5_ATTENUATION_BIAS]]
 
|  
 
|  
|
+
|PICA_REG_FRAG_LIGHT5_DIST_ATTN_BIAS
 
|-
 
|-
 
| 019B
 
| 019B
| [[#GPUREG_019B|GPUREG_019B]]
+
| [[#GPUREG_LIGHTi_ATTENUATION_SCALE|GPUREG_LIGHT5_ATTENUATION_SCALE]]
 
|  
 
|  
|
+
|PICA_REG_FRAG_LIGHT5_DIST_ATTN_SCALE
 
|-
 
|-
 
| 019C
 
| 019C
Line 2,106: Line 2,197:
 
|-
 
|-
 
| 01A0
 
| 01A0
| [[#GPUREG_01A0|GPUREG_01A0]]
+
| [[#GPUREG_LIGHTi_SPECULAR0|GPUREG_LIGHT6_SPECULAR0]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT6_SPECULAR0
 
|PICA_REG_FRAG_LIGHT6_SPECULAR0
 
|-
 
|-
 
| 01A1
 
| 01A1
| [[#GPUREG_01A1|GPUREG_01A1]]
+
| [[#GPUREG_LIGHTi_SPECULAR1|GPUREG_LIGHT6_SPECULAR1]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT6_SPECULAR1
 
|PICA_REG_FRAG_LIGHT6_SPECULAR1
 
|-
 
|-
 
| 01A2
 
| 01A2
| [[#GPUREG_01A2|GPUREG_01A2]]
+
| [[#GPUREG_LIGHTi_DIFFUSE|GPUREG_LIGHT6_DIFFUSE]]
 
|  
 
|  
 
|PICA_REG_FRAG_LIGHT6_DIFFUSE
 
|PICA_REG_FRAG_LIGHT6_DIFFUSE
 
|-
 
|-
 
| 01A3
 
| 01A3
| [[#GPUREG_01A3|GPUREG_01A3]]
+
| [[#GPUREG_LIGHTi_AMBIENT|GPUREG_LIGHT6_AMBIENT]]
 
|  
 
|  
 
|PICA_REG_FRAG_LIGHT6_AMBIENT
 
|PICA_REG_FRAG_LIGHT6_AMBIENT
 
|-
 
|-
 
| 01A4
 
| 01A4
| [[#GPUREG_01A4|GPUREG_01A4]]
+
| [[#GPUREG_LIGHTi_XY|GPUREG_LIGHT6_XY]]
 
|  
 
|  
 
|PICA_REG_FRAG_LIGHT6_POSITION_XY
 
|PICA_REG_FRAG_LIGHT6_POSITION_XY
 
|-
 
|-
 
| 01A5
 
| 01A5
| [[#GPUREG_01A5|GPUREG_01A5]]
+
| [[#GPUREG_LIGHTi_Z|GPUREG_LIGHT6_Z]]
 
|  
 
|  
 
|PICA_REG_FRAG_LIGHT6_POSITION_Z
 
|PICA_REG_FRAG_LIGHT6_POSITION_Z
 
|-
 
|-
 
| 01A6
 
| 01A6
| [[#GPUREG_01A6|GPUREG_01A6]]
+
| [[#GPUREG_LIGHTi_SPOTDIR_XY|GPUREG_LIGHT6_SPOTDIR_XY]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT6_SPOT_XY
 
|PICA_REG_FRAG_LIGHT6_SPOT_XY
 
|-
 
|-
 
| 01A7
 
| 01A7
| [[#GPUREG_01A7|GPUREG_01A7]]
+
| [[#GPUREG_LIGHTi_SPOTDIR_Z|GPUREG_LIGHT6_SPOTDIR_Z]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT6_SPOT_Z
 
|PICA_REG_FRAG_LIGHT6_SPOT_Z
Line 2,151: Line 2,242:
 
|-
 
|-
 
| 01A9
 
| 01A9
| [[#GPUREG_01A9|GPUREG_01A9]]
+
| [[#GPUREG_LIGHTi_CONFIG|GPUREG_LIGHT6_CONFIG]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT6_TYPE
 
|PICA_REG_FRAG_LIGHT6_TYPE
 
|-
 
|-
 
| 01AA
 
| 01AA
| [[#GPUREG_01AA|GPUREG_01AA]]
+
| [[#GPUREG_LIGHTi_ATTENUATION_BIAS|GPUREG_LIGHT6_ATTENUATION_BIAS]]
 
|  
 
|  
|
+
|PICA_REG_FRAG_LIGHT6_DIST_ATTN_BIAS
 
|-
 
|-
 
| 01AB
 
| 01AB
| [[#GPUREG_01AB|GPUREG_01AB]]
+
| [[#GPUREG_LIGHTi_ATTENUATION_SCALE|GPUREG_LIGHT6_ATTENUATION_SCALE]]
 
|  
 
|  
|
+
|PICA_REG_FRAG_LIGHT6_DIST_ATTN_SCALE
 
|-
 
|-
 
| 01AC
 
| 01AC
Line 2,186: Line 2,277:
 
|-
 
|-
 
| 01B0
 
| 01B0
| [[#GPUREG_01B0|GPUREG_01B0]]
+
| [[#GPUREG_LIGHTi_SPECULAR0|GPUREG_LIGHT7_SPECULAR0]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT7_SPECULAR0
 
|PICA_REG_FRAG_LIGHT7_SPECULAR0
 
|-
 
|-
 
| 01B1
 
| 01B1
| [[#GPUREG_01B1|GPUREG_01B1]]
+
| [[#GPUREG_LIGHTi_SPECULAR1|GPUREG_LIGHT7_SPECULAR1]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT7_SPECULAR1
 
|PICA_REG_FRAG_LIGHT7_SPECULAR1
 
|-
 
|-
 
| 01B2
 
| 01B2
| [[#GPUREG_01B2|GPUREG_01B2]]
+
| [[#GPUREG_LIGHTi_DIFFUSE|GPUREG_LIGHT7_DIFFUSE]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT7_DIFFUSE
 
|PICA_REG_FRAG_LIGHT7_DIFFUSE
 
|-
 
|-
 
| 01B3
 
| 01B3
| [[#GPUREG_01B3|GPUREG_01B3]]
+
| [[#GPUREG_LIGHTi_AMBIENT|GPUREG_LIGHT7_AMBIENT]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT7_AMBIENT
 
|PICA_REG_FRAG_LIGHT7_AMBIENT
 
|-
 
|-
 
| 01B4
 
| 01B4
| [[#GPUREG_01B4|GPUREG_01B4]]
+
| [[#GPUREG_LIGHTi_XY|GPUREG_LIGHT7_XY]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT7_POSITION_XY
 
|PICA_REG_FRAG_LIGHT7_POSITION_XY
 
|-
 
|-
 
| 01B5
 
| 01B5
| [[#GPUREG_01B5|GPUREG_01B5]]
+
| [[#GPUREG_LIGHTi_Z|GPUREG_LIGHT7_Z]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT7_POSITION_Z
 
|PICA_REG_FRAG_LIGHT7_POSITION_Z
 
|-
 
|-
 
| 01B6
 
| 01B6
| [[#GPUREG_01B6|GPUREG_01B6]]
+
| [[#GPUREG_LIGHTi_SPOTDIR_XY|GPUREG_LIGHT7_SPOTDIR_XY]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT7_SPOT_XY
 
|PICA_REG_FRAG_LIGHT7_SPOT_XY
 
|-
 
|-
 
| 01B7
 
| 01B7
| [[#GPUREG_01B7|GPUREG_01B7]]
+
| [[#GPUREG_LIGHTi_SPOTDIR_Z|GPUREG_LIGHT7_SPOTDIR_Z]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT7_SPOT_Z
 
|PICA_REG_FRAG_LIGHT7_SPOT_Z
Line 2,231: Line 2,322:
 
|-
 
|-
 
| 01B9
 
| 01B9
| [[#GPUREG_01B9|GPUREG_01B9]]
+
| [[#GPUREG_LIGHTi_CONFIG|GPUREG_LIGHT7_CONFIG]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT7_TYPE
 
|PICA_REG_FRAG_LIGHT7_TYPE
 
|-
 
|-
 
| 01BA
 
| 01BA
| [[#GPUREG_01BA|GPUREG_01BA]]
+
| [[#GPUREG_LIGHTi_ATTENUATION_BIAS|GPUREG_LIGHT7_ATTENUATION_BIAS]]
 
|  
 
|  
|
+
|PICA_REG_FRAG_LIGHT7_DIST_ATTN_BIAS
 
|-
 
|-
 
| 01BB
 
| 01BB
| [[#GPUREG_01BB|GPUREG_01BB]]
+
| [[#GPUREG_LIGHTi_ATTENUATION_SCALE|GPUREG_LIGHT7_ATTENUATION_SCALE]]
 
|  
 
|  
|
+
|PICA_REG_FRAG_LIGHT7_DIST_ATTN_SCALE
 
|-
 
|-
 
| 01BC
 
| 01BC
Line 2,266: Line 2,357:
 
|-
 
|-
 
| 01C0
 
| 01C0
| [[#GPUREG_01C0|GPUREG_01C0]]
+
| [[#GPUREG_LIGHTING_AMBIENT|GPUREG_LIGHTING_AMBIENT]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT_AMBIENT
 
|PICA_REG_FRAG_LIGHT_AMBIENT
Line 2,276: Line 2,367:
 
|-
 
|-
 
| 01C2
 
| 01C2
| [[#GPUREG_01C2|GPUREG_01C2]]
+
| [[#GPUREG_LIGHTING_NUM_LIGHTS|GPUREG_LIGHTING_NUM_LIGHTS]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT_SRC_NUM
 
|PICA_REG_FRAG_LIGHT_SRC_NUM
 
|-
 
|-
 
| 01C3
 
| 01C3
| [[#GPUREG_01C3|GPUREG_01C3]]
+
| [[#GPUREG_LIGHTING_CONFIG0|GPUREG_LIGHTING_CONFIG0]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT_FUNC_MODE0
 
|PICA_REG_FRAG_LIGHT_FUNC_MODE0
 
|-
 
|-
 
| 01C4
 
| 01C4
| [[#GPUREG_01C4|GPUREG_01C4]]
+
| [[#GPUREG_LIGHTING_CONFIG1|GPUREG_LIGHTING_CONFIG1]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT_FUNC_MODE1
 
|PICA_REG_FRAG_LIGHT_FUNC_MODE1
 
|-
 
|-
 
| 01C5
 
| 01C5
| [[#GPUREG_01C5|GPUREG_01C5]]
+
| [[#GPUREG_LIGHTING_LUT_INDEX|GPUREG_LIGHTING_LUT_INDEX]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT_LUT
 
|PICA_REG_FRAG_LIGHT_LUT
 
|-
 
|-
 
| 01C6
 
| 01C6
| [[#GPUREG_01C6|GPUREG_01C6]]
+
| [[#GPUREG_LIGHTING_ENABLE1|GPUREG_LIGHTING_ENABLE1]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT_EN1
 
|PICA_REG_FRAG_LIGHT_EN1
Line 2,306: Line 2,397:
 
|-
 
|-
 
| 01C8
 
| 01C8
| [[#GPUREG_01C8|GPUREG_01C8]]
+
| [[#GPUREG_LIGHTING_LUT_DATAi|GPUREG_LIGHTING_LUT_DATA0]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT_LUT_DATA0
 
|PICA_REG_FRAG_LIGHT_LUT_DATA0
 
|-
 
|-
 
| 01C9
 
| 01C9
| [[#GPUREG_01C9|GPUREG_01C9]]
+
| [[#GPUREG_LIGHTING_LUT_DATAi|GPUREG_LIGHTING_LUT_DATA1]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT_LUT_DATA1
 
|PICA_REG_FRAG_LIGHT_LUT_DATA1
 
|-
 
|-
 
| 01CA
 
| 01CA
| [[#GPUREG_01CA|GPUREG_01CA]]
+
| [[#GPUREG_LIGHTING_LUT_DATAi|GPUREG_LIGHTING_LUT_DATA2]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT_LUT_DATA2
 
|PICA_REG_FRAG_LIGHT_LUT_DATA2
 
|-
 
|-
 
| 01CB
 
| 01CB
| [[#GPUREG_01CB|GPUREG_01CB]]
+
| [[#GPUREG_LIGHTING_LUT_DATAi|GPUREG_LIGHTING_LUT_DATA3]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT_LUT_DATA3
 
|PICA_REG_FRAG_LIGHT_LUT_DATA3
 
|-
 
|-
 
| 01CC
 
| 01CC
| [[#GPUREG_01CC|GPUREG_01CC]]
+
| [[#GPUREG_LIGHTING_LUT_DATAi|GPUREG_LIGHTING_LUT_DATA4]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT_LUT_DATA4
 
|PICA_REG_FRAG_LIGHT_LUT_DATA4
 
|-
 
|-
 
| 01CD
 
| 01CD
| [[#GPUREG_01CD|GPUREG_01CD]]
+
| [[#GPUREG_LIGHTING_LUT_DATAi|GPUREG_LIGHTING_LUT_DATA5]]
 
|?
 
|?
|PICA_REG_FRAG_LIGHT_LUT_DATA8
+
|PICA_REG_FRAG_LIGHT_LUT_DATA5
 
|-
 
|-
 
| 01CE
 
| 01CE
| [[#GPUREG_01CE|GPUREG_01CE]]
+
| [[#GPUREG_LIGHTING_LUT_DATAi|GPUREG_LIGHTING_LUT_DATA6]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT_LUT_DATA6
 
|PICA_REG_FRAG_LIGHT_LUT_DATA6
 
|-
 
|-
 
| 01CF
 
| 01CF
| [[#GPUREG_01CF|GPUREG_01CF]]
+
| [[#GPUREG_LIGHTING_LUT_DATAi|GPUREG_LIGHTING_LUT_DATA7]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT_LUT_DATA7
 
|PICA_REG_FRAG_LIGHT_LUT_DATA7
 
|-
 
|-
 
| 01D0
 
| 01D0
| [[#GPUREG_01D0|GPUREG_01D0]]
+
| [[#GPUREG_LIGHTING_LUTINPUT_ABS|GPUREG_LIGHTING_LUTINPUT_ABS]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT_ABSLUTINPUT
 
|PICA_REG_FRAG_LIGHT_ABSLUTINPUT
 
|-
 
|-
 
| 01D1
 
| 01D1
| [[#GPUREG_01D1|GPUREG_01D1]]
+
| [[#GPUREG_LIGHTING_LUTINPUT_SELECT|GPUREG_LIGHTING_LUTINPUT_SELECT]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT_LUTINPUT
 
|PICA_REG_FRAG_LIGHT_LUTINPUT
 
|-
 
|-
 
| 01D2
 
| 01D2
| [[#GPUREG_01D2|GPUREG_01D2]]
+
| [[#GPUREG_LIGHTING_LUTINPUT_SCALE|GPUREG_LIGHTING_LUTINPUT_SCALE]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT_LUTSCALE
 
|PICA_REG_FRAG_LIGHT_LUTSCALE
Line 2,391: Line 2,482:
 
|-
 
|-
 
| 01D9
 
| 01D9
| [[#GPUREG_01D9|GPUREG_01D9]]
+
| [[#GPUREG_LIGHTING_LIGHT_PERMUTATION|GPUREG_LIGHTING_LIGHT_PERMUTATION]]
 
|?
 
|?
 
|PICA_REG_FRAG_LIGHT_SRC_EN_ID
 
|PICA_REG_FRAG_LIGHT_SRC_EN_ID
Line 2,584: Line 2,675:
 
|  
 
|  
 
|
 
|
|-
+
|}
! colspan=3 | Geometry pipeline registers
+
 
|
+
=== Geometry pipeline registers (0x200-0x27F) ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Register ID
 +
! Register name
 +
! Notes
 +
! Official Name
 
|-
 
|-
 
| 0200
 
| 0200
Line 2,604: Line 2,701:
 
|-
 
|-
 
| 0203
 
| 0203
| [[#GPUREG_ATTRIBBUFFER0_CONFIG0|GPUREG_ATTRIBBUFFER0_CONFIG0]]
+
| [[#GPUREG_ATTRIBBUFFERi_OFFSET|GPUREG_ATTRIBBUFFER0_OFFSET]]
 
|  
 
|  
 
|PICA_REG_LOAD_ARRAY0_ATTR_OFFSET
 
|PICA_REG_LOAD_ARRAY0_ATTR_OFFSET
 
|-
 
|-
 
| 0204
 
| 0204
| [[#GPUREG_ATTRIBBUFFER0_CONFIG1|GPUREG_ATTRIBBUFFER0_CONFIG1]]
+
| [[#GPUREG_ATTRIBBUFFERi_CONFIG1|GPUREG_ATTRIBBUFFER0_CONFIG1]]
 
|  
 
|  
 
|PICA_REG_LOAD_ARRAY0_ELEMENT0
 
|PICA_REG_LOAD_ARRAY0_ELEMENT0
 
|-
 
|-
 
| 0205
 
| 0205
| [[#GPUREG_ATTRIBBUFFER0_CONFIG2|GPUREG_ATTRIBBUFFER0_CONFIG2]]
+
| [[#GPUREG_ATTRIBBUFFERi_CONFIG2|GPUREG_ATTRIBBUFFER0_CONFIG2]]
 
|  
 
|  
 
|PICA_REG_LOAD_ARRAY0_ELEMENT1
 
|PICA_REG_LOAD_ARRAY0_ELEMENT1
 
|-
 
|-
 
| 0206
 
| 0206
| [[#GPUREG_ATTRIBBUFFER1_CONFIG0|GPUREG_ATTRIBBUFFER1_CONFIG0]]
+
| [[#GPUREG_ATTRIBBUFFERi_OFFSET|GPUREG_ATTRIBBUFFER1_OFFSET]]
 
|  
 
|  
 
|
 
|
 
|-
 
|-
 
| 0207
 
| 0207
| [[#GPUREG_ATTRIBBUFFER1_CONFIG1|GPUREG_ATTRIBBUFFER1_CONFIG1]]
+
| [[#GPUREG_ATTRIBBUFFERi_CONFIG1|GPUREG_ATTRIBBUFFER1_CONFIG1]]
 
|  
 
|  
 
|
 
|
 
|-
 
|-
 
| 0208
 
| 0208
| [[#GPUREG_ATTRIBBUFFER1_CONFIG2|GPUREG_ATTRIBBUFFER1_CONFIG2]]
+
| [[#GPUREG_ATTRIBBUFFERi_CONFIG2|GPUREG_ATTRIBBUFFER1_CONFIG2]]
 
|  
 
|  
 
|
 
|
 
|-
 
|-
 
| 0209
 
| 0209
| [[#GPUREG_ATTRIBBUFFER2_CONFIG0|GPUREG_ATTRIBBUFFER2_CONFIG0]]
+
| [[#GPUREG_ATTRIBBUFFERi_OFFSET|GPUREG_ATTRIBBUFFER2_OFFSET]]
 
|  
 
|  
 
|
 
|
 
|-
 
|-
 
| 020A
 
| 020A
| [[#GPUREG_ATTRIBBUFFER2_CONFIG1|GPUREG_ATTRIBBUFFER2_CONFIG1]]
+
| [[#GPUREG_ATTRIBBUFFERi_CONFIG1|GPUREG_ATTRIBBUFFER2_CONFIG1]]
 
|  
 
|  
 
|
 
|
 
|-
 
|-
 
| 020B
 
| 020B
| [[#GPUREG_ATTRIBBUFFER2_CONFIG2|GPUREG_ATTRIBBUFFER2_CONFIG2]]
+
| [[#GPUREG_ATTRIBBUFFERi_CONFIG2|GPUREG_ATTRIBBUFFER2_CONFIG2]]
 
|  
 
|  
 
|
 
|
 
|-
 
|-
 
| 020C
 
| 020C
| [[#GPUREG_ATTRIBBUFFER3_CONFIG0|GPUREG_ATTRIBBUFFER3_CONFIG0]]
+
| [[#GPUREG_ATTRIBBUFFERi_OFFSET|GPUREG_ATTRIBBUFFER3_OFFSET]]
 
|  
 
|  
 
|
 
|
 
|-
 
|-
 
| 020D
 
| 020D
| [[#GPUREG_ATTRIBBUFFER3_CONFIG1|GPUREG_ATTRIBBUFFER3_CONFIG1]]
+
| [[#GPUREG_ATTRIBBUFFERi_CONFIG1|GPUREG_ATTRIBBUFFER3_CONFIG1]]
 
|  
 
|  
 
|
 
|
 
|-
 
|-
 
| 020E
 
| 020E
| [[#GPUREG_ATTRIBBUFFER3_CONFIG2|GPUREG_ATTRIBBUFFER3_CONFIG2]]
+
| [[#GPUREG_ATTRIBBUFFERi_CONFIG2|GPUREG_ATTRIBBUFFER3_CONFIG2]]
 
|  
 
|  
 
|
 
|
 
|-
 
|-
 
| 020F
 
| 020F
| [[#GPUREG_ATTRIBBUFFER4_CONFIG0|GPUREG_ATTRIBBUFFER4_CONFIG0]]
+
| [[#GPUREG_ATTRIBBUFFERi_OFFSET|GPUREG_ATTRIBBUFFER4_OFFSET]]
 
|  
 
|  
 
|
 
|
 
|-
 
|-
 
| 0210
 
| 0210
| [[#GPUREG_ATTRIBBUFFER4_CONFIG1|GPUREG_ATTRIBBUFFER4_CONFIG1]]
+
| [[#GPUREG_ATTRIBBUFFERi_CONFIG1|GPUREG_ATTRIBBUFFER4_CONFIG1]]
 
|  
 
|  
 
|
 
|
 
|-
 
|-
 
| 0211
 
| 0211
| [[#GPUREG_ATTRIBBUFFER4_CONFIG2|GPUREG_ATTRIBBUFFER4_CONFIG2]]
+
| [[#GPUREG_ATTRIBBUFFERi_CONFIG2|GPUREG_ATTRIBBUFFER4_CONFIG2]]
 
|  
 
|  
 
|
 
|
 
|-
 
|-
 
| 0212
 
| 0212
| [[#GPUREG_ATTRIBBUFFER5_CONFIG0|GPUREG_ATTRIBBUFFER5_CONFIG0]]
+
| [[#GPUREG_ATTRIBBUFFERi_OFFSET|GPUREG_ATTRIBBUFFER5_OFFSET]]
 
|  
 
|  
 
|
 
|
 
|-
 
|-
 
| 0213
 
| 0213
| [[#GPUREG_ATTRIBBUFFER5_CONFIG1|GPUREG_ATTRIBBUFFER5_CONFIG1]]
+
| [[#GPUREG_ATTRIBBUFFERi_CONFIG1|GPUREG_ATTRIBBUFFER5_CONFIG1]]
 
|  
 
|  
 
|
 
|
 
|-
 
|-
 
| 0214
 
| 0214
| [[#GPUREG_ATTRIBBUFFER5_CONFIG2|GPUREG_ATTRIBBUFFER5_CONFIG2]]
+
| [[#GPUREG_ATTRIBBUFFERi_CONFIG2|GPUREG_ATTRIBBUFFER5_CONFIG2]]
 
|  
 
|  
 
|
 
|
 
|-
 
|-
 
| 0215
 
| 0215
| [[#GPUREG_ATTRIBBUFFER6_CONFIG0|GPUREG_ATTRIBBUFFER6_CONFIG0]]
+
| [[#GPUREG_ATTRIBBUFFERi_OFFSET|GPUREG_ATTRIBBUFFER6_OFFSET]]
 
|  
 
|  
 
|
 
|
 
|-
 
|-
 
| 0216
 
| 0216
| [[#GPUREG_ATTRIBBUFFER6_CONFIG1|GPUREG_ATTRIBBUFFER6_CONFIG1]]
+
| [[#GPUREG_ATTRIBBUFFERi_CONFIG1|GPUREG_ATTRIBBUFFER6_CONFIG1]]
 
|  
 
|  
 
|
 
|
 
|-
 
|-
 
| 0217
 
| 0217
| [[#GPUREG_ATTRIBBUFFER6_CONFIG2|GPUREG_ATTRIBBUFFER6_CONFIG2]]
+
| [[#GPUREG_ATTRIBBUFFERi_CONFIG2|GPUREG_ATTRIBBUFFER6_CONFIG2]]
 
|  
 
|  
 
|
 
|
 
|-
 
|-
 
| 0218
 
| 0218
| [[#GPUREG_ATTRIBBUFFER7_CONFIG0|GPUREG_ATTRIBBUFFER7_CONFIG0]]
+
| [[#GPUREG_ATTRIBBUFFERi_OFFSET|GPUREG_ATTRIBBUFFER7_OFFSET]]
 
|  
 
|  
 
|
 
|
 
|-
 
|-
 
| 0219
 
| 0219
| [[#GPUREG_ATTRIBBUFFER7_CONFIG1|GPUREG_ATTRIBBUFFER7_CONFIG1]]
+
| [[#GPUREG_ATTRIBBUFFERi_CONFIG1|GPUREG_ATTRIBBUFFER7_CONFIG1]]
 
|  
 
|  
 
|
 
|
 
|-
 
|-
 
| 021A
 
| 021A
| [[#GPUREG_ATTRIBBUFFER7_CONFIG2|GPUREG_ATTRIBBUFFER7_CONFIG2]]
+
| [[#GPUREG_ATTRIBBUFFERi_CONFIG2|GPUREG_ATTRIBBUFFER7_CONFIG2]]
 
|  
 
|  
 
|
 
|
 
|-
 
|-
 
| 021B
 
| 021B
| [[#GPUREG_ATTRIBBUFFER8_CONFIG0|GPUREG_ATTRIBBUFFER8_CONFIG0]]
+
| [[#GPUREG_ATTRIBBUFFERi_OFFSET|GPUREG_ATTRIBBUFFER8_OFFSET]]
 
|  
 
|  
 
|
 
|
 
|-
 
|-
 
| 021C
 
| 021C
| [[#GPUREG_ATTRIBBUFFER8_CONFIG1|GPUREG_ATTRIBBUFFER8_CONFIG1]]
+
| [[#GPUREG_ATTRIBBUFFERi_CONFIG1|GPUREG_ATTRIBBUFFER8_CONFIG1]]
 
|  
 
|  
 
|
 
|
 
|-
 
|-
 
| 021D
 
| 021D
| [[#GPUREG_ATTRIBBUFFER8_CONFIG2|GPUREG_ATTRIBBUFFER8_CONFIG2]]
+
| [[#GPUREG_ATTRIBBUFFERi_CONFIG2|GPUREG_ATTRIBBUFFER8_CONFIG2]]
 
|  
 
|  
 
|
 
|
 
|-
 
|-
 
| 021E
 
| 021E
| [[#GPUREG_ATTRIBBUFFER9_CONFIG0|GPUREG_ATTRIBBUFFER9_CONFIG0]]
+
| [[#GPUREG_ATTRIBBUFFERi_OFFSET|GPUREG_ATTRIBBUFFER9_OFFSET]]
 
|  
 
|  
 
|
 
|
 
|-
 
|-
 
| 021F
 
| 021F
| [[#GPUREG_ATTRIBBUFFER9_CONFIG1|GPUREG_ATTRIBBUFFER9_CONFIG1]]
+
| [[#GPUREG_ATTRIBBUFFERi_CONFIG1|GPUREG_ATTRIBBUFFER9_CONFIG1]]
 
|  
 
|  
 
|
 
|
 
|-
 
|-
 
| 0220
 
| 0220
| [[#GPUREG_ATTRIBBUFFER9_CONFIG2|GPUREG_ATTRIBBUFFER9_CONFIG2]]
+
| [[#GPUREG_ATTRIBBUFFERi_CONFIG2|GPUREG_ATTRIBBUFFER9_CONFIG2]]
 
|  
 
|  
 
|
 
|
 
|-
 
|-
 
| 0221
 
| 0221
| [[#GPUREG_ATTRIBBUFFERA_CONFIG0|GPUREG_ATTRIBBUFFERA_CONFIG0]]
+
| [[#GPUREG_ATTRIBBUFFERi_OFFSET|GPUREG_ATTRIBBUFFER10_OFFSET]]
 
|  
 
|  
 
|
 
|
 
|-
 
|-
 
| 0222
 
| 0222
| [[#GPUREG_ATTRIBBUFFERA_CONFIG1|GPUREG_ATTRIBBUFFERA_CONFIG1]]
+
| [[#GPUREG_ATTRIBBUFFERi_CONFIG1|GPUREG_ATTRIBBUFFER10_CONFIG1]]
 
|  
 
|  
 
|
 
|
 
|-
 
|-
 
| 0223
 
| 0223
| [[#GPUREG_ATTRIBBUFFERA_CONFIG2|GPUREG_ATTRIBBUFFERA_CONFIG2]]
+
| [[#GPUREG_ATTRIBBUFFERi_CONFIG2|GPUREG_ATTRIBBUFFER10_CONFIG2]]
 
|  
 
|  
 
|
 
|
 
|-
 
|-
 
| 0224
 
| 0224
| [[#GPUREG_ATTRIBBUFFERB_CONFIG0|GPUREG_ATTRIBBUFFERB_CONFIG0]]
+
| [[#GPUREG_ATTRIBBUFFERi_OFFSET|GPUREG_ATTRIBBUFFER11_OFFSET]]
 
|  
 
|  
 
|
 
|
 
|-
 
|-
 
| 0225
 
| 0225
| [[#GPUREG_ATTRIBBUFFERB_CONFIG1|GPUREG_ATTRIBBUFFERB_CONFIG1]]
+
| [[#GPUREG_ATTRIBBUFFERi_CONFIG1|GPUREG_ATTRIBBUFFER11_CONFIG1]]
 
|  
 
|  
 
|
 
|
 
|-
 
|-
 
| 0226
 
| 0226
| [[#GPUREG_ATTRIBBUFFERB_CONFIG2|GPUREG_ATTRIBBUFFERB_CONFIG2]]
+
| [[#GPUREG_ATTRIBBUFFERi_CONFIG2|GPUREG_ATTRIBBUFFER11_CONFIG2]]
 
|  
 
|  
 
|
 
|
Line 2,799: Line 2,896:
 
|-
 
|-
 
| 022A
 
| 022A
| [[#GPUREG_022A|GPUREG_022A]]
+
| [[#GPUREG_VERTEX_OFFSET|GPUREG_VERTEX_OFFSET]]
|?
+
|
 
|PICA_REG_DRAW_VERTEX_OFFSET
 
|PICA_REG_DRAW_VERTEX_OFFSET
 
|-
 
|-
Line 2,814: Line 2,911:
 
|-
 
|-
 
| 022D
 
| 022D
| [[#GPUREG_022D|GPUREG_022D]]
+
| [[#GPUREG_POST_VERTEX_CACHE_NUM|GPUREG_POST_VERTEX_CACHE_NUM]]
 
|  
 
|  
|
+
|PICA_REG_POST_VERTEX_CACHE_NUM
 
|-
 
|-
 
| 022E
 
| 022E
Line 2,834: Line 2,931:
 
|-
 
|-
 
| 0231
 
| 0231
| [[#GPUREG_0231|GPUREG_0231]]
+
| [[#GPUREG_VTX_FUNC|GPUREG_VTX_FUNC]]
 
|?
 
|?
 
|PICA_REG_VTX_FUNC
 
|PICA_REG_VTX_FUNC
 
|-
 
|-
 
| 0232
 
| 0232
| [[#GPUREG_0232|GPUREG_0232]]
+
| [[#GPUREG_FIXEDATTRIB_INDEX|GPUREG_FIXEDATTRIB_INDEX]]
 
|?
 
|?
 
|PICA_REG_VS_FIXED_ATTR
 
|PICA_REG_VS_FIXED_ATTR
 
|-
 
|-
 
| 0233
 
| 0233
| [[#GPUREG_0233|GPUREG_0233]]
+
| [[#GPUREG_FIXEDATTRIB_DATAi|GPUREG_FIXEDATTRIB_DATA0]]
 
|?
 
|?
 
|PICA_REG_VS_FIXED_ATTR_DATA0
 
|PICA_REG_VS_FIXED_ATTR_DATA0
 
|-
 
|-
 
| 0234
 
| 0234
| [[#GPUREG_0234|GPUREG_0234]]
+
| [[#GPUREG_FIXEDATTRIB_DATAi|GPUREG_FIXEDATTRIB_DATA1]]
 
|?
 
|?
 
|PICA_REG_VS_FIXED_ATTR_DATA1
 
|PICA_REG_VS_FIXED_ATTR_DATA1
 
|-
 
|-
 
| 0235
 
| 0235
| [[#GPUREG_0235|GPUREG_0235]]
+
| [[#GPUREG_FIXEDATTRIB_DATAi|GPUREG_FIXEDATTRIB_DATA2]]
 
|?
 
|?
 
|PICA_REG_VS_FIXED_ATTR_DATA2
 
|PICA_REG_VS_FIXED_ATTR_DATA2
Line 2,869: Line 2,966:
 
|-
 
|-
 
| 0238
 
| 0238
| [[#GPUREG_0238|GPUREG_0238]]
+
| [[#GPUREG_CMDBUF_SIZE0|GPUREG_CMDBUF_SIZE0]]
 
|  
 
|  
|
+
|PICA_REG_COMMAND_BUF_SIZE_CH0
 
|-
 
|-
 
| 0239
 
| 0239
| [[#GPUREG_0239|GPUREG_0239]]
+
| [[#GPUREG_CMDBUF_SIZE1|GPUREG_CMDBUF_SIZE1]]
 
|  
 
|  
|
+
|PICA_REG_COMMAND_BUF_SIZE_CH1
 
|-
 
|-
 
| 023A
 
| 023A
| [[#GPUREG_023A|GPUREG_023A]]
+
| [[#GPUREG_CMDBUF_ADDR0|GPUREG_CMDBUF_ADDR0]]
 
|  
 
|  
|
+
|PICA_REG_COMMAND_BUF_ADDR_CH0
 
|-
 
|-
 
| 023B
 
| 023B
| [[#GPUREG_023B|GPUREG_023B]]
+
| [[#GPUREG_CMDBUF_ADDR1|GPUREG_CMDBUF_ADDR1]]
 
|  
 
|  
|
+
|PICA_REG_COMMAND_BUF_ADDR_CH1
 
|-
 
|-
 
| 023C
 
| 023C
| [[#GPUREG_023C|GPUREG_023C]]
+
| [[#GPUREG_CMDBUF_JUMP0|GPUREG_CMDBUF_JUMP0]]
 
|  
 
|  
|
+
|PICA_REG_COMMAND_BUF_KICK_CH0
 
|-
 
|-
 
| 023D
 
| 023D
| [[#GPUREG_023D|GPUREG_023D]]
+
| [[#GPUREG_CMDBUF_JUMP1|GPUREG_CMDBUF_JUMP1]]
 
|  
 
|  
|
+
|PICA_REG_COMMAND_BUF_KICK_CH1
 
|-
 
|-
 
| 023E
 
| 023E
Line 2,919: Line 3,016:
 
|-
 
|-
 
| 0242
 
| 0242
| [[#GPUREG_0242|GPUREG_0242]]
+
| [[#GPUREG_VSH_NUM_ATTR|GPUREG_VSH_NUM_ATTR]]
 
|?
 
|?
 
|PICA_REG_VS_ATTR_NUM1
 
|PICA_REG_VS_ATTR_NUM1
Line 2,929: Line 3,026:
 
|-
 
|-
 
| 0244
 
| 0244
| [[#GPUREG_0244|GPUREG_0244]]
+
| [[#GPUREG_VSH_COM_MODE|GPUREG_VSH_COM_MODE]]
 
|?
 
|?
 
|PICA_REG_VS_COM_MODE
 
|PICA_REG_VS_COM_MODE
 
|-
 
|-
 
| 0245
 
| 0245
| [[#GPUREG_0245|GPUREG_0245]]
+
| [[#GPUREG_START_DRAW_FUNC0|GPUREG_START_DRAW_FUNC0]]
 
|?
 
|?
 
|PICA_REG_START_DRAW_FUNC0
 
|PICA_REG_START_DRAW_FUNC0
Line 2,959: Line 3,056:
 
|-
 
|-
 
| 024A
 
| 024A
| [[#GPUREG_024A|GPUREG_024A]]
+
| [[#GPUREG_VSH_OUTMAP_TOTAL1|GPUREG_VSH_OUTMAP_TOTAL1]]
 
|?
 
|?
 
|PICA_REG_VS_OUT_REG_NUM1
 
|PICA_REG_VS_OUT_REG_NUM1
Line 2,994: Line 3,091:
 
|-
 
|-
 
| 0251
 
| 0251
| [[#GPUREG_0251|GPUREG_0251]]
+
| [[#GPUREG_VSH_OUTMAP_TOTAL2|GPUREG_VSH_OUTMAP_TOTAL2]]
 
|?
 
|?
 
|PICA_REG_VS_OUT_REG_NUM2
 
|PICA_REG_VS_OUT_REG_NUM2
 
|-
 
|-
 
| 0252
 
| 0252
| [[#GPUREG_0252|GPUREG_0252]]
+
| [[#GPUREG_GSH_MISC0|GPUREG_GSH_MISC0]]
 
|?
 
|?
 
|PICA_REG_GS_MISC_REG0
 
|PICA_REG_GS_MISC_REG0
 
|-
 
|-
 
| 0253
 
| 0253
| [[#GPUREG_0253|GPUREG_0253]]
+
| [[#GPUREG_GEOSTAGE_CONFIG2|GPUREG_GEOSTAGE_CONFIG2]]
 
|?
 
|?
 
|PICA_REG_DRAW_MODE1
 
|PICA_REG_DRAW_MODE1
 
|-
 
|-
 
| 0254
 
| 0254
| [[#GPUREG_0254|GPUREG_0254]]
+
| [[#GPUREG_GSH_MISC1|GPUREG_GSH_MISC1]]
 
|?
 
|?
 
|PICA_REG_GS_MISC_REG1
 
|PICA_REG_GS_MISC_REG1
Line 3,061: Line 3,158:
 
| [[#GPUREG_PRIMITIVE_CONFIG|GPUREG_PRIMITIVE_CONFIG]]
 
| [[#GPUREG_PRIMITIVE_CONFIG|GPUREG_PRIMITIVE_CONFIG]]
 
| ?
 
| ?
|PICA_REG_GS_OUT_REG_NUM3 / PICA_REG_VS_OUT_REG_NUM3
+
|PICA_REG_GS_OUT_REG_NUM3 / PICA_REG_DRAW_MODE2 / PICA_REG_VS_OUT_REG_NUM3
 
|-
 
|-
 
| 025F
 
| 025F
| [[#GPUREG_025F|GPUREG_025F]]
+
| [[#GPUREG_RESTART_PRIMITIVE|GPUREG_RESTART_PRIMITIVE]]
 
|?
 
|?
 
|PICA_REG_START_DRAW_FUNC1
 
|PICA_REG_START_DRAW_FUNC1
Line 3,227: Line 3,324:
 
|  
 
|  
 
|
 
|
 +
|}
 +
 +
=== Shader registers (0x280-0x2DF) ===
 +
 +
{| class="wikitable" border="1"
 +
! Register ID
 +
! Register name
 +
! Notes
 +
! Official Name
 
|-
 
|-
! colspan=4 | Geometry shader registers
+
! colspan=4 | Geometry shader
 
|-
 
|-
 
| 0280
 
| 0280
| [[#GPUREG_GSH_BOOLUNIFORM|GPUREG_GSH_BOOLUNIFORM]]
+
| [[#GPUREG_SH_BOOLUNIFORM|GPUREG_GSH_BOOLUNIFORM]]
 
|  
 
|  
 
|PICA_REG_GS_BOOL
 
|PICA_REG_GS_BOOL
 
|-
 
|-
 
| 0281
 
| 0281
| [[#GPUREG_GSH_INTUNIFORM_I0|GPUREG_GSH_INTUNIFORM_I0]]
+
| [[#GPUREG_SH_INTUNIFORM_Ii|GPUREG_GSH_INTUNIFORM_I0]]
 
|  
 
|  
 
|PICA_REG_GS_INT0
 
|PICA_REG_GS_INT0
 
|-
 
|-
 
| 0282
 
| 0282
| [[#GPUREG_GSH_INTUNIFORM_I1|GPUREG_GSH_INTUNIFORM_I1]]
+
| [[#GPUREG_SH_INTUNIFORM_Ii|GPUREG_GSH_INTUNIFORM_I1]]
 
|  
 
|  
 
|PICA_REG_GS_INT1
 
|PICA_REG_GS_INT1
 
|-
 
|-
 
| 0283
 
| 0283
| [[#GPUREG_GSH_INTUNIFORM_I2|GPUREG_GSH_INTUNIFORM_I2]]
+
| [[#GPUREG_SH_INTUNIFORM_Ii|GPUREG_GSH_INTUNIFORM_I2]]
 
|  
 
|  
 
|PICA_REG_GS_INT2
 
|PICA_REG_GS_INT2
 
|-
 
|-
 
| 0284
 
| 0284
| [[#GPUREG_GSH_INTUNIFORM_I3|GPUREG_GSH_INTUNIFORM_I3]]
+
| [[#GPUREG_SH_INTUNIFORM_Ii|GPUREG_GSH_INTUNIFORM_I3]]
 
|  
 
|  
 
|PICA_REG_GS_INT3
 
|PICA_REG_GS_INT3
Line 3,276: Line 3,382:
 
|-
 
|-
 
| 0289
 
| 0289
| [[#GPUREG_GSH_INPUTBUFFER_CONFIG|GPUREG_GSH_INPUTBUFFER_CONFIG]]
+
| [[#GPUREG_SH_INPUTBUFFER_CONFIG|GPUREG_GSH_INPUTBUFFER_CONFIG]]
 
|  
 
|  
 
|PICA_REG_GS_ATTR_NUM
 
|PICA_REG_GS_ATTR_NUM
 
|-
 
|-
 
| 028A
 
| 028A
| [[#GPUREG_GSH_ENTRYPOINT|GPUREG_GSH_ENTRYPOINT]]
+
| [[#GPUREG_SH_ENTRYPOINT|GPUREG_GSH_ENTRYPOINT]]
 
|  
 
|  
 
|PICA_REG_GS_START_ADDR
 
|PICA_REG_GS_START_ADDR
 
|-
 
|-
 
| 028B
 
| 028B
| [[#GPUREG_GSH_ATTRIBUTES_PERMUTATION_LOW|GPUREG_GSH_ATTRIBUTES_PERMUTATION_LOW]]
+
| [[#GPUREG_SH_ATTRIBUTES_PERMUTATION_LOW|GPUREG_GSH_ATTRIBUTES_PERMUTATION_LOW]]
 
|  
 
|  
 
|PICA_REG_GS_ATTR_IN_REG_MAP0
 
|PICA_REG_GS_ATTR_IN_REG_MAP0
 
|-
 
|-
 
| 028C
 
| 028C
| [[#GPUREG_GSH_ATTRIBUTES_PERMUTATION_HIGH|GPUREG_GSH_ATTRIBUTES_PERMUTATION_HIGH]]
+
| [[#GPUREG_SH_ATTRIBUTES_PERMUTATION_HIGH|GPUREG_GSH_ATTRIBUTES_PERMUTATION_HIGH]]
 
|  
 
|  
 
|PICA_REG_GS_ATTR_IN_REG_MAP1
 
|PICA_REG_GS_ATTR_IN_REG_MAP1
 
|-
 
|-
 
| 028D
 
| 028D
| [[#GPUREG_GSH_OUTMAP_MASK|GPUREG_GSH_OUTMAP_MASK]]
+
| [[#GPUREG_SH_OUTMAP_MASK|GPUREG_GSH_OUTMAP_MASK]]
 
|  
 
|  
 
|PICA_REG_GS_OUT_REG_MASK
 
|PICA_REG_GS_OUT_REG_MASK
Line 3,306: Line 3,412:
 
|-
 
|-
 
| 028F
 
| 028F
| [[#GPUREG_GSH_CODETRANSFER_END|GPUREG_GSH_CODETRANSFER_END]]
+
| [[#GPUREG_SH_CODETRANSFER_END|GPUREG_GSH_CODETRANSFER_END]]
 
|  
 
|  
 
|PICA_REG_GS_PROG_RENEWAL_END
 
|PICA_REG_GS_PROG_RENEWAL_END
 
|-
 
|-
 
| 0290
 
| 0290
| [[#GPUREG_GSH_FLOATUNIFORM_CONFIG|GPUREG_GSH_FLOATUNIFORM_CONFIG]]
+
| [[#GPUREG_SH_FLOATUNIFORM_INDEX|GPUREG_GSH_FLOATUNIFORM_INDEX]]
 
|  
 
|  
 
|PICA_REG_GS_FLOAT_ADDR
 
|PICA_REG_GS_FLOAT_ADDR
 
|-
 
|-
 
| 0291
 
| 0291
| [[#GPUREG_GSH_FLOATUNIFORM_DATA|GPUREG_GSH_FLOATUNIFORM_DATA]]
+
| [[#GPUREG_SH_FLOATUNIFORM_DATAi|GPUREG_GSH_FLOATUNIFORM_DATA0]]
 
|  
 
|  
|PICA_REG_GS_FLOAT_DATA1
+
|PICA_REG_GS_FLOAT_DATA0
 
|-
 
|-
 
| 0292
 
| 0292
| [[#GPUREG_GSH_FLOATUNIFORM_DATA|GPUREG_GSH_FLOATUNIFORM_DATA]]
+
| [[#GPUREG_SH_FLOATUNIFORM_DATAi|GPUREG_GSH_FLOATUNIFORM_DATA1]]
 
|  
 
|  
|PICA_REG_GS_FLOAT_DATA2
+
|PICA_REG_GS_FLOAT_DATA1
 
|-
 
|-
 
| 0293
 
| 0293
| [[#GPUREG_GSH_FLOATUNIFORM_DATA|GPUREG_GSH_FLOATUNIFORM_DATA]]
+
| [[#GPUREG_SH_FLOATUNIFORM_DATAi|GPUREG_GSH_FLOATUNIFORM_DATA2]]
 
|  
 
|  
|PICA_REG_GS_FLOAT_DATA3
+
|PICA_REG_GS_FLOAT_DATA2
 
|-
 
|-
 
| 0294
 
| 0294
| [[#GPUREG_GSH_FLOATUNIFORM_DATA|GPUREG_GSH_FLOATUNIFORM_DATA]]
+
| [[#GPUREG_SH_FLOATUNIFORM_DATAi|GPUREG_GSH_FLOATUNIFORM_DATA3]]
 
|  
 
|  
|PICA_REG_GS_FLOAT_DATA4
+
|PICA_REG_GS_FLOAT_DATA3
 
|-
 
|-
 
| 0295
 
| 0295
| [[#GPUREG_GSH_FLOATUNIFORM_DATA|GPUREG_GSH_FLOATUNIFORM_DATA]]
+
| [[#GPUREG_SH_FLOATUNIFORM_DATAi|GPUREG_GSH_FLOATUNIFORM_DATA4]]
 
|  
 
|  
|PICA_REG_GS_FLOAT_DATA5
+
|PICA_REG_GS_FLOAT_DATA4
 
|-
 
|-
 
| 0296
 
| 0296
| [[#GPUREG_GSH_FLOATUNIFORM_DATA|GPUREG_GSH_FLOATUNIFORM_DATA]]
+
| [[#GPUREG_SH_FLOATUNIFORM_DATAi|GPUREG_GSH_FLOATUNIFORM_DATA5]]
 
|  
 
|  
|PICA_REG_GS_FLOAT_DATA6
+
|PICA_REG_GS_FLOAT_DATA5
 
|-
 
|-
 
| 0297
 
| 0297
| [[#GPUREG_GSH_FLOATUNIFORM_DATA|GPUREG_GSH_FLOATUNIFORM_DATA]]
+
| [[#GPUREG_SH_FLOATUNIFORM_DATAi|GPUREG_GSH_FLOATUNIFORM_DATA6]]
 
|  
 
|  
|PICA_REG_GS_FLOAT_DATA7
+
|PICA_REG_GS_FLOAT_DATA6
 
|-
 
|-
 
| 0298
 
| 0298
| [[#GPUREG_GSH_FLOATUNIFORM_DATA|GPUREG_GSH_FLOATUNIFORM_DATA]]
+
| [[#GPUREG_SH_FLOATUNIFORM_DATAi|GPUREG_GSH_FLOATUNIFORM_DATA7]]
 
|  
 
|  
|PICA_REG_GS_FLOAT_DATA8
+
|PICA_REG_GS_FLOAT_DATA7
 
|-
 
|-
 
| 0299
 
| 0299
Line 3,366: Line 3,472:
 
|-
 
|-
 
| 029B
 
| 029B
| [[#GPUREG_GSH_CODETRANSFER_CONFIG|GPUREG_GSH_CODETRANSFER_CONFIG]]
+
| [[#GPUREG_SH_CODETRANSFER_INDEX|GPUREG_GSH_CODETRANSFER_INDEX]]
 
| ?
 
| ?
 
|PICA_REG_GS_PROG_ADDR
 
|PICA_REG_GS_PROG_ADDR
 
|-
 
|-
 
| 029C
 
| 029C
| [[#GPUREG_GSH_CODETRANSFER_DATA|GPUREG_GSH_CODETRANSFER_DATA]]
+
| [[#GPUREG_SH_CODETRANSFER_DATAi|GPUREG_GSH_CODETRANSFER_DATA0]]
 
|  
 
|  
 
|PICA_REG_GS_PROG_DATA0
 
|PICA_REG_GS_PROG_DATA0
 
|-
 
|-
 
| 029D
 
| 029D
| [[#GPUREG_GSH_CODETRANSFER_DATA|GPUREG_GSH_CODETRANSFER_DATA]]
+
| [[#GPUREG_SH_CODETRANSFER_DATAi|GPUREG_GSH_CODETRANSFER_DATA1]]
 
|  
 
|  
 
|PICA_REG_GS_PROG_DATA1
 
|PICA_REG_GS_PROG_DATA1
 
|-
 
|-
 
| 029E
 
| 029E
| [[#GPUREG_GSH_CODETRANSFER_DATA|GPUREG_GSH_CODETRANSFER_DATA]]
+
| [[#GPUREG_SH_CODETRANSFER_DATAi|GPUREG_GSH_CODETRANSFER_DATA2]]
 
|  
 
|  
 
|PICA_REG_GS_PROG_DATA2
 
|PICA_REG_GS_PROG_DATA2
 
|-
 
|-
 
| 029F
 
| 029F
| [[#GPUREG_GSH_CODETRANSFER_DATA|GPUREG_GSH_CODETRANSFER_DATA]]
+
| [[#GPUREG_SH_CODETRANSFER_DATAi|GPUREG_GSH_CODETRANSFER_DATA3]]
 
|  
 
|  
 
|PICA_REG_GS_PROG_DATA3
 
|PICA_REG_GS_PROG_DATA3
 
|-
 
|-
 
| 02A0
 
| 02A0
| [[#GPUREG_GSH_CODETRANSFER_DATA|GPUREG_GSH_CODETRANSFER_DATA]]
+
| [[#GPUREG_SH_CODETRANSFER_DATAi|GPUREG_GSH_CODETRANSFER_DATA4]]
 
|  
 
|  
 
|PICA_REG_GS_PROG_DATA4
 
|PICA_REG_GS_PROG_DATA4
 
|-
 
|-
 
| 02A1
 
| 02A1
| [[#GPUREG_GSH_CODETRANSFER_DATA|GPUREG_GSH_CODETRANSFER_DATA]]
+
| [[#GPUREG_SH_CODETRANSFER_DATAi|GPUREG_GSH_CODETRANSFER_DATA5]]
 
|  
 
|  
 
|PICA_REG_GS_PROG_DATA5
 
|PICA_REG_GS_PROG_DATA5
 
|-
 
|-
 
| 02A2
 
| 02A2
| [[#GPUREG_GSH_CODETRANSFER_DATA|GPUREG_GSH_CODETRANSFER_DATA]]
+
| [[#GPUREG_SH_CODETRANSFER_DATAi|GPUREG_GSH_CODETRANSFER_DATA6]]
 
|  
 
|  
 
|PICA_REG_GS_PROG_DATA6
 
|PICA_REG_GS_PROG_DATA6
 
|-
 
|-
 
| 02A3
 
| 02A3
| [[#GPUREG_GSH_CODETRANSFER_DATA|GPUREG_GSH_CODETRANSFER_DATA]]
+
| [[#GPUREG_SH_CODETRANSFER_DATAi|GPUREG_GSH_CODETRANSFER_DATA7]]
 
|  
 
|  
 
|PICA_REG_GS_PROG_DATA7
 
|PICA_REG_GS_PROG_DATA7
Line 3,416: Line 3,522:
 
|-
 
|-
 
| 02A5
 
| 02A5
| [[#GPUREG_GSH_OPDESCS_CONFIG|GPUREG_GSH_OPDESCS_CONFIG]]
+
| [[#GPUREG_SH_OPDESCS_INDEX|GPUREG_GSH_OPDESCS_INDEX]]
 
|  
 
|  
 
|PICA_REG_GS_PROG_SWIZZLE_ADDR
 
|PICA_REG_GS_PROG_SWIZZLE_ADDR
 
|-
 
|-
 
| 02A6
 
| 02A6
| [[#GPUREG_GSH_OPDESCS_DATA|GPUREG_GSH_OPDESCS_DATA]]
+
| [[#GPUREG_SH_OPDESCS_DATAi|GPUREG_GSH_OPDESCS_DATA0]]
 
|  
 
|  
 
|PICA_REG_GS_PROG_SWIZZLE_DATA0
 
|PICA_REG_GS_PROG_SWIZZLE_DATA0
 
|-
 
|-
 
| 02A7
 
| 02A7
| [[#GPUREG_GSH_OPDESCS_DATA|GPUREG_GSH_OPDESCS_DATA]]
+
| [[#GPUREG_SH_OPDESCS_DATAi|GPUREG_GSH_OPDESCS_DATA1]]
 
|  
 
|  
 
|PICA_REG_GS_PROG_SWIZZLE_DATA1
 
|PICA_REG_GS_PROG_SWIZZLE_DATA1
 
|-
 
|-
 
| 02A8
 
| 02A8
| [[#GPUREG_GSH_OPDESCS_DATA|GPUREG_GSH_OPDESCS_DATA]]
+
| [[#GPUREG_SH_OPDESCS_DATAi|GPUREG_GSH_OPDESCS_DATA2]]
 
|  
 
|  
 
|PICA_REG_GS_PROG_SWIZZLE_DATA2
 
|PICA_REG_GS_PROG_SWIZZLE_DATA2
 
|-
 
|-
 
| 02A9
 
| 02A9
| [[#GPUREG_GSH_OPDESCS_DATA|GPUREG_GSH_OPDESCS_DATA]]
+
| [[#GPUREG_SH_OPDESCS_DATAi|GPUREG_GSH_OPDESCS_DATA3]]
 
|  
 
|  
 
|PICA_REG_GS_PROG_SWIZZLE_DATA3
 
|PICA_REG_GS_PROG_SWIZZLE_DATA3
 
|-
 
|-
 
| 02AA
 
| 02AA
| [[#GPUREG_GSH_OPDESCS_DATA|GPUREG_GSH_OPDESCS_DATA]]
+
| [[#GPUREG_SH_OPDESCS_DATAi|GPUREG_GSH_OPDESCS_DATA4]]
 
|  
 
|  
 
|PICA_REG_GS_PROG_SWIZZLE_DATA4
 
|PICA_REG_GS_PROG_SWIZZLE_DATA4
 
|-
 
|-
 
| 02AB
 
| 02AB
| [[#GPUREG_GSH_OPDESCS_DATA|GPUREG_GSH_OPDESCS_DATA]]
+
| [[#GPUREG_SH_OPDESCS_DATAi|GPUREG_GSH_OPDESCS_DATA5]]
 
|  
 
|  
 
|PICA_REG_GS_PROG_SWIZZLE_DATA5
 
|PICA_REG_GS_PROG_SWIZZLE_DATA5
 
|-
 
|-
 
| 02AC
 
| 02AC
| [[#GPUREG_GSH_OPDESCS_DATA|GPUREG_GSH_OPDESCS_DATA]]
+
| [[#GPUREG_SH_OPDESCS_DATAi|GPUREG_GSH_OPDESCS_DATA6]]
 
|  
 
|  
 
|PICA_REG_GS_PROG_SWIZZLE_DATA6
 
|PICA_REG_GS_PROG_SWIZZLE_DATA6
 
|-
 
|-
 
| 02AD
 
| 02AD
| [[#GPUREG_GSH_OPDESCS_DATA|GPUREG_GSH_OPDESCS_DATA]]
+
| [[#GPUREG_SH_OPDESCS_DATAi|GPUREG_GSH_OPDESCS_DATA7]]
 
|  
 
|  
 
|PICA_REG_GS_PROG_SWIZZLE_DATA7
 
|PICA_REG_GS_PROG_SWIZZLE_DATA7
Line 3,470: Line 3,576:
 
|
 
|
 
|-
 
|-
! colspan=4 | Vertex shader registers
+
! colspan=4 | Vertex shader
 
|-
 
|-
 
| 02B0
 
| 02B0
| [[#GPUREG_VSH_BOOLUNIFORM|GPUREG_VSH_BOOLUNIFORM]]
+
| [[#GPUREG_SH_BOOLUNIFORM|GPUREG_VSH_BOOLUNIFORM]]
 
|  
 
|  
 
|PICA_REG_VS_BOOL
 
|PICA_REG_VS_BOOL
 
|-
 
|-
 
| 02B1
 
| 02B1
| [[#GPUREG_VSH_INTUNIFORM_I0|GPUREG_VSH_INTUNIFORM_I0]]
+
| [[#GPUREG_SH_INTUNIFORM_Ii|GPUREG_VSH_INTUNIFORM_I0]]
 
|  
 
|  
 
|PICA_REG_VS_INT0
 
|PICA_REG_VS_INT0
 
|-
 
|-
 
| 02B2
 
| 02B2
| [[#GPUREG_VSH_INTUNIFORM_I1|GPUREG_VSH_INTUNIFORM_I1]]
+
| [[#GPUREG_SH_INTUNIFORM_Ii|GPUREG_VSH_INTUNIFORM_I1]]
 
|  
 
|  
 
|PICA_REG_VS_INT1
 
|PICA_REG_VS_INT1
 
|-
 
|-
 
| 02B3
 
| 02B3
| [[#GPUREG_VSH_INTUNIFORM_I2|GPUREG_VSH_INTUNIFORM_I2]]
+
| [[#GPUREG_SH_INTUNIFORM_Ii|GPUREG_VSH_INTUNIFORM_I2]]
 
|  
 
|  
 
|PICA_REG_VS_INT2
 
|PICA_REG_VS_INT2
 
|-
 
|-
 
| 02B4
 
| 02B4
| [[#GPUREG_VSH_INTUNIFORM_I3|GPUREG_VSH_INTUNIFORM_I3]]
+
| [[#GPUREG_SH_INTUNIFORM_Ii|GPUREG_VSH_INTUNIFORM_I3]]
 
|  
 
|  
 
|PICA_REG_VS_INT3
 
|PICA_REG_VS_INT3
Line 3,518: Line 3,624:
 
|-
 
|-
 
| 02B9
 
| 02B9
| [[#GPUREG_VSH_INPUTBUFFER_CONFIG|GPUREG_VSH_INPUTBUFFER_CONFIG]]
+
| [[#GPUREG_SH_INPUTBUFFER_CONFIG|GPUREG_VSH_INPUTBUFFER_CONFIG]]
 
|  
 
|  
 
|PICA_REG_VS_ATTR_NUM0
 
|PICA_REG_VS_ATTR_NUM0
 
|-
 
|-
 
| 02BA
 
| 02BA
| [[#GPUREG_VSH_ENTRYPOINT|GPUREG_VSH_ENTRYPOINT]]
+
| [[#GPUREG_SH_ENTRYPOINT|GPUREG_VSH_ENTRYPOINT]]
 
|  
 
|  
 
|PICA_REG_VS_START_ADDR
 
|PICA_REG_VS_START_ADDR
 
|-
 
|-
 
| 02BB
 
| 02BB
| [[#GPUREG_VSH_ATTRIBUTES_PERMUTATION_LOW|GPUREG_VSH_ATTRIBUTES_PERMUTATION_LOW]]
+
| [[#GPUREG_SH_ATTRIBUTES_PERMUTATION_LOW|GPUREG_VSH_ATTRIBUTES_PERMUTATION_LOW]]
 
|  
 
|  
 
|PICA_REG_VS_ATTR_IN_REG_MAP0
 
|PICA_REG_VS_ATTR_IN_REG_MAP0
 
|-
 
|-
 
| 02BC
 
| 02BC
| [[#GPUREG_VSH_ATTRIBUTES_PERMUTATION_HIGH|GPUREG_VSH_ATTRIBUTES_PERMUTATION_HIGH]]
+
| [[#GPUREG_SH_ATTRIBUTES_PERMUTATION_HIGH|GPUREG_VSH_ATTRIBUTES_PERMUTATION_HIGH]]
 
|  
 
|  
 
|PICA_REG_VS_ATTR_IN_REG_MAP1
 
|PICA_REG_VS_ATTR_IN_REG_MAP1
 
|-
 
|-
 
| 02BD
 
| 02BD
| [[#GPUREG_VSH_OUTMAP_MASK|GPUREG_VSH_OUTMAP_MASK]]
+
| [[#GPUREG_SH_OUTMAP_MASK|GPUREG_VSH_OUTMAP_MASK]]
 
|  
 
|  
 
|PICA_REG_VS_OUT_REG_MASK
 
|PICA_REG_VS_OUT_REG_MASK
Line 3,548: Line 3,654:
 
|-
 
|-
 
| 02BF
 
| 02BF
| [[#GPUREG_VSH_CODETRANSFER_END|GPUREG_VSH_CODETRANSFER_END]]
+
| [[#GPUREG_SH_CODETRANSFER_END|GPUREG_VSH_CODETRANSFER_END]]
 
|  
 
|  
 
|PICA_REG_VS_PROG_RENEWAL_END
 
|PICA_REG_VS_PROG_RENEWAL_END
 
|-
 
|-
 
| 02C0
 
| 02C0
| [[#GPUREG_VSH_FLOATUNIFORM_CONFIG|GPUREG_VSH_FLOATUNIFORM_CONFIG]]
+
| [[#GPUREG_SH_FLOATUNIFORM_INDEX|GPUREG_VSH_FLOATUNIFORM_INDEX]]
 
|  
 
|  
 
|PICA_REG_VS_FLOAT_ADDR
 
|PICA_REG_VS_FLOAT_ADDR
 
|-
 
|-
 
| 02C1
 
| 02C1
| [[#GPUREG_VSH_FLOATUNIFORM_DATA|GPUREG_VSH_FLOATUNIFORM_DATA]]
+
| [[#GPUREG_SH_FLOATUNIFORM_DATAi|GPUREG_VSH_FLOATUNIFORM_DATA0]]
 
|  
 
|  
|PICA_REG_VS_FLOAT_DATA1
+
|PICA_REG_VS_FLOAT_DATA0
 
|-
 
|-
 
| 02C2
 
| 02C2
| [[#GPUREG_VSH_FLOATUNIFORM_DATA|GPUREG_VSH_FLOATUNIFORM_DATA]]
+
| [[#GPUREG_SH_FLOATUNIFORM_DATAi|GPUREG_VSH_FLOATUNIFORM_DATA1]]
 
|  
 
|  
|PICA_REG_VS_FLOAT_DATA2
+
|PICA_REG_VS_FLOAT_DATA1
 
|-
 
|-
 
| 02C3
 
| 02C3
| [[#GPUREG_VSH_FLOATUNIFORM_DATA|GPUREG_VSH_FLOATUNIFORM_DATA]]
+
| [[#GPUREG_SH_FLOATUNIFORM_DATAi|GPUREG_VSH_FLOATUNIFORM_DATA2]]
 
|  
 
|  
|PICA_REG_VS_FLOAT_DATA3
+
|PICA_REG_VS_FLOAT_DATA2
 
|-
 
|-
 
| 02C4
 
| 02C4
| [[#GPUREG_VSH_FLOATUNIFORM_DATA|GPUREG_VSH_FLOATUNIFORM_DATA]]
+
| [[#GPUREG_SH_FLOATUNIFORM_DATAi|GPUREG_VSH_FLOATUNIFORM_DATA3]]
 
|  
 
|  
|PICA_REG_VS_FLOAT_DATA4
+
|PICA_REG_VS_FLOAT_DATA3
 
|-
 
|-
 
| 02C5
 
| 02C5
| [[#GPUREG_VSH_FLOATUNIFORM_DATA|GPUREG_VSH_FLOATUNIFORM_DATA]]
+
| [[#GPUREG_SH_FLOATUNIFORM_DATAi|GPUREG_VSH_FLOATUNIFORM_DATA4]]
 
|  
 
|  
|PICA_REG_VS_FLOAT_DATA5
+
|PICA_REG_VS_FLOAT_DATA4
 
|-
 
|-
 
| 02C6
 
| 02C6
| [[#GPUREG_VSH_FLOATUNIFORM_DATA|GPUREG_VSH_FLOATUNIFORM_DATA]]
+
| [[#GPUREG_SH_FLOATUNIFORM_DATAi|GPUREG_VSH_FLOATUNIFORM_DATA5]]
 
|  
 
|  
|PICA_REG_VS_FLOAT_DATA6
+
|PICA_REG_VS_FLOAT_DATA5
 
|-
 
|-
 
| 02C7
 
| 02C7
| [[#GPUREG_VSH_FLOATUNIFORM_DATA|GPUREG_VSH_FLOATUNIFORM_DATA]]
+
| [[#GPUREG_SH_FLOATUNIFORM_DATAi|GPUREG_VSH_FLOATUNIFORM_DATA6]]
 
|  
 
|  
|PICA_REG_VS_FLOAT_DATA7
+
|PICA_REG_VS_FLOAT_DATA6
 
|-
 
|-
 
| 02C8
 
| 02C8
| [[#GPUREG_VSH_FLOATUNIFORM_DATA|GPUREG_VSH_FLOATUNIFORM_DATA]]
+
| [[#GPUREG_SH_FLOATUNIFORM_DATAi|GPUREG_VSH_FLOATUNIFORM_DATA7]]
 
|  
 
|  
|PICA_REG_VS_FLOAT_DATA8
+
|PICA_REG_VS_FLOAT_DATA7
 
|-
 
|-
 
| 02C9
 
| 02C9
Line 3,608: Line 3,714:
 
|-
 
|-
 
| 02CB
 
| 02CB
| [[#GPUREG_VSH_CODETRANSFER_CONFIG|GPUREG_VSH_CODETRANSFER_CONFIG]]
+
| [[#GPUREG_SH_CODETRANSFER_INDEX|GPUREG_VSH_CODETRANSFER_INDEX]]
 
| ?
 
| ?
 
|PICA_REG_VS_PROG_ADDR
 
|PICA_REG_VS_PROG_ADDR
 
|-
 
|-
 
| 02CC
 
| 02CC
| [[#GPUREG_VSH_CODETRANSFER_DATA|GPUREG_VSH_CODETRANSFER_DATA]]
+
| [[#GPUREG_SH_CODETRANSFER_DATAi|GPUREG_VSH_CODETRANSFER_DATA0]]
 
|  
 
|  
 
|PICA_REG_VS_PROG_DATA0
 
|PICA_REG_VS_PROG_DATA0
 
|-
 
|-
 
| 02CD
 
| 02CD
| [[#GPUREG_VSH_CODETRANSFER_DATA|GPUREG_VSH_CODETRANSFER_DATA]]
+
| [[#GPUREG_SH_CODETRANSFER_DATAi|GPUREG_VSH_CODETRANSFER_DATA1]]
 
|  
 
|  
 
|PICA_REG_VS_PROG_DATA1
 
|PICA_REG_VS_PROG_DATA1
 
|-
 
|-
 
| 02CE
 
| 02CE
| [[#GPUREG_VSH_CODETRANSFER_DATA|GPUREG_VSH_CODETRANSFER_DATA]]
+
| [[#GPUREG_SH_CODETRANSFER_DATAi|GPUREG_VSH_CODETRANSFER_DATA2]]
 
|  
 
|  
 
|PICA_REG_VS_PROG_DATA2
 
|PICA_REG_VS_PROG_DATA2
 
|-
 
|-
 
| 02CF
 
| 02CF
| [[#GPUREG_VSH_CODETRANSFER_DATA|GPUREG_VSH_CODETRANSFER_DATA]]
+
| [[#GPUREG_SH_CODETRANSFER_DATAi|GPUREG_VSH_CODETRANSFER_DATA3]]
 
|  
 
|  
 
|PICA_REG_VS_PROG_DATA3
 
|PICA_REG_VS_PROG_DATA3
 
|-
 
|-
 
| 02D0
 
| 02D0
| [[#GPUREG_VSH_CODETRANSFER_DATA|GPUREG_VSH_CODETRANSFER_DATA]]
+
| [[#GPUREG_SH_CODETRANSFER_DATAi|GPUREG_VSH_CODETRANSFER_DATA4]]
 
|  
 
|  
 
|PICA_REG_VS_PROG_DATA4
 
|PICA_REG_VS_PROG_DATA4
 
|-
 
|-
 
| 02D1
 
| 02D1
| [[#GPUREG_VSH_CODETRANSFER_DATA|GPUREG_VSH_CODETRANSFER_DATA]]
+
| [[#GPUREG_SH_CODETRANSFER_DATAi|GPUREG_VSH_CODETRANSFER_DATA5]]
 
|  
 
|  
 
|PICA_REG_VS_PROG_DATA5
 
|PICA_REG_VS_PROG_DATA5
 
|-
 
|-
 
| 02D2
 
| 02D2
| [[#GPUREG_VSH_CODETRANSFER_DATA|GPUREG_VSH_CODETRANSFER_DATA]]
+
| [[#GPUREG_SH_CODETRANSFER_DATAi|GPUREG_VSH_CODETRANSFER_DATA6]]
 
|  
 
|  
 
|PICA_REG_VS_PROG_DATA6
 
|PICA_REG_VS_PROG_DATA6
 
|-
 
|-
 
| 02D3
 
| 02D3
| [[#GPUREG_VSH_CODETRANSFER_DATA|GPUREG_VSH_CODETRANSFER_DATA]]
+
| [[#GPUREG_SH_CODETRANSFER_DATAi|GPUREG_VSH_CODETRANSFER_DATA7]]
 
|  
 
|  
 
|PICA_REG_VS_PROG_DATA7
 
|PICA_REG_VS_PROG_DATA7
Line 3,658: Line 3,764:
 
|-
 
|-
 
| 02D5
 
| 02D5
| [[#GPUREG_VSH_OPDESCS_CONFIG|GPUREG_VSH_OPDESCS_CONFIG]]
+
| [[#GPUREG_SH_OPDESCS_INDEX|GPUREG_VSH_OPDESCS_INDEX]]
 
| ?
 
| ?
 
|PICA_REG_VS_PROG_SWIZZLE_ADDR
 
|PICA_REG_VS_PROG_SWIZZLE_ADDR
 
|-
 
|-
 
| 02D6
 
| 02D6
| [[#GPUREG_VSH_OPDESCS_DATA|GPUREG_VSH_OPDESCS_DATA]]
+
| [[#GPUREG_SH_OPDESCS_DATAi|GPUREG_VSH_OPDESCS_DATA0]]
 
|  
 
|  
 
|PICA_REG_VS_PROG_SWIZZLE_DATA0
 
|PICA_REG_VS_PROG_SWIZZLE_DATA0
 
|-
 
|-
 
| 02D7
 
| 02D7
| [[#GPUREG_VSH_OPDESCS_DATA|GPUREG_VSH_OPDESCS_DATA]]
+
| [[#GPUREG_SH_OPDESCS_DATAi|GPUREG_VSH_OPDESCS_DATA1]]
 
|  
 
|  
 
|PICA_REG_VS_PROG_SWIZZLE_DATA1
 
|PICA_REG_VS_PROG_SWIZZLE_DATA1
 
|-
 
|-
 
| 02D8
 
| 02D8
| [[#GPUREG_VSH_OPDESCS_DATA|GPUREG_VSH_OPDESCS_DATA]]
+
| [[#GPUREG_SH_OPDESCS_DATAi|GPUREG_VSH_OPDESCS_DATA2]]
 
|  
 
|  
 
|PICA_REG_VS_PROG_SWIZZLE_DATA2
 
|PICA_REG_VS_PROG_SWIZZLE_DATA2
 
|-
 
|-
 
| 02D9
 
| 02D9
| [[#GPUREG_VSH_OPDESCS_DATA|GPUREG_VSH_OPDESCS_DATA]]
+
| [[#GPUREG_SH_OPDESCS_DATAi|GPUREG_VSH_OPDESCS_DATA3]]
 
|  
 
|  
 
|PICA_REG_VS_PROG_SWIZZLE_DATA3
 
|PICA_REG_VS_PROG_SWIZZLE_DATA3
 
|-
 
|-
 
| 02DA
 
| 02DA
| [[#GPUREG_VSH_OPDESCS_DATA|GPUREG_VSH_OPDESCS_DATA]]
+
| [[#GPUREG_SH_OPDESCS_DATAi|GPUREG_VSH_OPDESCS_DATA4]]
 
|  
 
|  
 
|PICA_REG_VS_PROG_SWIZZLE_DATA4
 
|PICA_REG_VS_PROG_SWIZZLE_DATA4
 
|-
 
|-
 
| 02DB
 
| 02DB
| [[#GPUREG_VSH_OPDESCS_DATA|GPUREG_VSH_OPDESCS_DATA]]
+
| [[#GPUREG_SH_OPDESCS_DATAi|GPUREG_VSH_OPDESCS_DATA5]]
 
|  
 
|  
 
|PICA_REG_VS_PROG_SWIZZLE_DATA5
 
|PICA_REG_VS_PROG_SWIZZLE_DATA5
 
|-
 
|-
 
| 02DC
 
| 02DC
| [[#GPUREG_VSH_OPDESCS_DATA|GPUREG_VSH_OPDESCS_DATA]]
+
| [[#GPUREG_SH_OPDESCS_DATAi|GPUREG_VSH_OPDESCS_DATA6]]
 
|  
 
|  
 
|PICA_REG_VS_PROG_SWIZZLE_DATA6
 
|PICA_REG_VS_PROG_SWIZZLE_DATA6
 
|-
 
|-
 
| 02DD
 
| 02DD
| [[#GPUREG_VSH_OPDESCS_DATA|GPUREG_VSH_OPDESCS_DATA]]
+
| [[#GPUREG_SH_OPDESCS_DATAi|GPUREG_VSH_OPDESCS_DATA7]]
 
|  
 
|  
 
|PICA_REG_VS_PROG_SWIZZLE_DATA7
 
|PICA_REG_VS_PROG_SWIZZLE_DATA7
|-
 
! colspan=4 | Unknown registers
 
 
|-
 
|-
 
| 02DE
 
| 02DE
Line 3,713: Line 3,817:
 
|  
 
|  
 
|
 
|
 +
|}
 +
 +
=== Unknown registers (0x2E0-0x2FF) ===
 +
 +
{| class="wikitable" border="1"
 +
! Register ID
 +
! Register name
 +
! Notes
 +
! Official Name
 
|-
 
|-
 
| 02E0
 
| 02E0
Line 3,874: Line 3,987:
 
|
 
|
 
|}
 
|}
 +
 +
== Miscellaneous registers ==
  
 
=== GPUREG_FINALIZE ===
 
=== GPUREG_FINALIZE ===
 +
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-31
 +
| unsigned, Trigger P3D Interrupt (0 = idle, non-zero = trigger)
 +
|}
  
 
Writing to this register seems to signal the GPU to stop processing GPU commands from the current buffer; any command following a write to this register will be ignored. The value written to this register does not appear to matter, although 0x12345678 is the value typically written by commercial software.
 
Writing to this register seems to signal the GPU to stop processing GPU commands from the current buffer; any command following a write to this register will be ignored. The value written to this register does not appear to matter, although 0x12345678 is the value typically written by commercial software.
 
Failure to write to this register in any command buffer will result in the GPU hanging.
 
Failure to write to this register in any command buffer will result in the GPU hanging.
  
=== GPUREG_DEPTHBUFFER_FORMAT ===
+
== Rasterizer registers ==
 +
 
 +
=== GPUREG_FACECULLING_CONFIG ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-1
 +
| unsigned, Culling mode
 +
|}
 +
 
 +
This register is used to configure the face culling mode.
  
The format the current depth buffer should be written into. Following values are possible:
+
Culling mode values:
  
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 3,889: Line 4,024:
 
|-
 
|-
 
| 0
 
| 0
| 16-bit depth
+
| None
 
|-
 
|-
 
| 1
 
| 1
| ?? seems to freeze the GPU
+
| Front Face (Counter Clockwise)
 
|-
 
|-
 
| 2
 
| 2
| 24-bit depth
+
| Back Face (Counter Clockwise)
|-
 
| 3
 
| 24-bit depth + 8-bit stencil (stencil is within bit 24-31)
 
 
|}
 
|}
  
=== GPUREG_COLORBUFFER_FORMAT ===
+
=== GPUREG_VIEWPORT_WIDTH ===
 
 
Describes the format of the current color buffer used for 3D rendering.
 
  
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 3,909: Line 4,039:
 
! Description
 
! Description
 
|-
 
|-
| 0-7
+
| 0-23
| Pixel size (0=16-bit, 1=24-bit, 2=32-bit, 3=64-bit?)
+
| float1.7.16, width / 2
 +
|}
 +
 
 +
This register is used to configure the viewport width, along with GPUREG_VIEWPORT_INVW.
 +
 
 +
=== GPUREG_VIEWPORT_INVW ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 
|-
 
|-
| 16-23
+
| 1-31
| Framebuffer Format (0=GL_RGBA8, 1=GL_RGB8, 2=GL_RGB5_A1, 3=GL_R5_G6_B5, 4=GL_RGBA4).
+
| float1.7.23, 2 / width
Note that these values are slightly different from those in [[GPU#Framebuffer_color_formats]].
+
|}
 +
 
 +
This register is used to configure the viewport width, along with GPUREG_VIEWPORT_WIDTH.
 +
 
 +
=== GPUREG_VIEWPORT_HEIGHT ===
  
Color components are laid out in reverse byte order, with the most significant bits used first.
+
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-23
 +
| float1.7.16, height / 2
 
|}
 
|}
  
=== GPUREG_GEOSTAGE_CONFIG ===
+
This register is used to configure the viewport height, along with GPUREG_VIEWPORT_INVH.
 +
 
 +
=== GPUREG_VIEWPORT_INVH ===
  
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 3,925: Line 4,075:
 
! Description
 
! Description
 
|-
 
|-
| 0-7
+
| 1-31
| Geometry stage mode. (0=Vertex shader only, 2=Vertex shader + geometry shader)
+
| float1.7.23, 2 / height
|-
 
| 0-7
 
| Unknown. Often set to 1.
 
|-
 
| 0-7
 
| Unknown.
 
|-
 
| 0-7
 
| Unknown. Often set to 0.
 
 
|}
 
|}
  
This register configures the geometry stage of the GPU pipeline.
+
This register is used to configure the viewport height, along with GPUREG_VIEWPORT_HEIGHT.
 
 
=== Geometry shader registers ===
 
  
==== GPUREG_GSH_BOOLUNIFORM ====
+
=== GPUREG_FRAGOP_CLIP ===
  
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 3,949: Line 4,088:
 
|-
 
|-
 
| 0
 
| 0
| Value of geometry shader unit's b0 boolean register. (0=true, 1=false)
+
| unsigned, Enabled (0 = disabled, 1 = enabled)
 +
|}
 +
 
 +
This register is used to enable clipping planes.
 +
 
 +
=== GPUREG_FRAGOP_CLIP_DATA''i'' ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 
|-
 
|-
| 1
+
| 0-23
| Value of geometry shader unit's b1 boolean register. (0=true, 1=false)
+
| float1.7.16, Clipping plane coefficient ''i''
 +
|}
 +
 
 +
This register is used to configure clipping plane coefficients.
 +
 
 +
=== GPUREG_DEPTHMAP_SCALE ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 
|-
 
|-
| 2
+
| 0-23
| Value of geometry shader unit's b2 boolean register. (0=true, 1=false)
+
| float1.7.16, Near - Far
|-
+
|}
| 3
+
 
| Value of geometry shader unit's b3 boolean register. (0=true, 1=false)
+
This register is used to configure the depth range scale.
|-
+
 
| 4
+
=== GPUREG_DEPTHMAP_OFFSET ===
| Value of geometry shader unit's b4 boolean register. (0=true, 1=false)
+
 
|-
+
{| class="wikitable" border="1"
| 5
+
! Bits
| Value of geometry shader unit's b5 boolean register. (0=true, 1=false)
+
! Description
|-
 
| 6
 
| Value of geometry shader unit's b6 boolean register. (0=true, 1=false)
 
|-
 
| 7
 
| Value of geometry shader unit's b7 boolean register. (0=true, 1=false)
 
|-
 
| 8
 
| Value of geometry shader unit's b8 boolean register. (0=true, 1=false)
 
|-
 
| 9
 
| Value of geometry shader unit's b9 boolean register. (0=true, 1=false)
 
|-
 
| 10
 
| Value of geometry shader unit's b10 boolean register. (0=true, 1=false)
 
|-
 
| 11
 
| Value of geometry shader unit's b11 boolean register. (0=true, 1=false)
 
|-
 
| 12
 
| Value of geometry shader unit's b12 boolean register. (0=true, 1=false)
 
|-
 
| 13
 
| Value of geometry shader unit's b13 boolean register. (0=true, 1=false)
 
|-
 
| 14
 
| Value of geometry shader unit's b14 boolean register. (0=true, 1=false)
 
|-
 
| 15
 
| Value of geometry shader unit's b15 boolean register. (0=true, 1=false)
 
 
|-
 
|-
| 16-31
+
| 0-23
| Unknown. This seems to always be set to 0x7FFF, and other values may cause the GPU to hang
+
| float1.7.16, Near + Polygon Offset
 
|}
 
|}
  
This register is used to set the geometry shader unit's boolean registers.
+
This register is used to configure the depth range bias.
  
==== GPUREG_GSH_INTUNIFORM_I0 ====
+
=== GPUREG_SH_OUTMAP_TOTAL ===
  
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 4,008: Line 4,135:
 
! Description
 
! Description
 
|-
 
|-
| 0-7
+
| 0-2
| Value for geometry shader's i0.x (u8, 0-255)
+
| unsigned, Number of following attributes
|-
 
| 8-15
 
| Value for geometry shader's i0.y (u8, 0-255)
 
|-
 
| 16-23
 
| Value for geometry shader's i0.z (u8, 0-255)
 
|-
 
| 24-31
 
| Value for geometry shader's i0.w (u8, 0-255)
 
 
|}
 
|}
  
This register is used to set the geometry shader's i0 integer register.
+
This register is used to configure the total shader output map attributes.
  
==== GPUREG_GSH_INTUNIFORM_I1 ====
+
=== GPUREG_SH_OUTMAP_O''i'' ===
  
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 4,029: Line 4,147:
 
! Description
 
! Description
 
|-
 
|-
| 0-7
+
| 0-4
| Value for geometry shader's i1.x (u8, 0-255)
+
| unsigned, Semantic for the x component of the register.
 
|-
 
|-
| 8-15
+
| 8-12
| Value for geometry shader's i1.y (u8, 0-255)
+
| unsigned, Semantic for the y component of the register.
 
|-
 
|-
| 16-23
+
| 16-20
| Value for geometry shader's i1.z (u8, 0-255)
+
| unsigned, Semantic for the z component of the register.
 
|-
 
|-
| 24-31
+
| 24-28
| Value for geometry shader's i1.w (u8, 0-255)
+
| unsigned, Semantic for the w component of the register.
 
|}
 
|}
  
This register is used to set the geometry shader's i1 integer register.
+
These registers map components of the corresponding vertex shader output register to specific fixed-function semantics.
  
==== GPUREG_GSH_INTUNIFORM_I2 ====
+
Semantic values:
  
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
! Bits
+
! Value
 +
! Semantic
 
! Description
 
! Description
 
|-
 
|-
| 0-7
+
| 0x00
| Value for geometry shader's i2.x (u8, 0-255)
+
| position.x
 +
| rowspan="4" | Vertex Position
 
|-
 
|-
| 8-15
+
| 0x01
| Value for geometry shader's i2.y (u8, 0-255)
+
| position.y
 
|-
 
|-
| 16-23
+
| 0x02
| Value for geometry shader's i2.z (u8, 0-255)
+
| position.z
 
|-
 
|-
| 24-31
+
| 0x03
| Value for geometry shader's i2.w (u8, 0-255)
+
| position.w
|}
+
|-
 +
| 0x04
 +
| normquat.x
 +
| rowspan="4" | Quaternion specifying the normal/tangent frame (for fragment lighting)
 +
|-
 +
| 0x05
 +
| normquat.y
 +
|-
 +
| 0x06
 +
| normquat.z
 +
|-
 +
| 0x07
 +
| normquat.w
 +
|-
 +
| 0x08
 +
| color.r
 +
| rowspan="4" | Vertex color
 +
|-
 +
| 0x09
 +
| color.g
 +
|-
 +
| 0x0A
 +
| color.b
 +
|-
 +
| 0x0B
 +
| color.a
 +
|-
 +
| 0x0C
 +
| texcoord0.u
 +
| rowspan="2" | Texture coordinates for texture 0
 +
|-
 +
| 0x0D
 +
| texcoord0.v
 +
|-
 +
| 0x0E
 +
| texcoord1.u
 +
| rowspan="2" | Texture coordinates for texture 1
 +
|-
 +
| 0x0F
 +
| texcoord1.v
 +
|-
 +
| 0x10
 +
| texcoord0.w
 +
|
  
This register is used to set the geometry shader's i2 integer register.
+
|-
 +
| 0x12
 +
| view.x
 +
| rowspan="3" | View vector (for fragment lighting)
 +
|-
 +
| 0x13
 +
| view.y
 +
|-
 +
| 0x14
 +
| view.z
  
==== GPUREG_GSH_INTUNIFORM_I3 ====
 
 
{| class="wikitable" border="1"
 
! Bits
 
! Description
 
 
|-
 
|-
| 0-7
+
| 0x16
| Value for geometry shader's i3.x (u8, 0-255)
+
| texcoord2.u
 +
| rowspan="2" | Texture coordinates for texture 2
 
|-
 
|-
| 8-15
+
| 0x17
| Value for geometry shader's i3.y (u8, 0-255)
+
| texcoord2.v
|-
+
 
| 16-23
 
| Value for geometry shader's i3.z (u8, 0-255)
 
 
|-
 
|-
| 24-31
+
| 0x1F
| Value for geometry shader's i3.w (u8, 0-255)
+
| Unused component
 +
| Should be set for unused components of the output register
 
|}
 
|}
  
This register is used to set the geometry shader's i3 integer register.
+
=== GPUREG_EARLYDEPTH_FUNC ===
 
 
==== GPUREG_GSH_INPUTBUFFER_CONFIG ====
 
  
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 4,092: Line 4,257:
 
! Description
 
! Description
 
|-
 
|-
| 0-7
+
| 0-1
| Input buffer stride minus 1, in float vec4 registers. (value 0 means a stride of 1 float vec4 register)
+
| unsigned, Early depth function
|-
 
| 8-23
 
| Unknown. These bits typically aren't updated by games.
 
|-
 
| 24-31
 
| Unknown. This is typically set to 8 for geometry shaders.
 
 
|}
 
|}
  
This register is used to configure the geometry shader's input buffer. In the context of a geometry shader, the stride parameter can be interpreted as the input primitive size in registers, though it is not a limit on the number of input registers which can be accessed from the geometry shader.
+
This register configures the early depth test function.
  
 
+
Early depth function values:
==== GPUREG_GSH_ENTRYPOINT ====
 
  
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
! Bits
+
! Value
 
! Description
 
! Description
 
|-
 
|-
| 0-15
+
| 0
| Geometry shader unit entrypoint, in words.
+
| >=
 +
|-
 +
| 1
 +
| >
 +
|-
 +
| 2
 +
| <=
 
|-
 
|-
| 16-31
+
| 3
| Unknown. This seems to always be set to 0x7FFF, and other values may cause the GPU to hang
+
| <
 
|}
 
|}
  
This sets the entrypoint for the program running on the single shader unit which can be dedicated to running geometry shaders, regardless of the current geometry stage mode. This is means that while this register is normally used to set the geometry shader entrypoint, it can also be used to set this single shader unit to run from a different entrypoint than the other three even when running a vertex shader.
+
=== GPUREG_EARLYDEPTH_TEST1 ===
 
 
==== GPUREG_GSH_ATTRIBUTES_PERMUTATION_LOW ====
 
  
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 4,126: Line 4,288:
 
! Description
 
! Description
 
|-
 
|-
| 0-3
+
| 0
| Index of geometry shader input register which the 1st attribute will be stored in.
+
| unsigned, Enabled (0 = disabled, 1 = enabled)
|-
 
| 4-7
 
| Index of geometry shader input register which the 2nd attribute will be stored in.
 
|-
 
| 8-11
 
| Index of geometry shader input register which the 3rd attribute will be stored in.
 
|-
 
| 12-15
 
| Index of geometry shader input register which the 4th attribute will be stored in.
 
|-
 
| 16-19
 
| Index of geometry shader input register which the 5th attribute will be stored in.
 
|-
 
| 20-23
 
| Index of geometry shader input register which the 6th attribute will be stored in.
 
|-
 
| 24-27
 
| Index of geometry shader input register which the 7th attribute will be stored in.
 
|-
 
| 28-31
 
| Index of geometry shader input register which the 8th attribute will be stored in.
 
 
|}
 
|}
  
This register sets the geometry shader input register index which will correspond to each attribute contained by the input buffer (which in the case of geometry shaders is the vertex shader output buffer) for the first 8 attributes.
+
This register sets whether the early depth test is enabled.
For example, having bits 0-3 set to 5 means that, in the geometry shader program, v5 will contain the input buffer's 1st attribute.
 
  
==== GPUREG_GSH_ATTRIBUTES_PERMUTATION_HIGH ====
+
=== GPUREG_EARLYDEPTH_CLEAR ===
  
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 4,160: Line 4,300:
 
! Description
 
! Description
 
|-
 
|-
| 0-3
+
| 0
| Index of geometry shader input register which the 9th attribute will be stored in.
+
| unsigned, Trigger (0 = idle, 1 = clear)
|-
 
| 4-7
 
| Index of geometry shader input register which the 10th attribute will be stored in.
 
|-
 
| 8-11
 
| Index of geometry shader input register which the 11th attribute will be stored in.
 
|-
 
| 12-15
 
| Index of geometry shader input register which the 12th attribute will be stored in.
 
|-
 
| 16-19
 
| Index of geometry shader input register which the 13th attribute will be stored in.
 
|-
 
| 20-23
 
| Index of geometry shader input register which the 14th attribute will be stored in.
 
|-
 
| 24-27
 
| Index of geometry shader input register which the 15th attribute will be stored in.
 
|-
 
| 28-31
 
| Index of geometry shader input register which the 16th attribute will be stored in.
 
 
|}
 
|}
  
This register sets the geometry shader input register index which will correspond to each attribute contained by the input buffer (which in the case of geometry shaders is the vertex shader output buffer) for attributes 8 through 15.
+
This register triggers clearing the early depth data.
For example, having bits 0-3 set to 5 means that, in the geometry shader program, v5 will contain the input buffer's 9th attribute.
 
  
==== GPUREG_GSH_OUTMAP_MASK ====
+
=== GPUREG_SH_OUTATTR_MODE ===
  
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 4,195: Line 4,313:
 
|-
 
|-
 
| 0
 
| 0
| Enable bit for geometry shader's o0 output register. (1 = o0 enabled, 0 = o0 disabled)
+
| unsigned, Use texture coordinates (0 = don't use, 1 = use)
|-
 
| 1
 
| Enable bit for geometry shader's o1 output register. (1 = o1 enabled, 0 = o1 disabled)
 
|-
 
| 2
 
| Enable bit for geometry shader's o2 output register. (1 = o2 enabled, 0 = o2 disabled)
 
|-
 
| 3
 
| Enable bit for geometry shader's o3 output register. (1 = o3 enabled, 0 = o3 disabled)
 
|-
 
| 4
 
| Enable bit for geometry shader's o4 output register. (1 = o4 enabled, 0 = o4 disabled)
 
|-
 
| 5
 
| Enable bit for geometry shader's o5 output register. (1 = o5 enabled, 0 = o5 disabled)
 
|-
 
| 6
 
| Enable bit for geometry shader's o6 output register. (1 = o6 enabled, 0 = o6 disabled)
 
 
|}
 
|}
  
This register toggles the geometry shader unit's output registers.
+
This register is used to configure the shader output attribute mode.
  
==== GPUREG_GSH_CODETRANSFER_END ====
+
=== GPUREG_SCISSORTEST_MODE ===
  
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 4,224: Line 4,324:
 
! Description
 
! Description
 
|-
 
|-
| 0
+
| 0-1
| Code data transfer end signal bit.
+
| unsigned, Enabled (0 = disabled, 3 = enabled)
 
|}
 
|}
  
This register's value should be set to 1 in order to finalize the transfer of geometry shader code. It is unknown whether this register is used for other functions.
+
This register is used to enable scissor testing.
  
==== GPUREG_GSH_FLOATUNIFORM_CONFIG ====
+
=== GPUREG_SCISSORTEST_POS ===
  
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 4,236: Line 4,336:
 
! Description
 
! Description
 
|-
 
|-
| 0-6
+
| 0-9
| Target float vec4 geometry shader uniform ID for transfer. (range 0-95, where 0 = c0 and 95 = c95)
+
| unsigned, X1
 
|-
 
|-
| 31
+
| 16-25
| Float vec4 geometry shader uniform data transfer mode. (0 = float24, 1 = float32)
+
| unsigned, Y1
 
|}
 
|}
  
This register sets the target float vec4 geometry shader uniform ID and transfer mode for the data transfer system. As such it is typically used right before [[#GPUREG_GSH_FLOATUNIFORM_DATA|GPUREG_GSH_FLOATUNIFORM_DATA]], though writing to one register does not make writing to the other mandatory.
+
This register is used to configure the scissor test start position.
  
==== GPUREG_GSH_FLOATUNIFORM_DATA ====
+
=== GPUREG_SCISSORTEST_DIM ===
  
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 4,251: Line 4,351:
 
! Description
 
! Description
 
|-
 
|-
| 0-31
+
| 0-9
| Float vec4 geometry shader uniform data. (format depends on transfer mode, see below for details)
+
| unsigned, X2
 +
|-
 +
| 16-25
 +
| unsigned, Y2
 
|}
 
|}
  
This register is used to set the value of float vec4 geometry shader uniform registers. The data format which should be written to it depends on the transfer mode set with [[#GPUREG_GSH_FLOATUNIFORM_CONFIG|GPUREG_GSH_FLOATUNIFORM_CONFIG]]. This register functions as a FIFO queue : after each time a uniform register is successfully set, the target uniform ID value is incremented, meaning that groups of uniforms with contiguous register IDs can be set with only one initial write to [[#GPUREG_GSH_FLOATUNIFORM_CONFIG|GPUREG_GSH_FLOATUNIFORM_CONFIG]].
+
This register is used to configure the scissor test end position.
 
 
* In the case of float24 transfer mode, data should be sent by writing three words which are the concatenation of the float24 value of the uniform register's 4 components, in the reverse order. Assuming each letter corresponds to 4 bits, the format becomes :
 
** first word : ZZWWWWWW
 
** second word : YYYYZZZZ
 
** third word : XXXXXXYY
 
* In the case of float32 transfer mode, data should be sent by writing four words which are each the float32 value of the uniform register's 4 components, in the reverse order.
 
  
==== GPUREG_GSH_CODETRANSFER_CONFIG ====
+
=== GPUREG_VIEWPORT_XY ===
  
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 4,269: Line 4,366:
 
! Description
 
! Description
 
|-
 
|-
| 0-11
+
| 0-9
| Target geometry shader code offset for data transfer.
+
| signed, X
 +
|-
 +
| 16-25
 +
| signed, Y
 
|}
 
|}
  
This register is used to set the offset at which upcoming geometry shader code data transferred through [[#GPUREG_GSH_CODETRANSFER_DATA|GPUREG_GSH_CODETRANSFER_DATA]] should be written.
+
This register is used to configure the viewport position.
 
 
NOTE : as we do not yet know what a shader program's maximum size is yet, we also do not know how many bits the code offset parameter holds. The biggest shader binary observed so far was 2422 instructions long. The [[Shader_Instruction_Set#Instruction_formats|shader control flow instructions]] only have room to address 12 bits though, so it's likely that the maximum is 4095.
 
  
==== GPUREG_GSH_CODETRANSFER_DATA ====
+
=== GPUREG_EARLYDEPTH_DATA ===
  
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 4,283: Line 4,381:
 
! Description
 
! Description
 
|-
 
|-
| 0-31
+
| 0-23
| Geometry shader instruction data.
+
| unsigned, Clear value
 
|}
 
|}
  
This register is used to transfer geometry shader code data. This register behaves as a FIFO queue : each write to this register writes the provided value to the GPU geometry shader code memory bank at the offset initially set by [[#GPUREG_GSH_CODETRANSFER_CONFIG|GPUREG_GSH_CODETRANSFER_CONFIG]]. The offset in question is incremented after each write to this register.
+
This register is used to configure the early depth clear value.
  
==== GPUREG_GSH_OPDESCS_CONFIG ====
+
=== GPUREG_DEPTHMAP_ENABLE ===
  
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 4,295: Line 4,393:
 
! Description
 
! Description
 
|-
 
|-
| 0-6
+
| 0
| Target geometry shader operand descriptor offset for data transfer.
+
| unsigned, Enabled (0 = disabled, 1 = enabled)
 
|}
 
|}
  
This register is used to set the offset at which upcoming geometry shader operand descriptor data transferred through [[#GPUREG_GSH_OPDESCS_DATA|GPUREG_GSH_OPDESCS_DATA]] should be written.
+
This register is used to enable depth range.
  
==== GPUREG_GSH_OPDESCS_DATA ====
+
=== GPUREG_RENDERBUF_DIM ===
  
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 4,307: Line 4,405:
 
! Description
 
! Description
 
|-
 
|-
| 0-31
+
| 0-10
| Geometry shader operand descriptor data.
+
| unsigned, Width
 +
|-
 +
| 12-21
 +
| unsigned, Height - 1
 +
|-
 +
| 24
 +
| 0x1
 
|}
 
|}
  
This register is used to transfer geometry shader operand descriptor data. This register behaves as a FIFO queue : each write to this register writes the provided value to the GPU geometry shader operand descriptor memory bank at the offset initially set by [[#GPUREG_GSH_OPDESCS_CONFIG|GPUREG_GSH_OPDESCS_CONFIG]]. The offset in question is incremented after each write to this register.
+
This register is used to configure the output framebuffer dimensions.
 
 
=== Vertex shader registers ===
 
  
==== GPUREG_VSH_BOOLUNIFORM ====
+
=== GPUREG_SH_OUTATTR_CLOCK ===
  
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 4,322: Line 4,424:
 
|-
 
|-
 
| 0
 
| 0
| Value of vertex shader unit's b0 boolean register. (0=true, 1=false)
+
| unsigned, 'position.z' present (0 = absent, 1 = present)
 
|-
 
|-
 
| 1
 
| 1
| Value of vertex shader unit's b1 boolean register. (0=true, 1=false)
+
| unsigned, 'color' component present (0 = absent, 1 = present)
|-
 
| 2
 
| Value of vertex shader unit's b2 boolean register. (0=true, 1=false)
 
|-
 
| 3
 
| Value of vertex shader unit's b3 boolean register. (0=true, 1=false)
 
|-
 
| 4
 
| Value of vertex shader unit's b4 boolean register. (0=true, 1=false)
 
|-
 
| 5
 
| Value of vertex shader unit's b5 boolean register. (0=true, 1=false)
 
|-
 
| 6
 
| Value of vertex shader unit's b6 boolean register. (0=true, 1=false)
 
|-
 
| 7
 
| Value of vertex shader unit's b7 boolean register. (0=true, 1=false)
 
 
|-
 
|-
 
| 8
 
| 8
| Value of vertex shader unit's b8 boolean register. (0=true, 1=false)
+
| unsigned, 'texcoord0' component present (0 = absent, 1 = present)
 
|-
 
|-
 
| 9
 
| 9
| Value of vertex shader unit's b9 boolean register. (0=true, 1=false)
+
| unsigned, 'texcoord1' component present (0 = absent, 1 = present)
 
|-
 
|-
 
| 10
 
| 10
| Value of vertex shader unit's b10 boolean register. (0=true, 1=false)
+
| unsigned, 'texcoord2' component present (0 = absent, 1 = present)
|-
 
| 11
 
| Value of vertex shader unit's b11 boolean register. (0=true, 1=false)
 
|-
 
| 12
 
| Value of vertex shader unit's b12 boolean register. (0=true, 1=false)
 
 
|-
 
|-
| 13
+
| 16
| Value of vertex shader unit's b13 boolean register. (0=true, 1=false)
+
| unsigned, 'texcoord0.w' present (0 = absent, 1 = present)
 
|-
 
|-
| 14
+
| 24
| Value of vertex shader unit's b14 boolean register. (0=true, 1=false)
+
| unsigned, 'normquat' or 'view' component present (0 = absent, 1 = present)
|-
 
| 15
 
| Value of vertex shader unit's b15 boolean register. (0=true, 1=false)
 
|-
 
| 16-31
 
| Unknown. This seems to always be set to 0x7FFF, and other values may cause the GPU to hang
 
 
|}
 
|}
  
This register is used to set the vertex shader unit's boolean registers.
+
This register controls the clock supply to parts relating to certain attributes.
 +
 
 +
== Texturing registers ==
  
==== GPUREG_VSH_INTUNIFORM_I0 ====
+
=== GPUREG_TEXUNIT_CONFIG ===
  
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 4,381: Line 4,455:
 
! Description
 
! Description
 
|-
 
|-
| 0-7
+
| 0
| Value for vertex shader's i0.x (u8, 0-255)
+
| unsigned, Texture 0 enabled (0 = disabled, 1 = enabled)
 
|-
 
|-
| 8-15
+
| 1
| Value for vertex shader's i0.y (u8, 0-255)
+
| unsigned, Texture 1 enabled (0 = disabled, 1 = enabled)
 
|-
 
|-
| 16-23
+
| 2
| Value for vertex shader's i0.z (u8, 0-255)
+
| unsigned, Texture 2 enabled (0 = disabled, 1 = enabled)
 
|-
 
|-
| 24-31
+
| 3
| Value for vertex shader's i0.w (u8, 0-255)
+
| 0x0
|}
+
|-
 
+
| 8-9
This register is used to set the vertex shader's i0 integer register.
+
| unsigned, Texture 3 coordinates
 
+
|-
==== GPUREG_VSH_INTUNIFORM_I1 ====
+
| 10
 
+
| unsigned, Texture 3 enabled (0 = disabled, 1 = enabled)
{| class="wikitable" border="1"
+
|-
! Bits
+
| 12
! Description
+
| 0x1
|-
+
|-
| 0-7
+
| 13
| Value for vertex shader's i1.x (u8, 0-255)
+
| unsigned, Texture 2 coordinates
 +
|-
 +
| 16
 +
| unsigned, Clear texture cache (0 = don't clear, 1 = clear)
 +
|-
 +
| 17-31
 +
| 0x0
 +
|}
 +
 
 +
This register is used to enable texture units.
 +
 
 +
Texture 3 coordinates values:
 +
 
 +
{| class="wikitable" border="1"
 +
! Value
 +
! Description
 +
|-
 +
| 0
 +
| Texture 0
 +
|-
 +
| 1
 +
| Texture 1
 +
|-
 +
| 2
 +
| Texture 2
 +
|}
 +
 
 +
Texture 2 coordinates values:
 +
 
 +
{| class="wikitable" border="1"
 +
! Value
 +
! Description
 +
|-
 +
| 0
 +
| Texture 2
 +
|-
 +
| 1
 +
| Texture 1
 +
|}
 +
 
 +
=== GPUREG_TEXUNIT''i''_BORDER_COLOR ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-7
 +
| unsigned, Red
 +
|-
 +
| 8-15
 +
| unsigned, Green
 +
|-
 +
| 16-23
 +
| unsigned, Blue
 +
|-
 +
| 24-31
 +
| unsigned, Alpha
 +
|}
 +
 
 +
This register is used to set a texture unit's border color.
 +
 
 +
=== GPUREG_TEXUNIT''i''_DIM ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-10
 +
| unsigned, Height
 +
|-
 +
| 16-26
 +
| unsigned, Width
 +
|}
 +
 
 +
This register is used to set a texture unit's dimensions.
 +
 
 +
=== GPUREG_TEXUNIT''i''_PARAM ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 1
 +
| unsigned, Magnification filter
 +
|-
 +
| 2
 +
| unsigned, Minification filter
 +
|-
 +
| 4-5
 +
| unsigned, ETC1 (0 = not ETC1, 2 = ETC1) note: still 0 for ETC1A4
 +
|-
 +
| 8-10
 +
| unsigned, Wrap T
 +
|-
 +
| 12-14
 +
| unsigned, Wrap S
 +
|-
 +
| 16-17
 +
| 0x0
 +
|-
 +
| 20
 +
| unsigned, Shadow (Texture 0 only, 0 = not shadow, 1 = shadow)
 +
|-
 +
| 24
 +
| unsigned, Mipmap filter
 +
|-
 +
| 28-30
 +
| unsigned, Type (Texture 0 only)
 +
|}
 +
 
 +
This register is used to set a texture unit's extra parameters.
 +
 
 +
Filter values:
 +
 
 +
{| class="wikitable" border="1"
 +
! Value
 +
! Description
 +
|-
 +
| 0
 +
| Nearest
 +
|-
 +
| 1
 +
| Linear
 +
|}
 +
 
 +
Wrap values:
 +
 
 +
{| class="wikitable" border="1"
 +
! Value
 +
! Description
 +
|-
 +
| 0
 +
| Clamp to edge
 +
|-
 +
| 1
 +
| Clamp to border
 +
|-
 +
| 2
 +
| Repeat
 +
|-
 +
| 3
 +
| Mirrored repeat
 +
|}
 +
 
 +
Type values:
 +
 
 +
{| class="wikitable" border="1"
 +
! Value
 +
! Description
 +
|-
 +
| 0
 +
| 2D
 +
|-
 +
| 1
 +
| Cube map
 +
|-
 +
| 2
 +
| Shadow 2D
 +
|-
 +
| 3
 +
| Projection
 +
|-
 +
| 4
 +
| Shadow cube
 +
|-
 +
| 5
 +
| Disabled
 +
|}
 +
 
 +
=== GPUREG_TEXUNIT''i''_LOD ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-12
 +
| fixed1.4.8, Bias
 +
|-
 +
| 16-19
 +
| unsigned, Max Level
 +
|-
 +
| 24-27
 +
| unsigned, Min Level
 +
|}
 +
 
 +
This register is used to configure a texture unit's level of detail.
 +
 
 +
=== GPUREG_TEXUNIT''i''_ADDR''i'' ===
 +
 
 +
First ADDR register:
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-27
 +
| unsigned, Texture physical address >> 3
 +
|}
 +
 
 +
Subsequent ADDR registers:
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-21
 +
| unsigned, Texture physical address >> 3 (upper 6 bits reused from first ADDR register)
 +
|}
 +
 
 +
This register is used to set a texture unit's physical address(es) in memory. Individual texels in a texture are laid out in memory as a [http://en.wikipedia.org/wiki/Z-order_curve Z-order curve]. Mipmap data is stored directly following the main texture data.
 +
 
 +
If the texture is a cube:
 +
 
 +
{| class="wikitable" border="1"
 +
! Register
 +
! Description
 +
|-
 +
| ADDR1
 +
| Positive X
 +
|-
 +
| ADDR2
 +
| Negative X
 +
|-
 +
| ADDR3
 +
| Positive Y
 +
|-
 +
| ADDR4
 +
| Negative Y
 +
|-
 +
| ADDR5
 +
| Positive Z
 +
|-
 +
| ADDR6
 +
| Negative Z
 +
|}
 +
 
 +
Otherwise, ADDR(1) points to a 2D texture, and the rest are empty.
 +
 
 +
=== GPUREG_TEXUNIT''i''_SHADOW ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0
 +
| unsigned, Perspective (0 = perspective, 1 = not perspective)
 +
|-
 +
| 1-23
 +
| fixed0.0.24, Z bias (upper 23 bits)
 +
|}
 +
 
 +
This register is used to set a texture unit's shadow texture properties.
 +
 
 +
=== GPUREG_TEXUNIT''i''_TYPE ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-3
 +
| unsigned, Format
 +
|}
 +
 
 +
This register is used to set a texture unit's data format.
 +
 
 +
Format values:
 +
 
 +
{| class="wikitable" border="1"
 +
!  Value
 +
!  Description
 +
!  GL Format
 +
!  GL Data Type
 +
|-
 +
| 0x0
 +
| RGBA8888
 +
| GL_RGBA
 +
| GL_UNSIGNED_BYTE
 +
|-
 +
| 0x1
 +
| RGB888
 +
| GL_RGB
 +
| GL_UNSIGNED_BYTE
 +
|-
 +
| 0x2
 +
| RGBA5551
 +
| GL_RGBA
 +
| GL_UNSIGNED_SHORT_5_5_5_1
 +
|-
 +
| 0x3
 +
| RGB565
 +
| GL_RGB
 +
| GL_UNSIGNED_SHORT_5_6_5
 +
|-
 +
| 0x4
 +
| RGBA4444
 +
| GL_RGBA
 +
| GL_UNSIGNED_SHORT_4_4_4_4
 +
|-
 +
| 0x5
 +
| IA8
 +
| GL_LUMINANCE_ALPHA
 +
| GL_UNSIGNED_BYTE
 +
|-
 +
| 0x6
 +
| HILO8
 +
|
 +
|
 +
|-
 +
| 0x7
 +
| I8
 +
| GL_LUMINANCE
 +
| GL_UNSIGNED_BYTE
 +
|-
 +
| 0x8
 +
| A8
 +
| GL_ALPHA
 +
| GL_UNSIGNED_BYTE
 +
|-
 +
| 0x9
 +
| IA44
 +
| GL_LUMINANCE_ALPHA
 +
| GL_UNSIGNED_BYTE_4_4_EXT
 +
|-
 +
| 0xA
 +
| I4
 +
|
 +
|
 +
|-
 +
| 0xB
 +
| A4
 +
| GL_ALPHA
 +
| GL_UNSIGNED_NIBBLE_EXT
 +
|-
 +
| 0xC
 +
| ETC1
 +
| GL_ETC1_RGB8_OES
 +
|
 +
|-
 +
| 0xD
 +
| ETC1A4
 +
|
 +
|
 +
|}
 +
 
 +
=== GPUREG_LIGHTING_ENABLE0 ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0
 +
| unsigned, Enabled (0 = disabled, 1 = enabled)
 +
|}
 +
 
 +
This register is used to enable lighting.
 +
 
 +
=== GPUREG_TEXUNIT3_PROCTEX0 ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-2
 +
| unsigned, U-direction clamp
 +
|-
 +
| 3-5
 +
| unsigned, V-direction clamp
 +
|-
 +
| 6-9
 +
| unsigned, RGB mapping function
 +
|-
 +
| 10-13
 +
| unsigned, Alpha mapping function
 +
|-
 +
| 14
 +
| unsigned, Handle alpha separately (0 = don't separate, 1 = separate)
 +
|-
 +
| 15
 +
| unsigned, Noise enabled (0 = disabled, 1 = enabled)
 +
|-
 +
| 16-17
 +
| unsigned, U-direction shift
 +
|-
 +
| 18-19
 +
| unsigned, V-direction shift
 +
|-
 +
| 20-27
 +
| float1.5.10, Texture bias (lower 8 bits)
 +
|}
 +
 
 +
This register is used to configure the procedural texture unit.
 +
 
 +
Clamp values:
 +
 
 +
{| class="wikitable" border="1"
 +
! Value
 +
! Description
 +
|-
 +
| 0
 +
| Clamp to zero
 +
|-
 +
| 1
 +
| Clamp to edge
 +
|-
 +
| 2
 +
| Symmetrical repeat
 +
|-
 +
| 3
 +
| Mirrored repeat
 +
|-
 +
| 4
 +
| Pulse
 +
|}
 +
 
 +
Mapping function values:
 +
 
 +
{| class="wikitable" border="1"
 +
! Value
 +
! Description
 +
|-
 +
| 0
 +
| U
 +
|-
 +
| 1
 +
| U²
 +
|-
 +
| 2
 +
| V
 +
|-
 +
| 3
 +
| V²
 +
|-
 +
| 4
 +
| (U + V) / 2
 +
|-
 +
| 5
 +
| (U² + V²) / 2
 +
|-
 +
| 6
 +
| sqrt(U² + V²)
 +
|-
 +
| 7
 +
| Minimum
 +
|-
 +
| 8
 +
| Maximum
 +
|-
 +
| 9
 +
| Rmax
 +
|}
 +
 
 +
Shift values:
 +
 
 +
{| class="wikitable" border="1"
 +
! Value
 +
! Description
 +
|-
 +
| 0
 +
| None
 +
|-
 +
| 1
 +
| Odd
 +
|-
 +
| 2
 +
| Even
 +
|}
 +
 
 +
=== GPUREG_TEXUNIT3_PROCTEX1 ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-15
 +
| fixed1.3.12, U-direction noise amplitude
 +
|-
 +
| 16-31
 +
| float1.5.10, U-direction noise phase
 +
|}
 +
 
 +
This register is used to configure the procedural texture unit's U-direction noise amplitude/phase.
 +
 
 +
=== GPUREG_TEXUNIT3_PROCTEX2 ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-15
 +
| fixed1.3.12, V-direction noise amplitude
 +
|-
 +
| 16-31
 +
| float1.5.10, V-direction noise phase
 +
|}
 +
 
 +
This register is used to configure the procedural texture unit's V-direction noise amplitude/phase.
 +
 
 +
=== GPUREG_TEXUNIT3_PROCTEX3 ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-15
 +
| float1.5.10, U-direction noise frequency
 +
|-
 +
| 16-31
 +
| float1.5.10, V-direction noise frequency
 +
|}
 +
 
 +
This register is used to configure the procedural texture unit's U-direction and V-direction noise frequency.
 +
 
 +
=== GPUREG_TEXUNIT3_PROCTEX4 ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-2
 +
| unsigned, Minification filter
 +
|-
 +
| 3-6
 +
| Min LOD (usually 0)
 +
|-
 +
| 7-10
 +
| Max LOD (usually 6)
 +
|-
 +
| 11-18
 +
| unsigned, Texture width
 +
|-
 +
| 19-26
 +
| float1.5.10, Texture bias (upper 8 bits)
 +
|}
 +
 
 +
This register is used to configure the procedural texture unit.
 +
 
 +
Minification filter values:
 +
 
 +
{| class="wikitable" border="1"
 +
! Value
 +
! Description
 +
|-
 +
| 0
 +
| Nearest
 +
|-
 +
| 1
 +
| Linear
 +
|-
 +
| 2
 +
| Nearest, Mipmap Nearest
 +
|-
 +
| 3
 +
| Linear, Mipmap Nearest
 +
|-
 +
| 4
 +
| Nearest, Mipmap Linear
 +
|-
 +
| 5
 +
| Linear, Mipmap Linear
 +
|}
 +
 
 +
=== GPUREG_TEXUNIT3_PROCTEX5 ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-7
 +
| unsigned, Texture offset (Mipmap level 0 / base level)
 +
|-
 +
| 8-15
 +
| unsigned, mipmap level 1 offset (usually 0x80)
 +
|-
 +
| 16-23
 +
| unsigned, mipmap level 2 offset (usually 0xC0)
 +
|-
 +
| 24-31
 +
| unsigned, mipmap level 3 offset (usually 0xE0)
 +
|}
 +
 
 +
This register is used to set the procedural texture unit's offset. Mipmap level 4-7 seems to be hardcoded at offset 0xF0, 0xF8, 0xFC and 0xFE .
 +
 
 +
=== GPUREG_PROCTEX_LUT ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-7
 +
| unsigned, Index
 +
|-
 +
| 8-11
 +
| unsigned, Reference table
 +
|}
 +
 
 +
This register is used to set which look-up table to write to, with GPUREG_PROCTEX_LUT_DATA''i'', at what index.
 +
 
 +
Reference table values:
 +
 
 +
{| class="wikitable" border="1"
 +
! Value
 +
! Description
 +
|-
 +
| 0
 +
| Noise table
 +
|-
 +
| 2
 +
| RGB mapping function table
 +
|-
 +
| 3
 +
| Alpha mapping function table
 +
|-
 +
| 4
 +
| Color table
 +
|-
 +
| 5
 +
| Color difference table
 +
|}
 +
 
 +
=== GPUREG_PROCTEX_LUT_DATA''i'' ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-31
 +
| LUT data
 +
|}
 +
 
 +
These registers behave as a FIFO queue. Each write to these registers writes the provided value to the table selected with GPUREG_PROCTEX_LUT, starting at the selected index.
 +
 
 +
==== Noise Table ====
 +
 
 +
128 elements:
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-11
 +
| fixed0.0.12, Value
 +
|-
 +
| 12-23
 +
| fixed0.0.12 with two's complement ( [0.5,1.0) mapped to [-1.0,0) ), Difference from next element
 +
|}
 +
 
 +
==== RGB Mapping Function Table ====
 +
 
 +
128 elements:
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-11
 +
| fixed0.0.12, Value
 +
|-
 +
| 12-23
 +
| fixed0.0.12 with two's complement, Difference from next element
 +
|}
 +
 
 +
==== Alpha Mapping Function Table ====
 +
 
 +
128 elements:
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-11
 +
| fixed0.0.12, Value
 +
|-
 +
| 12-23
 +
| fixed0.0.12 with two's complement, Difference from next element
 +
|}
 +
 
 +
==== Color Table ====
 +
 
 +
256 elements:
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-7
 +
| unsigned, Red
 +
|-
 +
| 8-15
 +
| unsigned, Green
 +
|-
 +
| 16-23
 +
| unsigned, Blue
 +
|-
 +
| 24-31
 +
| unsigned, Alpha
 +
|}
 +
 
 +
==== Color Difference Table ====
 +
 
 +
256 elements:
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-7
 +
| signed, Half of red difference between current and next color table elements
 +
|-
 +
| 8-15
 +
| signed, Half of green difference between current and next color table elements
 +
|-
 +
| 16-23
 +
| signed, Half of blue difference between current and next color table elements
 +
|-
 +
| 24-31
 +
| signed, Half of alpha difference between current and next color table elements
 +
|}
 +
 
 +
=== GPUREG_TEXENV''i''_SOURCE ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-3
 +
| unsigned, RGB source 0
 +
|-
 +
| 4-7
 +
| unsigned, RGB source 1
 +
|-
 +
| 8-11
 +
| unsigned, RGB source 2
 +
|-
 +
| 16-19
 +
| unsigned, Alpha source 0
 +
|-
 +
| 20-23
 +
| unsigned, Alpha source 1
 +
|-
 +
| 24-27
 +
| unsigned, Alpha source 2
 +
|}
 +
 
 +
This register configures a texture combiner's sources.
 +
 
 +
Source values:
 +
 
 +
{| class="wikitable" border="1"
 +
! Value
 +
! Description
 +
|-
 +
| 0
 +
| Primary color
 +
|-
 +
| 1
 +
| Fragment primary color
 +
|-
 +
| 2
 +
| Fragment secondary color
 +
|-
 +
| 3
 +
| Texture 0
 +
|-
 +
| 4
 +
| Texture 1
 +
|-
 +
| 5
 +
| Texture 2
 +
|-
 +
| 6
 +
| Texture 3
 +
|-
 +
| 13
 +
| Previous buffer
 +
|-
 +
| 14
 +
| Constant (from GPUREG_TEXENV''i''_COLOR)
 +
|-
 +
| 15
 +
| Previous
 +
|}
 +
 
 +
=== GPUREG_TEXENV''i''_OPERAND ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-3
 +
| unsigned, RGB operand 0
 +
|-
 +
| 4-7
 +
| unsigned, RGB operand 1
 +
|-
 +
| 8-11
 +
| unsigned, RGB operand 2
 +
|-
 +
| 12-14
 +
| unsigned, Alpha operand 0
 +
|-
 +
| 16-18
 +
| unsigned, Alpha operand 1
 +
|-
 +
| 20-22
 +
| unsigned, Alpha operand 2
 +
|}
 +
 
 +
This register configures a texture combiner's operands.
 +
 
 +
RGB operand values:
 +
 
 +
{| class="wikitable" border="1"
 +
! Value
 +
! Description
 +
|-
 +
| 0
 +
| Source color
 +
|-
 +
| 1
 +
| One minus source color
 +
|-
 +
| 2
 +
| Source alpha
 +
|-
 +
| 3
 +
| One minus source alpha
 +
|-
 +
| 4
 +
| Source red
 +
|-
 +
| 5
 +
| One minus source red
 +
|-
 +
| 8
 +
| Source green
 +
|-
 +
| 9
 +
| One minus source green
 +
|-
 +
| 12
 +
| Source blue
 +
|-
 +
| 13
 +
| One minus source blue
 +
|}
 +
 
 +
Alpha operand values:
 +
 
 +
{| class="wikitable" border="1"
 +
! Value
 +
! Description
 +
|-
 +
| 0
 +
| Source alpha
 +
|-
 +
| 1
 +
| One minus source alpha
 +
|-
 +
| 2
 +
| Source red
 +
|-
 +
| 3
 +
| One minus source red
 +
|-
 +
| 4
 +
| Source green
 +
|-
 +
| 5
 +
| One minus source green
 +
|-
 +
| 6
 +
| Source blue
 +
|-
 +
| 7
 +
| One minus source blue
 +
|}
 +
 
 +
=== GPUREG_TEXENV''i''_COMBINER ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-3
 +
| unsigned, RGB combine
 +
|-
 +
| 16-19
 +
| unsigned, Alpha combine
 +
|}
 +
 
 +
This register configures a texture combiner's combine mode.
 +
 
 +
Combine values:
 +
 
 +
{| class="wikitable" border="1"
 +
! Value
 +
! Description
 +
|-
 +
| 0
 +
| Replace
 +
|-
 +
| 1
 +
| Modulate
 +
|-
 +
| 2
 +
| Add
 +
|-
 +
| 3
 +
| Add signed
 +
|-
 +
| 4
 +
| Interpolate
 +
|-
 +
| 5
 +
| Subtract
 +
|-
 +
| 6
 +
| Dot3 RGB
 +
|-
 +
| 7
 +
| Dot3 RGBA
 +
|-
 +
| 8
 +
| Multiply then add
 +
|-
 +
| 9
 +
| Add then multiply
 +
|}
 +
 
 +
=== GPUREG_TEXENV''i''_COLOR ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-7
 +
| unsigned, Red
 +
|-
 +
| 8-15
 +
| unsigned, Green
 +
|-
 +
| 16-23
 +
| unsigned, Blue
 +
|-
 +
| 24-31
 +
| unsigned, Alpha
 +
|}
 +
 
 +
This register configures a texture combiner's constant color.
 +
 
 +
=== GPUREG_TEXENV''i''_SCALE ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-1
 +
| unsigned, RGB scale
 +
|-
 +
| 16-17
 +
| unsigned, Alpha scale
 +
|}
 +
 
 +
This register configures a texture combiner's scale value.
 +
 
 +
Scale values:
 +
 
 +
{| class="wikitable" border="1"
 +
! Value
 +
! Description
 +
|-
 +
| 0
 +
| 1x
 +
|-
 +
| 1
 +
| 2x
 +
|-
 +
| 2
 +
| 4x
 +
|}
 +
 
 +
=== GPUREG_TEXENV_UPDATE_BUFFER ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-2
 +
| unsigned, Fog mode
 +
|-
 +
| 3
 +
| unsigned, Shading density source
 +
|-
 +
| 8
 +
| unsigned, TexEnv 1 RGB buffer input
 +
|-
 +
| 9
 +
| unsigned, TexEnv 2 RGB buffer input
 +
|-
 +
| 10
 +
| unsigned, TexEnv 3 RGB buffer input
 +
|-
 +
| 11
 +
| unsigned, TexEnv 4 RGB buffer input
 +
|-
 +
| 12
 +
| unsigned, TexEnv 1 alpha buffer input
 +
|-
 +
| 13
 +
| unsigned, TexEnv 2 alpha buffer input
 +
|-
 +
| 14
 +
| unsigned, TexEnv 3 alpha buffer input
 +
|-
 +
| 15
 +
| unsigned, TexEnv 4 alpha buffer input
 +
|-
 +
| 16
 +
| unsigned, Z flip (0 = don't flip, 1 = flip)
 +
|-
 +
| 24-25
 +
| 0x0
 +
|}
 +
 
 +
This register is shared between the gas/fog mode configuration and texture combiner buffer inputs. Texture combiner buffer inputs are typically written with a mask of 0x2, and the gas/fog mode configuration is typically written with a mask of 0x5.
 +
 
 +
Fog mode values:
 +
 
 +
{| class="wikitable" border="1"
 +
! Value
 +
! Description
 +
|-
 +
| 0
 +
| Disabled
 +
|-
 +
| 5
 +
| Fog
 +
|-
 +
| 7
 +
| Gas
 +
|}
 +
 
 +
Shading density source values:
 +
 
 +
{| class="wikitable" border="1"
 +
! Value
 +
! Description
 +
|-
 +
| 0
 +
| Plain density
 +
|-
 +
| 1
 +
| Depth density
 +
|}
 +
 
 +
Buffer input values:
 +
 
 +
{| class="wikitable" border="1"
 +
! Value
 +
! Description
 +
|-
 +
| 0
 +
| Previous buffer
 +
|-
 +
| 1
 +
| Previous
 +
|}
 +
 
 +
=== GPUREG_FOG_COLOR ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-7
 +
| unsigned, Red
 +
|-
 +
| 8-15
 +
| unsigned, Green
 +
|-
 +
| 16-23
 +
| unsigned, Blue
 +
|}
 +
 
 +
This register is used to configure the color of fog.
 +
 
 +
=== GPUREG_GAS_ATTENUATION ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-15
 +
| float1.5.10, Gas density attenuation
 +
|}
 +
 
 +
This register is used to configure the gas density attenuation.
 +
 
 +
=== GPUREG_GAS_ACCMAX ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-15
 +
| float1.5.10, Gas maximum density accumulation
 +
|}
 +
 
 +
This register is used to configure the gas maximum density accumulation.
 +
 
 +
=== GPUREG_FOG_LUT_INDEX ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-15
 +
| unsigned, Index
 +
|}
 +
 
 +
This register is used to set what index to write to with GPUREG_FOG_LUT_DATA''i''.
 +
 
 +
=== GPUREG_FOG_LUT_DATA''i'' ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-23
 +
| LUT data
 +
|}
 +
 
 +
These registers behave as a FIFO queue. Each write to these registers writes the provided value to the fog look-up table, starting at the index selected with GPUREG_FOG_LUT_INDEX.
 +
 
 +
==== Fog Look-Up Table ====
 +
 
 +
128 elements:
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-12
 +
| fixed1.1.11, Difference from next element
 +
|-
 +
| 13-23
 +
| fixed0.0.11, Value
 +
|}
 +
 
 +
=== GPUREG_TEXENV_BUFFER_COLOR ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-7
 +
| unsigned, Red
 +
|-
 +
| 8-15
 +
| unsigned, Green
 +
|-
 +
| 16-23
 +
| unsigned, Blue
 +
|-
 +
| 24-31
 +
| unsigned, Alpha
 +
|}
 +
 
 +
This register is used to configure the texture combiner buffer color.
 +
 
 +
== Framebuffer registers ==
 +
 
 +
=== GPUREG_COLOR_OPERATION ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-1
 +
| unsigned, Fragment operation mode
 +
|-
 +
| 8
 +
| unsigned, Blend mode
 +
|-
 +
| 16-25
 +
| 0x0E4
 +
|}
 +
 
 +
This register is used to configure the fragment operation mode and whether to use logic ops or blending.
 +
 
 +
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
 +
| unsigned, RGB equation
 +
|-
 +
| 8-10
 +
| unsigned, Alpha equation
 +
|-
 +
| 16-19
 +
| unsigned, RGB source function
 +
|-
 +
| 20-23
 +
| unsigned, RGB destination function
 +
|-
 +
| 24-27
 +
| unsigned, Alpha source function
 +
|-
 +
| 28-31
 +
| unsigned, Alpha destination function
 +
|}
 +
 
 +
This register is used to configure the blending function.
 +
 
 +
'''Equation values:'''
 +
 
 +
{| class="wikitable" border="1"
 +
! Value
 +
! Description
 +
|-
 +
| 0
 +
| Add
 +
|-
 +
| 1
 +
| Subtract
 +
|-
 +
| 2
 +
| Reverse subtract
 +
|-
 +
| 3
 +
| Minimum
 +
|-
 +
| 4
 +
| Maximum
 +
|}
 +
 
 +
Blend equations 5, 6, 7 appear to behave the same as blend equation 0 (Add)
 +
 
 +
'''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
 +
| unsigned, Logic op
 +
|}
 +
 
 +
This register is used to configure the 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
 +
| unsigned, Red
 +
|-
 +
| 8-15
 +
| unsigned, Green
 +
|-
 +
| 16-23
 +
| unsigned, Blue
 +
|-
 +
| 24-31
 +
| unsigned, Alpha
 +
|}
 +
 
 +
This register is used to configure the blending color.
 +
 
 +
=== GPUREG_FRAGOP_ALPHA_TEST ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0
 +
| unsigned, Enabled (0 = disabled, 1 = enabled)
 +
|-
 +
| 4-6
 +
| unsigned, Function
 +
|-
 +
| 8-15
 +
| unsigned, Reference value
 +
|}
 +
 
 +
This register is used to configure alpha testing.
 +
 
 +
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
 +
| unsigned, Enabled (0 = disabled, 1 = enabled)
 +
|-
 +
| 4-6
 +
| unsigned, Function
 +
|-
 +
| 8-15
 +
| unsigned, Buffer mask
 +
|-
 +
| 16-23
 +
| signed, Reference value
 +
|-
 +
| 24-31
 +
| unsigned, Mask
 +
|}
 +
 
 +
This register is used to configure stencil testing.
 +
 
 +
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
 +
| unsigned, Fail operation
 +
|-
 +
| 4-6
 +
| unsigned, Z-fail operation
 +
|-
 +
| 8-10
 +
| unsigned, Z-pass operation
 +
|}
 +
 
 +
This register is used to configure stencil result operations.
 +
 
 +
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
 +
| unsigned, Depth test enabled (0 = disabled, 1 = enabled)
 +
|-
 +
| 4-6
 +
| unsigned, Depth function
 +
|-
 +
| 8
 +
| unsigned, Red write enabled (0 = disabled, 1 = enabled)
 +
|-
 +
| 9
 +
| unsigned, Green write enabled (0 = disabled, 1 = enabled)
 +
|-
 +
| 10
 +
| unsigned, Blue write enabled (0 = disabled, 1 = enabled)
 +
|-
 +
| 11
 +
| unsigned, Alpha write enabled (0 = disabled, 1 = enabled)
 +
|-
 +
| 12
 +
| unsigned, Depth write enabled (0 = disabled, 1 = enabled)
 +
|}
 +
 
 +
This register is used to depth testing and framebuffer write masking.
 +
 
 +
Note that setting the "Depth test enabled" bit to 0 will ''not'' also disable depth writes. It will instead behave as if the depth function were set to "Always". To completely disable depth-related operations both the depth test and depth write bits must be disabled.
 +
 
 +
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 ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0
 +
| unsigned, Trigger (0 = idle, 1 = invalidate)
 +
|-
 +
| 1-31
 +
| 0x0
 +
|}
 +
 
 +
Writing 1 to this register invalidates the framebuffer cache. This should be done when changing the framebuffer or when it is cleared before rendering. Note that it does '''not''' flush the cache, so it should always be preceded by a write to GPUREG_FRAMEBUFFER_FLUSH.
 +
 
 +
=== GPUREG_FRAMEBUFFER_FLUSH ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0
 +
| unsigned, Trigger (0 = idle, 1 = flush)
 +
|-
 +
| 1-31
 +
| 0x0
 +
|}
 +
 
 +
Writing 1 to this register flushes the framebuffer cache to memory. This should be done after rendering before changing the framebuffer or using rendering results.
 +
 
 +
=== GPUREG_COLORBUFFER_READ ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-3
 +
| unsigned, Allow read (0 = disable, 0xF = enable)
 +
|}
 +
 
 +
This register configures read access from the color buffer.
 +
 
 +
=== GPUREG_COLORBUFFER_WRITE ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-3
 +
| unsigned, Allow write (0 = disable, 0xF = enable)
 +
|}
 +
 
 +
This register configures write access to the color buffer.
 +
 
 +
=== GPUREG_DEPTHBUFFER_READ ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0
 +
| unsigned, Allow stencil read (0 = disable, 1 = enable)
 +
|-
 +
| 1
 +
| unsigned, Allow depth read (0 = disable, 1 = enable)
 +
|}
 +
 
 +
This register configures read access from the depth and stencil buffers.
 +
 
 +
=== GPUREG_DEPTHBUFFER_WRITE ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0
 +
| unsigned, Allow stencil write (0 = disable, 1 = enable)
 +
|-
 +
| 1
 +
| unsigned, Allow depth write (0 = disable, 1 = enable)
 +
|}
 +
 
 +
This register configures write access to the depth and stencil buffers.
 +
 
 +
=== GPUREG_DEPTHBUFFER_FORMAT ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-1
 +
| unsigned, Format
 +
|}
 +
 
 +
This register configures the depth buffer data format.
 +
 
 +
Format values:
 +
 
 +
{| class="wikitable" border="1"
 +
! Value
 +
! Description
 +
|-
 +
| 0
 +
| 16-bit depth
 +
|-
 +
| 2
 +
| 24-bit depth
 +
|-
 +
| 3
 +
| 24-bit depth + 8-bit stencil
 +
|}
 +
 
 +
=== GPUREG_COLORBUFFER_FORMAT ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-1
 +
| unsigned, Pixel size
 +
|-
 +
| 16-18
 +
| unsigned, Format
 +
|}
 +
 
 +
This register configures the color buffer data format. Color components are laid out in reverse byte order in memory, with the most significant bits used first.
 +
 
 +
Pixel size values:
 +
 
 +
{| class="wikitable" border="1"
 +
! Value
 +
! Description
 +
|-
 +
| 0
 +
| 16-bit color
 +
|-
 +
| 2
 +
| 32-bit color
 +
|}
 +
 
 +
Format values:
 +
 
 +
{| class="wikitable" border="1"
 +
! Value
 +
! Description
 +
|-
 +
| 0
 +
| RGBA8/Gas
 +
|-
 +
| 2
 +
| RGB5A1
 +
|-
 +
| 3
 +
| RGB565
 +
|-
 +
| 4
 +
| RGBA4
 +
|}
 +
 
 +
=== GPUREG_EARLYDEPTH_TEST2 ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0
 +
| unsigned, Enabled (0 = disabled, 1 = enabled)
 +
|}
 +
 
 +
This register enables the early depth test.
 +
 
 +
=== GPUREG_FRAMEBUFFER_BLOCK32 ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0
 +
| unsigned, Render block mode
 +
|}
 +
 
 +
This register configures the framebuffer block mode. To untile the color buffer when using the 32x32 block format, use bit 16 of the [[GPU/External_Registers#Transfer_Engine|display transfer flags]]. It is unknown if there are any advantages to using the 32x32 format.
 +
 
 +
Render block mode values:
 +
 
 +
{| class="wikitable" border="1"
 +
! Value
 +
! Description
 +
|-
 +
| 0
 +
| 8x8 blocks
 +
|-
 +
| 1
 +
| 32x32 blocks
 +
|}
 +
 
 +
=== GPUREG_DEPTHBUFFER_LOC ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-27
 +
| unsigned, Depth buffer physical address >> 3
 +
|}
 +
 
 +
This register configures the depth buffer physical address.
 +
 
 +
=== GPUREG_COLORBUFFER_LOC ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-27
 +
| unsigned, Color buffer physical address >> 3
 +
|}
 +
 
 +
This register configures the color buffer physical address.
 +
 
 +
=== GPUREG_FRAMEBUFFER_DIM ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-10
 +
| unsigned, Width
 +
|-
 +
| 12-21
 +
| unsigned, Height - 1
 +
|-
 +
| 24
 +
| 0x1
 +
|}
 +
 
 +
This register configures the framebuffer dimensions.
 +
 
 +
=== GPUREG_GAS_LIGHT_XY ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-7
 +
| unsigned, Planar shading minimum intensity
 +
|-
 +
| 8-15
 +
| unsigned, Planar shading maximum intensity
 +
|-
 +
| 16-23
 +
| unsigned, Planar shading density attenuation
 +
|}
 +
 
 +
This register configures gas light planar shading.
 +
 
 +
=== GPUREG_GAS_LIGHT_Z ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-7
 +
| unsigned, View shading minimum intensity
 +
|-
 +
| 8-15
 +
| unsigned, View shading maximum intensity
 +
|-
 +
| 16-23
 +
| unsigned, View shading density attenuation
 +
|}
 +
 
 +
This register configures gas light view shading.
 +
 
 +
=== GPUREG_GAS_LIGHT_Z_COLOR ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-7
 +
| unsigned, View shading effect in line-of-sight direction
 +
|-
 +
| 8
 +
| Gas color LUT input
 +
|}
 +
 
 +
This register configures gas light shading in the line-of-sight direction, and the input to the gas color LUT.
 +
 
 +
Color LUT input values:
 +
 
 +
{| class="wikitable" border="1"
 +
! Value
 +
! Description
 +
|-
 +
| 0
 +
| Gas density
 +
|-
 +
| 1
 +
| Light factor
 +
|}
 +
 
 +
=== GPUREG_GAS_LUT_INDEX ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-15
 +
| unsigned, Index
 +
|}
 +
 
 +
This register is used to set what index to write to with GPUREG_GAS_LUT_DATA''i''.
 +
 
 +
=== GPUREG_GAS_LUT_DATA ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-31
 +
| LUT data
 +
|}
 +
 
 +
These registers behave as a FIFO queue. Each write to these registers writes the provided value to the gas look-up table, starting at the index selected with GPUREG_GAS_LUT_INDEX.
 +
 
 +
==== Gas Look-Up Table ====
 +
 
 +
16 elements:
 +
 
 +
First 8 elements:
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-7
 +
| signed, Red
 +
|-
 +
| 8-15
 +
| signed, Green
 +
|-
 +
| 16-23
 +
| signed, Blue
 +
|}
 +
 
 +
Last 8 elements:
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-7
 +
| unsigned, Red
 +
|-
 +
| 8-15
 +
| unsigned, Green
 +
|-
 +
| 16-23
 +
| unsigned, Blue
 +
|}
 +
 
 +
=== GPUREG_GAS_DELTAZ_DEPTH ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-23
 +
| fixed0.16.8, Depth direction attenuation proportion
 +
|-
 +
| 24-25
 +
| unsigned, Depth function
 +
|}
 +
 
 +
This register is used to configure the gas depth direction attenuation proportion, as well as the gas depth function.
 +
 
 +
Gas depth function values:
 +
 
 +
{| class="wikitable" border="1"
 +
! Value
 +
! Description
 +
|-
 +
| 0
 +
| Never
 +
|-
 +
| 1
 +
| Always
 +
|-
 +
| 2
 +
| Greater than/Greater than or equal
 +
|-
 +
| 3
 +
| Less than/Less than or equal/Equal/Not equal
 +
|}
 +
 
 +
=== GPUREG_FRAGOP_SHADOW ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-15
 +
| float1.5.10, Sum of penumbra scale and penumbra bias
 +
|-
 +
| 16-31
 +
| float1.5.10, Penumbra scale with reversed sign
 +
|}
 +
 
 +
This register is used to configure shadow properties.
 +
 
 +
== Fragment lighting registers ==
 +
 
 +
=== GPUREG_LIGHT''i''_SPECULAR0 ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-7
 +
| unsigned, Blue
 +
|-
 +
| 10-17
 +
| unsigned, Green
 +
|-
 +
| 20-27
 +
| unsigned, Red
 +
|}
 +
 
 +
These registers contain the specular0 color of the corresponding light. Usually set to material_specular0*lightX_specular0.
 +
 
 +
=== GPUREG_LIGHT''i''_SPECULAR1 ===
 +
 
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-7
 +
| unsigned, Blue
 +
|-
 +
| 10-17
 +
| unsigned, Green
 +
|-
 +
| 20-27
 +
| unsigned, Red
 +
|}
 +
 
 +
These registers contain the specular1 color of the corresponding light. Usually set to material_specular1*lightX_specular1.
 +
 
 +
=== GPUREG_LIGHT''i''_DIFFUSE ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-7
 +
| unsigned, Blue
 +
|-
 +
| 10-17
 +
| unsigned, Green
 +
|-
 +
| 20-27
 +
| unsigned, Red
 +
|}
 +
 
 +
These registers contain the diffuse color of the corresponding light. Usually set to material_diffuse*lightX_diffuse.
 +
 
 +
=== GPUREG_LIGHT''i''_AMBIENT ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-7
 +
| unsigned, Blue
 +
|-
 +
| 10-17
 +
| unsigned, Green
 +
|-
 +
| 20-27
 +
| unsigned, Red
 +
|}
 +
 
 +
These registers contain the ambient color of the corresponding light. Usually set to material_ambient*lightX_ambient.
 +
 
 +
=== GPUREG_LIGHT''i''_XY ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-15
 +
| float1.5.10, X coordinate
 +
|-
 +
| 16-31
 +
| float1.5.10, Y coordinate
 +
|}
 +
 
 +
These registers (along with GPUREG_LIGHT''i''_Z) represent the light position (for a positional light) or the light direction vector (for a directional light) of the corresponding light.
 +
 
 +
=== GPUREG_LIGHT''i''_Z ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-15
 +
| float1.5.10, Z coordinate
 +
|}
 +
 
 +
These registers (along with GPUREG_LIGHT''i''_XY) represent the light position (for a positional light) or the light direction vector (for a directional light) of the corresponding light.
 +
 
 +
=== GPUREG_LIGHT''i''_SPOTDIR_XY ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-12
 +
| fixed1.1.11, X coordinate (negated)
 +
|-
 +
| 16-28
 +
| fixed1.1.11, Y coordinate (negated)
 +
|}
 +
 
 +
These registers (along with GPUREG_LIGHT''i''_SPOTDIR_Z) represent the spot direction (unitary) vector of the corresponding light.
 +
 
 +
=== GPUREG_LIGHT''i''_SPOTDIR_Z ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-12
 +
| fixed1.1.11, Z coordinate (negated)
 +
|}
 +
 
 +
These registers (along with GPUREG_LIGHT''i''_SPOTDIR_XY) represent the spot direction (unitary) vector of the corresponding light.
 +
 
 +
=== GPUREG_LIGHT''i''_CONFIG ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0
 +
| unsigned, Light type (0 = positional light, 1 = directional light)
 +
|-
 +
| 1
 +
| unsigned, Two side diffuse (0 = one side, 1 = both sides)
 +
|-
 +
| 2
 +
| unsigned, Use geometric factor 0 (0 = don't use, 1 = use)
 +
|-
 +
| 3
 +
| unsigned, Use geometric factor 1 (0 = don't use, 1 = use)
 +
|}
 +
 
 +
This register configures a light's properties.
 +
 
 +
=== GPUREG_LIGHT''i''_ATTENUATION_BIAS ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-19
 +
| float1.7.12, Distance attenuation bias
 +
|}
 +
 
 +
These registers contain the distance attenuation bias value of the corresponding light. The attenuation factor is DA(clip(bias + scale*distance, 0.0, 1.0)).
 +
 
 +
=== GPUREG_LIGHT''i''_ATTENUATION_SCALE ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-19
 +
| float1.7.12, Distance attenuation scale
 +
|}
 +
 
 +
These registers contain the distance attenuation scale value of the corresponding light. The attenuation factor is DA(clip(bias + scale*distance, 0.0, 1.0)).
 +
 
 +
=== GPUREG_LIGHTING_AMBIENT ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-7
 +
| unsigned, Blue
 +
|-
 +
| 10-17
 +
| unsigned, Green
 +
|-
 +
| 20-27
 +
| unsigned, Red
 +
|}
 +
 
 +
This register contains the initial value of the fragment primary color before the partial colors that correspond to each enabled light are added. Usually set to material_emission + material_ambient*scene_ambient.
 +
 
 +
=== GPUREG_LIGHTING_NUM_LIGHTS ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-2
 +
| unsigned, Number of active lights - 1
 +
|}
 +
 
 +
This register configures the number of active lights.
 +
 
 +
=== GPUREG_LIGHTING_CONFIG0 ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0
 +
| unsigned, Shadow factor enabled (0 = disabled, 1 = enabled) (usually accompanied by bit 16, 17, or 18)
 +
|-
 +
| 2-3
 +
| unsigned, Fresnel selector
 +
|-
 +
| 4-7
 +
| unsigned, Light environment configuration
 +
|-
 +
| 8-11
 +
| 0x4
 +
|-
 +
| 16
 +
| unsigned, Apply shadow attenuation to primary color (0 = don't apply, 1 = apply)
 +
|-
 +
| 17
 +
| unsigned, Apply shadow attenuation to secondary color (0 = don't apply, 1 = apply)
 +
|-
 +
| 18
 +
| unsigned, Invert shadow attenuation (0 = don't invert, 1 = invert)
 +
|-
 +
| 19
 +
| unsigned, Apply shadow attenuation to alpha component (0 = don't apply, 1 = apply)
 +
|-
 +
| 22-23
 +
| unsigned, Bump map texture unit
 +
|-
 +
| 24-25
 +
| unsigned, Shadow map texture unit
 +
|-
 +
| 27
 +
| unsigned, Clamp highlights (0 = disabled, 1 = enabled)
 +
|-
 +
| 28-29
 +
| unsigned, Bump mode
 +
|-
 +
| 30
 +
| unsigned, Recalculate bump vectors (0 = enabled, 1 = disabled) (usually set to 1 when bump mode is not 0)
 +
|-
 +
| 31
 +
| 0x1
 +
|}
 +
 
 +
This register configures the light environment.
 +
 
 +
Fresnel selector values:
 +
 
 +
{| class="wikitable" border="1"
 +
! Value
 +
! Description
 +
|-
 +
| 0
 +
| None
 +
|-
 +
| 1
 +
| Primary alpha
 +
|-
 +
| 2
 +
| Secondary alpha
 +
|-
 +
| 3
 +
| Primary and secondary alpha
 +
|}
 +
 
 +
The light environment configuration controls which LUTs are available for use. If a LUT is not available in the selected configuration, its value will always read a constant 1.0 regardless of the enable state in GPUREG_LIGHTING_CONFIG1. If RR is enabled but not RG or RB, the output of RR is used for the three components; Red, Green and Blue.
 +
 
 +
Light environment configuration values:
 +
 
 +
{| class="wikitable" border="1"
 +
! Value
 +
! Description
 +
! Available LUTs
 +
|-
 +
| 0
 +
| Configuration 0
 +
| D0, RR, SP, DA
 +
|-
 +
| 1
 +
| Configuration 1
 +
| FR, RR, SP, DA
 +
|-
 +
| 2
 +
| Configuration 2
 +
| D0, D1, RR, DA
 +
|-
 +
| 3
 +
| Configuration 3
 +
| D0, D1, FR, DA
 +
|-
 +
| 4
 +
| Configuration 4
 +
| All except for FR
 +
|-
 +
| 5
 +
| Configuration 5
 +
| All except for D1
 +
|-
 +
| 6
 +
| Configuration 6
 +
| All except for RB and RG
 +
|-
 +
| 8
 +
| Configuration 7
 +
| All
 +
|}
 +
 
 +
Bump mode values:
 +
 
 +
{| class="wikitable" border="1"
 +
! Value
 +
! Description
 +
|-
 +
| 0
 +
| Not used
 +
|-
 +
| 1
 +
| Use as bump map
 +
|-
 +
| 2
 +
| Use as tangent map
 +
|}
 +
 
 +
=== GPUREG_LIGHTING_CONFIG1 ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0
 +
| unsigned, Fragment light source 0 shadows disabled (0 = enabled, 1 = disabled)
 +
|-
 +
| 1
 +
| unsigned, Fragment light source 1 shadows disabled (0 = enabled, 1 = disabled)
 +
|-
 +
| 2
 +
| unsigned, Fragment light source 2 shadows disabled (0 = enabled, 1 = disabled)
 +
|-
 +
| 3
 +
| unsigned, Fragment light source 3 shadows disabled (0 = enabled, 1 = disabled)
 +
|-
 +
| 4
 +
| unsigned, Fragment light source 4 shadows disabled (0 = enabled, 1 = disabled)
 +
|-
 +
| 5
 +
| unsigned, Fragment light source 5 shadows disabled (0 = enabled, 1 = disabled)
 +
|-
 +
| 6
 +
| unsigned, Fragment light source 6 shadows disabled (0 = enabled, 1 = disabled)
 +
|-
 +
| 7
 +
| unsigned, Fragment light source 7 shadows disabled (0 = enabled, 1 = disabled)
 +
|-
 +
| 8
 +
| unsigned, Fragment light source 0 spot light disabled (0 = enabled, 1 = disabled)
 +
|-
 +
| 9
 +
| unsigned, Fragment light source 1 spot light disabled (0 = enabled, 1 = disabled)
 +
|-
 +
| 10
 +
| unsigned, Fragment light source 2 spot light disabled (0 = enabled, 1 = disabled)
 +
|-
 +
| 11
 +
| unsigned, Fragment light source 3 spot light disabled (0 = enabled, 1 = disabled)
 +
|-
 +
| 12
 +
| unsigned, Fragment light source 4 spot light disabled (0 = enabled, 1 = disabled)
 +
|-
 +
| 13
 +
| unsigned, Fragment light source 5 spot light disabled (0 = enabled, 1 = disabled)
 +
|-
 +
| 14
 +
| unsigned, Fragment light source 6 spot light disabled (0 = enabled, 1 = disabled)
 +
|-
 +
| 15
 +
| unsigned, Fragment light source 7 spot light disabled (0 = enabled, 1 = disabled)
 +
|-
 +
| 16
 +
| unsigned, Term 0 distribution component D0 LUT disabled (0 = enabled, 1 = disabled)
 +
|-
 +
| 17
 +
| unsigned, Term 1 distribution component D1 LUT disabled (0 = enabled, 1 = disabled)
 +
|-
 +
| 18
 +
| 0x1
 +
|-
 +
| 19
 +
| unsigned, Fresnel FR LUT disabled (0 = enabled, 1 = disabled)
 +
|-
 +
| 20-22
 +
| unsigned, Term 1 reflection component RB LUT disabled (0 = enabled, 7 = disabled)
 +
|-
 +
| 21
 +
| unsigned, Term 1 reflection component RG LUT disabled (0 = enabled, 7 = disabled)
 +
|-
 +
| 22
 +
| unsigned, Term 1 reflection component RR LUT disabled (0 = enabled, 7 = disabled)
 +
|-
 +
| 24
 +
| unsigned, Fragment light source 0 distance attenuation disabled (0 = enabled, 1 = disabled)
 +
|-
 +
| 25
 +
| unsigned, Fragment light source 1 distance attenuation disabled (0 = enabled, 1 = disabled)
 +
|-
 +
| 26
 +
| unsigned, Fragment light source 2 distance attenuation disabled (0 = enabled, 1 = disabled)
 +
|-
 +
| 27
 +
| unsigned, Fragment light source 3 distance attenuation disabled (0 = enabled, 1 = disabled)
 +
|-
 +
| 28
 +
| unsigned, Fragment light source 4 distance attenuation disabled (0 = enabled, 1 = disabled)
 +
|-
 +
| 29
 +
| unsigned, Fragment light source 5 distance attenuation disabled (0 = enabled, 1 = disabled)
 +
|-
 +
| 30
 +
| unsigned, Fragment light source 6 distance attenuation disabled (0 = enabled, 1 = disabled)
 +
|-
 +
| 31
 +
| unsigned, Fragment light source 7 distance attenuation disabled (0 = enabled, 1 = disabled)
 +
|}
 +
 
 +
This register is used to disable various aspects of the light environment.
 +
 
 +
=== GPUREG_LIGHTING_LUT_INDEX ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-7
 +
| unsigned, Starting index
 +
|-
 +
| 8-12
 +
| unsigned, Look-up table
 +
|}
 +
 
 +
This register controls which LUT and what offset into it the GPUREG_LIGHTING_LUT_DATA''i'' register writes to.
 +
 
 +
Lookup table values:
 +
 
 +
{| class="wikitable" border="1"
 +
! Value
 +
! Description
 +
|-
 +
| 0
 +
| D0
 +
|-
 +
| 1
 +
| D1
 +
|-
 +
| 3
 +
| FR
 +
|-
 +
| 4
 +
| RB
 +
|-
 +
| 5
 +
| RG
 +
|-
 +
| 6
 +
| RR
 +
|-
 +
| 8-15
 +
| SP0-7
 +
|-
 +
| 16-23
 +
| DA0-7
 +
|}
 +
 
 +
=== GPUREG_LIGHTING_ENABLE1 ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0
 +
| unsigned, Disabled (0 = enabled, 1 = disabled)
 +
|}
 +
 
 +
This register is set to 1 when fragment lighting is disabled, and to 0 when it is enabled.
 +
 
 +
=== GPUREG_LIGHTING_LUT_DATA''i'' ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-23
 +
| LUT data
 +
|}
 +
 
 +
Lighting LUT data is written here.
 +
 
 +
A LUT contains data for the input domain [-1.0, 1.0], which is indexed using a signed 8-bit number [-128, 127]. Therefore a LUT contains 256 entries. The index of a value is (int)(x/127.0f) & 0xFF.
 +
 
 +
DA: The input domain is [0.0, 1.0], and the index is an unsigned 8-bit number [0, 255] instead.
 +
 
 +
Format of an entry:
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 0-11
 +
| fixed0.0.12, Entry value
 +
|-
 +
| 12-23
 +
| fixed1.0.11, Absolute value of the difference between the next entry and this entry, used to implement linear interpolation
 +
|}
 +
 
 +
=== GPUREG_LIGHTING_LUTINPUT_ABS ===
 +
 
 +
{| class="wikitable" border="1"
 +
! Bits
 +
! Description
 +
|-
 +
| 1
 +
| unsigned, abs() flag for the input of D0 (0 = enabled, 1 = disabled)
 +
|-
 +
| 5
 +
| unsigned, abs() flag for the input of D1 (0 = enabled, 1 = disabled)
 +
|-
 +
| 9
 +
| unsigned, abs() flag for the input of SP (0 = enabled, 1 = disabled)
 +
|-
 +
| 13
 +
| unsigned, abs() flag for the input of FR (0 = enabled, 1 = disabled)
 +
|-
 +
| 17
 +
| unsigned, abs() flag for the input of RB (0 = enabled, 1 = disabled)
 +
|-
 +
| 21
 +
| unsigned, abs() flag for the input of RG (0 = enabled, 1 = disabled)
 +
|-
 +
| 25
 +
| unsigned, abs() flag for the input of RR (0 = enabled, 1 = disabled)
 +
|}
 +
 
 +
This register controls whether the absolute value of the input is taken before using a LUT.
 +
 
 +
=== GPUREG_LIGHTING_LUTINPUT_SELECT ===
 +
 
 +
{| class