Internal Registers

Internal Registers

Overview #

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.

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 #

BitDescription
0-15Command ID
16-19Parameter mask
20-27Number of extra parameters (may be zero)
28-30Unused
31Consecutive 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 :

  • configuration registers, which directly map to various rendering properties (for example: 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)
  • action triggering registers, which tell the GPU to do something, like draw a primitive (for example: GPUREG_DRAWARRAYS)

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_DATAi so that a consecutively writing command based at 02C0 will write its first parameter to GPUREG_VSH_FLOATUNIFORM_INDEX and ever subsequent ones to GPUREG_VSH_FLOATUNIFORM_DATAi

Data Types #

NameDescription
signedSigned integer
unsignedUnsigned integer
floatX.Y.ZFloating-point number with X sign bits, Y exponent bits, and Z mantissa bits
fixedX.Y.ZFixed-point number with X sign bits, Y integer bits, and Z fractional bits

Register list #

Miscellaneous registers (0x000-0x03F) #

Register IDRegister nameNotesOfficial Name
0000GPUREG_0000
0001GPUREG_0001
0002GPUREG_0002
0003GPUREG_0003
0004GPUREG_0004
0005GPUREG_0005
0006GPUREG_0006
0007GPUREG_0007
0008GPUREG_0008
0009GPUREG_0009
000AGPUREG_000A
000BGPUREG_000B
000CGPUREG_000C
000DGPUREG_000D
000EGPUREG_000E
000FGPUREG_000F
0010GPUREG_FINALIZEPICA_REG_INTERRUPT
0011GPUREG_0011
0012GPUREG_0012
0013GPUREG_0013
0014GPUREG_0014
0015GPUREG_0015
0016GPUREG_0016
0017GPUREG_0017
0018GPUREG_0018
0019GPUREG_0019
001AGPUREG_001A
001BGPUREG_001B
001CGPUREG_001C
001DGPUREG_001D
001EGPUREG_001E
001FGPUREG_001F
0020GPUREG_0020
0021GPUREG_0021
0022GPUREG_0022
0023GPUREG_0023
0024GPUREG_0024
0025GPUREG_0025
0026GPUREG_0026
0027GPUREG_0027
0028GPUREG_0028
0029GPUREG_0029
002AGPUREG_002A
002BGPUREG_002B
002CGPUREG_002C
002DGPUREG_002D
002EGPUREG_002E
002FGPUREG_002F
0030GPUREG_0030
0031GPUREG_0031
0032GPUREG_0032
0033GPUREG_0033
0034GPUREG_0034
0035GPUREG_0035
0036GPUREG_0036
0037GPUREG_0037
0038GPUREG_0038
0039GPUREG_0039
003AGPUREG_003A
003BGPUREG_003B
003CGPUREG_003C
003DGPUREG_003D
003EGPUREG_003E
003FGPUREG_003F

Rasterizer registers (0x040-0x07F) #

Register IDRegister nameNotesOfficial Name
0040GPUREG_FACECULLING_CONFIGPICA_REG_CULL_FACE
0041GPUREG_VIEWPORT_WIDTHPICA_REG_VIEWPORT_WIDTH1
0042GPUREG_VIEWPORT_INVWPICA_REG_VIEWPORT_WIDTH2
0043GPUREG_VIEWPORT_HEIGHTPICA_REG_VIEWPORT_HEIGHT1
0044GPUREG_VIEWPORT_INVHPICA_REG_VIEWPORT_HEIGHT2
0045GPUREG_0045
0046GPUREG_0046
0047GPUREG_FRAGOP_CLIP?PICA_REG_FRAGOP_CLIP
0048GPUREG_FRAGOP_CLIP_DATA0?PICA_REG_FRAGOP_CLIP_DATA1
0049GPUREG_FRAGOP_CLIP_DATA1?PICA_REG_FRAGOP_CLIP_DATA2
004AGPUREG_FRAGOP_CLIP_DATA2?PICA_REG_FRAGOP_CLIP_DATA3
004BGPUREG_FRAGOP_CLIP_DATA3?PICA_REG_FRAGOP_CLIP_DATA4
004CGPUREG_004C
004DGPUREG_DEPTHMAP_SCALEAs f24PICA_REG_FRAGOP_WSCALE_DATA1
004EGPUREG_DEPTHMAP_OFFSETAs f24PICA_REG_FRAGOP_WSCALE_DATA2
004FGPUREG_SH_OUTMAP_TOTALPICA_REG_GS_OUT_REG_NUM0 / PICA_REG_VS_OUT_REG_NUM0
0050GPUREG_SH_OUTMAP_O0PICA_REG_GS_OUT_ATTR0 / PICA_REG_VS_OUT_ATTR0
0051GPUREG_SH_OUTMAP_O1PICA_REG_GS_OUT_ATTR1 / PICA_REG_VS_OUT_ATTR1
0052GPUREG_SH_OUTMAP_O2PICA_REG_GS_OUT_ATTR2 / PICA_REG_VS_OUT_ATTR2
0053GPUREG_SH_OUTMAP_O3PICA_REG_GS_OUT_ATTR3 / PICA_REG_VS_OUT_ATTR3
0054GPUREG_SH_OUTMAP_O4PICA_REG_GS_OUT_ATTR4 / PICA_REG_VS_OUT_ATTR4
0055GPUREG_SH_OUTMAP_O5PICA_REG_GS_OUT_ATTR5 / PICA_REG_VS_OUT_ATTR5
0056GPUREG_SH_OUTMAP_O6PICA_REG_GS_OUT_ATTR6 / PICA_REG_VS_OUT_ATTR6
0057GPUREG_0057
0058GPUREG_0058
0059GPUREG_0059
005AGPUREG_005A
005BGPUREG_005B
005CGPUREG_005C
005DGPUREG_005D
005EGPUREG_005E
005FGPUREG_005F
0060GPUREG_0060
0061GPUREG_EARLYDEPTH_FUNC?PICA_REG_EARLY_DEPTH_FUNC
0062GPUREG_EARLYDEPTH_TEST1?PICA_REG_EARLY_DEPTH_TEST1
0063GPUREG_EARLYDEPTH_CLEARPICA_REG_EARLY_DEPTH_CLEAR
0064GPUREG_SH_OUTATTR_MODE?PICA_REG_GS_OUT_ATTR_MODE / PICA_REG_VS_OUT_ATTR_MODE
0065GPUREG_SCISSORTEST_MODEPICA_REG_SCISSOR
0066GPUREG_SCISSORTEST_POSPICA_REG_SCISSOR_XY
0067GPUREG_SCISSORTEST_DIMPICA_REG_SCISSOR_SIZE
0068GPUREG_VIEWPORT_XYPICA_REG_VIEWPORT_XY
0069GPUREG_0069
006AGPUREG_EARLYDEPTH_DATAPICA_REG_EARLY_DEPTH_DATA
006BGPUREG_006B
006CGPUREG_006C
006DGPUREG_DEPTHMAP_ENABLE?PICA_REG_FRAGOP_WSCALE
006EGPUREG_RENDERBUF_DIM?PICA_REG_RENDER_BUF_RESOLUTION1
006FGPUREG_SH_OUTATTR_CLOCK?PICA_REG_GS_OUT_ATTR_CLK / PICA_REG_VS_OUT_ATTR_CLK
0070GPUREG_0070
0071GPUREG_0071
0072GPUREG_0072
0073GPUREG_0073
0074GPUREG_0074
0075GPUREG_0075
0076GPUREG_0076
0077GPUREG_0077
0078GPUREG_0078
0079GPUREG_0079
007AGPUREG_007A
007BGPUREG_007B
007CGPUREG_007C
007DGPUREG_007D
007EGPUREG_007E
007FGPUREG_007F

Texturing registers (0x080-0x0FF) #

Register IDRegister nameNotesOfficial Name
0080GPUREG_TEXUNIT_CONFIGPICA_REG_TEXTURE_FUNC
0081GPUREG_TEXUNIT0_BORDER_COLORPICA_REG_TEXTURE0_BORDER_COLOR
0082GPUREG_TEXUNIT0_DIMPICA_REG_TEXTURE0_SIZE
0083GPUREG_TEXUNIT0_PARAMPICA_REG_TEXTURE0_WRAP_FILTER
0084GPUREG_TEXUNIT0_LOD?PICA_REG_TEXTURE0_LOD
0085GPUREG_TEXUNIT0_ADDR1PICA_REG_TEXTURE0_ADDR1
0086GPUREG_TEXUNIT0_ADDR2PICA_REG_TEXTURE0_ADDR2
0087GPUREG_TEXUNIT0_ADDR3PICA_REG_TEXTURE0_ADDR3
0088GPUREG_TEXUNIT0_ADDR4PICA_REG_TEXTURE0_ADDR4
0089GPUREG_TEXUNIT0_ADDR5PICA_REG_TEXTURE0_ADDR5
008AGPUREG_TEXUNIT0_ADDR6PICA_REG_TEXTURE0_ADDR6
008BGPUREG_TEXUNIT0_SHADOW?PICA_REG_TEXTURE0_SHADOW
008CGPUREG_008C
008DGPUREG_008D
008EGPUREG_TEXUNIT0_TYPE?PICA_REG_TEXTURE0_FORMAT
008FGPUREG_LIGHTING_ENABLE0?PICA_REG_FRAG_LIGHT_EN0
0090GPUREG_0090
0091GPUREG_TEXUNIT1_BORDER_COLORPICA_REG_TEXTURE1_BORDER_COLOR
0092GPUREG_TEXUNIT1_DIMPICA_REG_TEXTURE1_SIZE
0093GPUREG_TEXUNIT1_PARAMPICA_REG_TEXTURE1_WRAP_FILTER
0094GPUREG_TEXUNIT1_LOD?PICA_REG_TEXTURE1_LOD
0095GPUREG_TEXUNIT1_ADDRPICA_REG_TEXTURE1_ADDR
0096GPUREG_TEXUNIT1_TYPEPICA_REG_TEXTURE1_FORMAT
0097GPUREG_0097
0098GPUREG_0098
0099GPUREG_TEXUNIT2_BORDER_COLORPICA_REG_TEXTURE2_BORDER_COLOR
009AGPUREG_TEXUNIT2_DIMPICA_REG_TEXTURE2_SIZE
009BGPUREG_TEXUNIT2_PARAMPICA_REG_TEXTURE2_WRAP_FILTER
009CGPUREG_TEXUNIT2_LOD?PICA_REG_TEXTURE2_LOD
009DGPUREG_TEXUNIT2_ADDRPICA_REG_TEXTURE2_ADDR
009EGPUREG_TEXUNIT2_TYPEPICA_REG_TEXTURE2_FORMAT
009FGPUREG_009F
00A0GPUREG_00A0
00A1GPUREG_00A1
00A2GPUREG_00A2
00A3GPUREG_00A3
00A4GPUREG_00A4
00A5GPUREG_00A5
00A6GPUREG_00A6
00A7GPUREG_00A7
00A8GPUREG_TEXUNIT3_PROCTEX0?PICA_REG_TEXTURE3_PROCTEX0
00A9GPUREG_TEXUNIT3_PROCTEX1?PICA_REG_TEXTURE3_PROCTEX1
00AAGPUREG_TEXUNIT3_PROCTEX2?PICA_REG_TEXTURE3_PROCTEX2
00ABGPUREG_TEXUNIT3_PROCTEX3?PICA_REG_TEXTURE3_PROCTEX3
00ACGPUREG_TEXUNIT3_PROCTEX4?PICA_REG_TEXTURE3_PROCTEX4
00ADGPUREG_TEXUNIT3_PROCTEX5?PICA_REG_TEXTURE3_PROCTEX5
00AEGPUREG_00AE
00AFGPUREG_PROCTEX_LUT?PICA_REG_PROCTEX_LUT
00B0GPUREG_PROCTEX_LUT_DATA0?PICA_REG_PROCTEX_LUT_DATA0
00B1GPUREG_PROCTEX_LUT_DATA1?PICA_REG_PROCTEX_LUT_DATA1
00B2GPUREG_PROCTEX_LUT_DATA2?PICA_REG_PROCTEX_LUT_DATA2
00B3GPUREG_PROCTEX_LUT_DATA3?PICA_REG_PROCTEX_LUT_DATA3
00B4GPUREG_PROCTEX_LUT_DATA4?PICA_REG_PROCTEX_LUT_DATA4
00B5GPUREG_PROCTEX_LUT_DATA5?PICA_REG_PROCTEX_LUT_DATA5
00B6GPUREG_PROCTEX_LUT_DATA6?PICA_REG_PROCTEX_LUT_DATA6
00B7GPUREG_PROCTEX_LUT_DATA7?PICA_REG_PROCTEX_LUT_DATA7
00B8GPUREG_00B8
00B9GPUREG_00B9
00BAGPUREG_00BA
00BBGPUREG_00BB
00BCGPUREG_00BC
00BDGPUREG_00BD
00BEGPUREG_00BE
00BFGPUREG_00BF
00C0GPUREG_TEXENV0_SOURCEPICA_REG_TEX_ENV_0
00C1GPUREG_TEXENV0_OPERANDPICA_REG_TEX_ENV_0_OPERAND
00C2GPUREG_TEXENV0_COMBINERPICA_REG_TEX_ENV_0_COMBINE
00C3GPUREG_TEXENV0_COLORPICA_REG_TEX_ENV_0_COLOR
00C4GPUREG_TEXENV0_SCALEPICA_REG_TEX_ENV_0_SCALE
00C5GPUREG_00C5
00C6GPUREG_00C6
00C7GPUREG_00C7
00C8GPUREG_TEXENV1_SOURCEPICA_REG_TEX_ENV_1
00C9GPUREG_TEXENV1_OPERANDPICA_REG_TEX_ENV_1_OPERAND
00CAGPUREG_TEXENV1_COMBINERPICA_REG_TEX_ENV_1_COMBINE
00CBGPUREG_TEXENV1_COLORPICA_REG_TEX_ENV_1_COLOR
00CCGPUREG_TEXENV1_SCALEPICA_REG_TEX_ENV_1_SCALE
00CDGPUREG_00CD
00CEGPUREG_00CE
00CFGPUREG_00CF
00D0GPUREG_TEXENV2_SOURCEPICA_REG_TEX_ENV_2
00D1GPUREG_TEXENV2_OPERANDPICA_REG_TEX_ENV_2_OPERAND
00D2GPUREG_TEXENV2_COMBINERPICA_REG_TEX_ENV_2_COMBINE
00D3GPUREG_TEXENV2_COLORPICA_REG_TEX_ENV_2_COLOR
00D4GPUREG_TEXENV2_SCALEPICA_REG_TEX_ENV_2_SCALE
00D5GPUREG_00D5
00D6GPUREG_00D6
00D7GPUREG_00D7
00D8GPUREG_TEXENV3_SOURCEPICA_REG_TEX_ENV_3
00D9GPUREG_TEXENV3_OPERANDPICA_REG_TEX_ENV_3_OPERAND
00DAGPUREG_TEXENV3_COMBINERPICA_REG_TEX_ENV_3_COMBINE
00DBGPUREG_TEXENV3_COLORPICA_REG_TEX_ENV_3_COLOR
00DCGPUREG_TEXENV3_SCALEPICA_REG_TEX_ENV_3_SCALE
00DDGPUREG_00DD
00DEGPUREG_00DE
00DFGPUREG_00DF
00E0GPUREG_TEXENV_UPDATE_BUFFER?PICA_REG_GAS_FOG_MODE / PICA_REG_TEX_ENV_BUF_INPUT
00E1GPUREG_FOG_COLOR?PICA_REG_FOG_COLOR
00E2GPUREG_00E2
00E3GPUREG_00E3
00E4GPUREG_GAS_ATTENUATION?PICA_REG_GAS_ATTENUATION
00E5GPUREG_GAS_ACCMAX?PICA_REG_GAS_ACCMAX
00E6GPUREG_FOG_LUT_INDEX?PICA_REG_FOG_LUT_INDEX
00E7GPUREG_00E7
00E8GPUREG_FOG_LUT_DATA0?PICA_REG_FOG_LUT_DATA0
00E9GPUREG_FOG_LUT_DATA1?PICA_REG_FOG_LUT_DATA1
00EAGPUREG_FOG_LUT_DATA2?PICA_REG_FOG_LUT_DATA2
00EBGPUREG_FOG_LUT_DATA3?PICA_REG_FOG_LUT_DATA3
00ECGPUREG_FOG_LUT_DATA4?PICA_REG_FOG_LUT_DATA4
00EDGPUREG_FOG_LUT_DATA5?PICA_REG_FOG_LUT_DATA5
00EEGPUREG_FOG_LUT_DATA6?PICA_REG_FOG_LUT_DATA6
00EFGPUREG_FOG_LUT_DATA7?PICA_REG_FOG_LUT_DATA7
00F0GPUREG_TEXENV4_SOURCEPICA_REG_TEX_ENV_4
00F1GPUREG_TEXENV4_OPERANDPICA_REG_TEX_ENV_4_OPERAND
00F2GPUREG_TEXENV4_COMBINERPICA_REG_TEX_ENV_4_COMBINE
00F3GPUREG_TEXENV4_COLORPICA_REG_TEX_ENV_4_COLOR
00F4GPUREG_TEXENV4_SCALEPICA_REG_TEX_ENV_4_SCALE
00F5GPUREG_00F5
00F6GPUREG_00F6
00F7GPUREG_00F7
00F8GPUREG_TEXENV5_SOURCEPICA_REG_TEX_ENV_5
00F9GPUREG_TEXENV5_OPERANDPICA_REG_TEX_ENV_5_OPERAND
00FAGPUREG_TEXENV5_COMBINERPICA_REG_TEX_ENV_5_COMBINE
00FBGPUREG_TEXENV5_COLORPICA_REG_TEX_ENV_5_COLOR
00FCGPUREG_TEXENV5_SCALEPICA_REG_TEX_ENV_5_SCALE
00FDGPUREG_TEXENV_BUFFER_COLOR?PICA_REG_TEX_ENV_BUF_COLOR
00FEGPUREG_00FE
00FFGPUREG_00FF

Framebuffer registers (0x100-0x13F) #

Register IDRegister nameNotesOfficial Name
0100GPUREG_COLOR_OPERATIONPICA_REG_COLOR_OPERATION
0101GPUREG_BLEND_FUNCPICA_REG_BLEND_FUNC
0102GPUREG_LOGIC_OPPICA_REG_LOGIC_OP
0103GPUREG_BLEND_COLORPICA_REG_BLEND_COLOR
0104GPUREG_FRAGOP_ALPHA_TESTPICA_REG_FRAGOP_ALPHA_TEST
0105GPUREG_STENCIL_TESTPICA_REG_STENCIL_TEST
0106GPUREG_STENCIL_OPPICA_REG_STENCIL_OP
0107GPUREG_DEPTH_COLOR_MASKPICA_REG_DEPTH_COLOR_MASK
0108GPUREG_0108
0109GPUREG_0109
010AGPUREG_010A
010BGPUREG_010B
010CGPUREG_010C
010DGPUREG_010D
010EGPUREG_010E
010FGPUREG_010F
0110GPUREG_FRAMEBUFFER_INVALIDATEPICA_REG_COLOR_BUFFER_CLEAR0
0111GPUREG_FRAMEBUFFER_FLUSHPICA_REG_COLOR_BUFFER_CLEAR1
0112GPUREG_COLORBUFFER_READPICA_REG_COLOR_BUFFER_READ
0113GPUREG_COLORBUFFER_WRITEPICA_REG_COLOR_BUFFER_WRITE
0114GPUREG_DEPTHBUFFER_READPICA_REG_DEPTH_STENCIL_READ
0115GPUREG_DEPTHBUFFER_WRITEPICA_REG_DEPTH_STENCIL_WRITE
0116GPUREG_DEPTHBUFFER_FORMATPICA_REG_RENDER_BUF_DEPTH_MODE
0117GPUREG_COLORBUFFER_FORMATPICA_REG_RENDER_BUF_COLOR_MODE
0118GPUREG_EARLYDEPTH_TEST2?PICA_REG_EARLY_DEPTH_TEST2
0119GPUREG_0119
011AGPUREG_011A
011BGPUREG_FRAMEBUFFER_BLOCK32PICA_REG_RENDER_BLOCK_FORMAT
011CGPUREG_DEPTHBUFFER_LOCPICA_REG_RENDER_BUF_DEPTH_ADDR
011DGPUREG_COLORBUFFER_LOCPICA_REG_RENDER_BUF_COLOR_ADDR
011EGPUREG_FRAMEBUFFER_DIMPICA_REG_RENDER_BUF_RESOLUTION0
011FGPUREG_011F
0120GPUREG_GAS_LIGHT_XY?PICA_REG_GAS_LIGHT_XY
0121GPUREG_GAS_LIGHT_Z?PICA_REG_GAS_LIGHT_Z
0122GPUREG_GAS_LIGHT_Z_COLOR?PICA_REG_GAS_LIGHT_Z_COLOR
0123GPUREG_GAS_LUT_INDEX?PICA_REG_GAS_LUT_INDEX
0124GPUREG_GAS_LUT_DATA?PICA_REG_GAS_LUT_DATA
0125GPUREG_0125
0126GPUREG_GAS_DELTAZ_DEPTH?PICA_REG_GAS_DELTAZ_DEPTH
0127GPUREG_0127
0128GPUREG_0128
0129GPUREG_0129
012AGPUREG_012A
012BGPUREG_012B
012CGPUREG_012C
012DGPUREG_012D
012EGPUREG_012E
012FGPUREG_012F
0130GPUREG_FRAGOP_SHADOW?PICA_REG_FRAGOP_SHADOW
0131GPUREG_0131
0132GPUREG_0132
0133GPUREG_0133
0134GPUREG_0134
0135GPUREG_0135
0136GPUREG_0136
0137GPUREG_0137
0138GPUREG_0138
0139GPUREG_0139
013AGPUREG_013A
013BGPUREG_013B
013CGPUREG_013C
013DGPUREG_013D
013EGPUREG_013E
013FGPUREG_013F

Fragment lighting registers (0x140-0x1FF) #

Register IDRegister nameNotesOfficial Name
0140GPUREG_LIGHT0_SPECULAR0?PICA_REG_FRAG_LIGHT0_SPECULAR0 / PICA_REG_FRAG_LIGHT_START
0141GPUREG_LIGHT0_SPECULAR1?PICA_REG_FRAG_LIGHT0_SPECULAR1
0142GPUREG_LIGHT0_DIFFUSE?PICA_REG_FRAG_LIGHT0_DIFFUSE
0143GPUREG_LIGHT0_AMBIENT?PICA_REG_FRAG_LIGHT0_AMBIENT
0144GPUREG_LIGHT0_XY?PICA_REG_FRAG_LIGHT0_POSITION_XY
0145GPUREG_LIGHT0_Z?PICA_REG_FRAG_LIGHT0_POSITION_Z
0146GPUREG_LIGHT0_SPOTDIR_XY?PICA_REG_FRAG_LIGHT0_SPOT_XY
0147GPUREG_LIGHT0_SPOTDIR_Z?PICA_REG_FRAG_LIGHT0_SPOT_Z
0148GPUREG_0148
0149GPUREG_LIGHT0_CONFIGPICA_REG_FRAG_LIGHT0_TYPE
014AGPUREG_LIGHT0_ATTENUATION_BIAS?PICA_REG_FRAG_LIGHT0_DIST_ATTN_BIAS
014BGPUREG_LIGHT0_ATTENUATION_SCALE?PICA_REG_FRAG_LIGHT0_DIST_ATTN_SCALE
014CGPUREG_014C
014DGPUREG_014D
014EGPUREG_014E
014FGPUREG_014F
0150GPUREG_LIGHT1_SPECULAR0?PICA_REG_FRAG_LIGHT1_SPECULAR0
0151GPUREG_LIGHT1_SPECULAR1?PICA_REG_FRAG_LIGHT1_SPECULAR1
0152GPUREG_LIGHT1_DIFFUSE?PICA_REG_FRAG_LIGHT1_DIFFUSE
0153GPUREG_LIGHT1_AMBIENT?PICA_REG_FRAG_LIGHT1_AMBIENT
0154GPUREG_LIGHT1_XY?PICA_REG_FRAG_LIGHT1_POSITION_XY
0155GPUREG_LIGHT1_Z?PICA_REG_FRAG_LIGHT1_POSITION_Z
0156GPUREG_LIGHT1_SPOTDIR_XY?PICA_REG_FRAG_LIGHT1_SPOT_XY
0157GPUREG_LIGHT1_SPOTDIR_Z?PICA_REG_FRAG_LIGHT1_SPOT_Z
0158GPUREG_0158
0159GPUREG_LIGHT1_CONFIG?PICA_REG_FRAG_LIGHT1_TYPE
015AGPUREG_LIGHT1_ATTENUATION_BIAS?PICA_REG_FRAG_LIGHT1_DIST_ATTN_BIAS
015BGPUREG_LIGHT1_ATTENUATION_SCALE?PICA_REG_FRAG_LIGHT1_DIST_ATTN_SCALE
015CGPUREG_015C
015DGPUREG_015D
015EGPUREG_015E
015FGPUREG_015F
0160GPUREG_LIGHT2_SPECULAR0?PICA_REG_FRAG_LIGHT2_SPECULAR0
0161GPUREG_LIGHT2_SPECULAR1?PICA_REG_FRAG_LIGHT2_SPECULAR1
0162GPUREG_LIGHT2_DIFFUSE?PICA_REG_FRAG_LIGHT2_DIFFUSE
0163GPUREG_LIGHT2_AMBIENT?PICA_REG_FRAG_LIGHT2_AMBIENT
0164GPUREG_LIGHT2_XY?PICA_REG_FRAG_LIGHT2_POSITION_XY
0165GPUREG_LIGHT2_Z?PICA_REG_FRAG_LIGHT2_POSITION_Z
0166GPUREG_LIGHT2_SPOTDIR_XY?PICA_REG_FRAG_LIGHT2_SPOT_XY
0167GPUREG_LIGHT2_SPOTDIR_Z?PICA_REG_FRAG_LIGHT2_SPOT_Z
0168GPUREG_0168
0169GPUREG_LIGHT2_CONFIG?PICA_REG_FRAG_LIGHT2_TYPE
016AGPUREG_LIGHT2_ATTENUATION_BIAS?PICA_REG_FRAG_LIGHT2_DIST_ATTN_BIAS
016BGPUREG_LIGHT2_ATTENUATION_SCALE?PICA_REG_FRAG_LIGHT2_DIST_ATTN_SCALE
016CGPUREG_016C
016DGPUREG_016D
016EGPUREG_016E
016FGPUREG_016F
0170GPUREG_LIGHT3_SPECULAR0?PICA_REG_FRAG_LIGHT3_SPECULAR0
0171GPUREG_LIGHT3_SPECULAR1?PICA_REG_FRAG_LIGHT3_SPECULAR1
0172GPUREG_LIGHT3_DIFFUSE?PICA_REG_FRAG_LIGHT3_DIFFUSE
0173GPUREG_LIGHT3_AMBIENT?PICA_REG_FRAG_LIGHT3_AMBIENT
0174GPUREG_LIGHT3_XY?PICA_REG_FRAG_LIGHT3_POSITION_XY
0175GPUREG_LIGHT3_Z?PICA_REG_FRAG_LIGHT3_POSITION_Z
0176GPUREG_LIGHT3_SPOTDIR_XY?PICA_REG_FRAG_LIGHT3_SPOT_XY
0177GPUREG_LIGHT3_SPOTDIR_Z?PICA_REG_FRAG_LIGHT3_SPOT_Z
0178GPUREG_0178
0179GPUREG_LIGHT3_CONFIG?PICA_REG_FRAG_LIGHT3_TYPE
017AGPUREG_LIGHT3_ATTENUATION_BIAS?PICA_REG_FRAG_LIGHT3_DIST_ATTN_BIAS
017BGPUREG_LIGHT3_ATTENUATION_SCALE?PICA_REG_FRAG_LIGHT3_DIST_ATTN_SCALE
017CGPUREG_017C
017DGPUREG_017D
017EGPUREG_017E
017FGPUREG_017F
0180GPUREG_LIGHT4_SPECULAR0?PICA_REG_FRAG_LIGHT4_SPECULAR0
0181GPUREG_LIGHT4_SPECULAR1?PICA_REG_FRAG_LIGHT4_SPECULAR1
0182GPUREG_LIGHT4_DIFFUSE?PICA_REG_FRAG_LIGHT4_DIFFUSE
0183GPUREG_LIGHT4_AMBIENT?PICA_REG_FRAG_LIGHT4_AMBIENT
0184GPUREG_LIGHT4_XY?PICA_REG_FRAG_LIGHT4_POSITION_XY
0185GPUREG_LIGHT4_Z?PICA_REG_FRAG_LIGHT4_POSITION_Z
0186GPUREG_LIGHT4_SPOTDIR_XY?PICA_REG_FRAG_LIGHT4_SPOT_XY
0187GPUREG_LIGHT4_SPOTDIR_Z?PICA_REG_FRAG_LIGHT4_SPOT_Z
0188GPUREG_0188
0189GPUREG_LIGHT4_CONFIG?PICA_REG_FRAG_LIGHT4_TYPE
018AGPUREG_LIGHT4_ATTENUATION_BIAS?PICA_REG_FRAG_LIGHT4_DIST_ATTN_BIAS
018BGPUREG_LIGHT4_ATTENUATION_SCALE?PICA_REG_FRAG_LIGHT4_DIST_ATTN_SCALE
018CGPUREG_018C
018DGPUREG_018D
018EGPUREG_018E
018FGPUREG_018F
0190GPUREG_LIGHT5_SPECULAR0?PICA_REG_FRAG_LIGHT5_SPECULAR0
0191GPUREG_LIGHT5_SPECULAR1?PICA_REG_FRAG_LIGHT5_SPECULAR1
0192GPUREG_LIGHT5_DIFFUSE?PICA_REG_FRAG_LIGHT5_DIFFUSE
0193GPUREG_LIGHT5_AMBIENT?PICA_REG_FRAG_LIGHT5_AMBIENT
0194GPUREG_LIGHT5_XY?PICA_REG_FRAG_LIGHT5_POSITION_XY
0195GPUREG_LIGHT5_Z?PICA_REG_FRAG_LIGHT5_POSITION_Z
0196GPUREG_LIGHT5_SPOTDIR_XY?PICA_REG_FRAG_LIGHT5_SPOT_XY
0197GPUREG_LIGHT5_SPOTDIR_Z?PICA_REG_FRAG_LIGHT5_SPOT_Z
0198GPUREG_0198
0199GPUREG_LIGHT5_CONFIG?PICA_REG_FRAG_LIGHT5_TYPE
019AGPUREG_LIGHT5_ATTENUATION_BIASPICA_REG_FRAG_LIGHT5_DIST_ATTN_BIAS
019BGPUREG_LIGHT5_ATTENUATION_SCALEPICA_REG_FRAG_LIGHT5_DIST_ATTN_SCALE
019CGPUREG_019C
019DGPUREG_019D
019EGPUREG_019E
019FGPUREG_019F
01A0GPUREG_LIGHT6_SPECULAR0?PICA_REG_FRAG_LIGHT6_SPECULAR0
01A1GPUREG_LIGHT6_SPECULAR1?PICA_REG_FRAG_LIGHT6_SPECULAR1
01A2GPUREG_LIGHT6_DIFFUSEPICA_REG_FRAG_LIGHT6_DIFFUSE
01A3GPUREG_LIGHT6_AMBIENTPICA_REG_FRAG_LIGHT6_AMBIENT
01A4GPUREG_LIGHT6_XYPICA_REG_FRAG_LIGHT6_POSITION_XY
01A5GPUREG_LIGHT6_ZPICA_REG_FRAG_LIGHT6_POSITION_Z
01A6GPUREG_LIGHT6_SPOTDIR_XY?PICA_REG_FRAG_LIGHT6_SPOT_XY
01A7GPUREG_LIGHT6_SPOTDIR_Z?PICA_REG_FRAG_LIGHT6_SPOT_Z
01A8GPUREG_01A8
01A9GPUREG_LIGHT6_CONFIG?PICA_REG_FRAG_LIGHT6_TYPE
01AAGPUREG_LIGHT6_ATTENUATION_BIASPICA_REG_FRAG_LIGHT6_DIST_ATTN_BIAS
01ABGPUREG_LIGHT6_ATTENUATION_SCALEPICA_REG_FRAG_LIGHT6_DIST_ATTN_SCALE
01ACGPUREG_01AC
01ADGPUREG_01AD
01AEGPUREG_01AE
01AFGPUREG_01AF
01B0GPUREG_LIGHT7_SPECULAR0?PICA_REG_FRAG_LIGHT7_SPECULAR0
01B1GPUREG_LIGHT7_SPECULAR1?PICA_REG_FRAG_LIGHT7_SPECULAR1
01B2GPUREG_LIGHT7_DIFFUSE?PICA_REG_FRAG_LIGHT7_DIFFUSE
01B3GPUREG_LIGHT7_AMBIENT?PICA_REG_FRAG_LIGHT7_AMBIENT
01B4GPUREG_LIGHT7_XY?PICA_REG_FRAG_LIGHT7_POSITION_XY
01B5GPUREG_LIGHT7_Z?PICA_REG_FRAG_LIGHT7_POSITION_Z
01B6GPUREG_LIGHT7_SPOTDIR_XY?PICA_REG_FRAG_LIGHT7_SPOT_XY
01B7GPUREG_LIGHT7_SPOTDIR_Z?PICA_REG_FRAG_LIGHT7_SPOT_Z
01B8GPUREG_01B8
01B9GPUREG_LIGHT7_CONFIG?PICA_REG_FRAG_LIGHT7_TYPE
01BAGPUREG_LIGHT7_ATTENUATION_BIASPICA_REG_FRAG_LIGHT7_DIST_ATTN_BIAS
01BBGPUREG_LIGHT7_ATTENUATION_SCALEPICA_REG_FRAG_LIGHT7_DIST_ATTN_SCALE
01BCGPUREG_01BC
01BDGPUREG_01BD
01BEGPUREG_01BE
01BFGPUREG_01BF
01C0GPUREG_LIGHTING_AMBIENT?PICA_REG_FRAG_LIGHT_AMBIENT
01C1GPUREG_01C1
01C2GPUREG_LIGHTING_NUM_LIGHTS?PICA_REG_FRAG_LIGHT_SRC_NUM
01C3GPUREG_LIGHTING_CONFIG0?PICA_REG_FRAG_LIGHT_FUNC_MODE0
01C4GPUREG_LIGHTING_CONFIG1?PICA_REG_FRAG_LIGHT_FUNC_MODE1
01C5GPUREG_LIGHTING_LUT_INDEX?PICA_REG_FRAG_LIGHT_LUT
01C6GPUREG_LIGHTING_ENABLE1?PICA_REG_FRAG_LIGHT_EN1
01C7GPUREG_01C7
01C8GPUREG_LIGHTING_LUT_DATA0?PICA_REG_FRAG_LIGHT_LUT_DATA0
01C9GPUREG_LIGHTING_LUT_DATA1?PICA_REG_FRAG_LIGHT_LUT_DATA1
01CAGPUREG_LIGHTING_LUT_DATA2?PICA_REG_FRAG_LIGHT_LUT_DATA2
01CBGPUREG_LIGHTING_LUT_DATA3?PICA_REG_FRAG_LIGHT_LUT_DATA3
01CCGPUREG_LIGHTING_LUT_DATA4?PICA_REG_FRAG_LIGHT_LUT_DATA4
01CDGPUREG_LIGHTING_LUT_DATA5?PICA_REG_FRAG_LIGHT_LUT_DATA5
01CEGPUREG_LIGHTING_LUT_DATA6?PICA_REG_FRAG_LIGHT_LUT_DATA6
01CFGPUREG_LIGHTING_LUT_DATA7?PICA_REG_FRAG_LIGHT_LUT_DATA7
01D0GPUREG_LIGHTING_LUTINPUT_ABS?PICA_REG_FRAG_LIGHT_ABSLUTINPUT
01D1GPUREG_LIGHTING_LUTINPUT_SELECT?PICA_REG_FRAG_LIGHT_LUTINPUT
01D2GPUREG_LIGHTING_LUTINPUT_SCALE?PICA_REG_FRAG_LIGHT_LUTSCALE
01D3GPUREG_01D3
01D4GPUREG_01D4
01D5GPUREG_01D5
01D6GPUREG_01D6
01D7GPUREG_01D7
01D8GPUREG_01D8
01D9GPUREG_LIGHTING_LIGHT_PERMUTATION?PICA_REG_FRAG_LIGHT_SRC_EN_ID
01DAGPUREG_01DA
01DBGPUREG_01DB
01DCGPUREG_01DC
01DDGPUREG_01DD
01DEGPUREG_01DE
01DFGPUREG_01DF
01E0GPUREG_01E0
01E1GPUREG_01E1
01E2GPUREG_01E2
01E3GPUREG_01E3
01E4GPUREG_01E4
01E5GPUREG_01E5
01E6GPUREG_01E6
01E7GPUREG_01E7
01E8GPUREG_01E8
01E9GPUREG_01E9
01EAGPUREG_01EA
01EBGPUREG_01EB
01ECGPUREG_01EC
01EDGPUREG_01ED
01EEGPUREG_01EE
01EFGPUREG_01EF
01F0GPUREG_01F0
01F1GPUREG_01F1
01F2GPUREG_01F2
01F3GPUREG_01F3
01F4GPUREG_01F4
01F5GPUREG_01F5
01F6GPUREG_01F6
01F7GPUREG_01F7
01F8GPUREG_01F8
01F9GPUREG_01F9
01FAGPUREG_01FA
01FBGPUREG_01FB
01FCGPUREG_01FC
01FDGPUREG_01FD
01FEGPUREG_01FE
01FFGPUREG_01FF

Geometry pipeline registers (0x200-0x27F) #

Register IDRegister nameNotesOfficial Name
0200GPUREG_ATTRIBBUFFERS_LOCPICA_REG_VTX_ATTR_ARRAYS_BASE_ADDR
0201GPUREG_ATTRIBBUFFERS_FORMAT_LOWPICA_REG_VTX_ATTR_ARRAYS0
0202GPUREG_ATTRIBBUFFERS_FORMAT_HIGHPICA_REG_VTX_ATTR_ARRAYS1
0203GPUREG_ATTRIBBUFFER0_OFFSETPICA_REG_LOAD_ARRAY0_ATTR_OFFSET
0204GPUREG_ATTRIBBUFFER0_CONFIG1PICA_REG_LOAD_ARRAY0_ELEMENT0
0205GPUREG_ATTRIBBUFFER0_CONFIG2PICA_REG_LOAD_ARRAY0_ELEMENT1
0206GPUREG_ATTRIBBUFFER1_OFFSET
0207GPUREG_ATTRIBBUFFER1_CONFIG1
0208GPUREG_ATTRIBBUFFER1_CONFIG2
0209GPUREG_ATTRIBBUFFER2_OFFSET
020AGPUREG_ATTRIBBUFFER2_CONFIG1
020BGPUREG_ATTRIBBUFFER2_CONFIG2
020CGPUREG_ATTRIBBUFFER3_OFFSET
020DGPUREG_ATTRIBBUFFER3_CONFIG1
020EGPUREG_ATTRIBBUFFER3_CONFIG2
020FGPUREG_ATTRIBBUFFER4_OFFSET
0210GPUREG_ATTRIBBUFFER4_CONFIG1
0211GPUREG_ATTRIBBUFFER4_CONFIG2
0212GPUREG_ATTRIBBUFFER5_OFFSET
0213GPUREG_ATTRIBBUFFER5_CONFIG1
0214GPUREG_ATTRIBBUFFER5_CONFIG2
0215GPUREG_ATTRIBBUFFER6_OFFSET
0216GPUREG_ATTRIBBUFFER6_CONFIG1
0217GPUREG_ATTRIBBUFFER6_CONFIG2
0218GPUREG_ATTRIBBUFFER7_OFFSET
0219GPUREG_ATTRIBBUFFER7_CONFIG1
021AGPUREG_ATTRIBBUFFER7_CONFIG2
021BGPUREG_ATTRIBBUFFER8_OFFSET
021CGPUREG_ATTRIBBUFFER8_CONFIG1
021DGPUREG_ATTRIBBUFFER8_CONFIG2
021EGPUREG_ATTRIBBUFFER9_OFFSET
021FGPUREG_ATTRIBBUFFER9_CONFIG1
0220GPUREG_ATTRIBBUFFER9_CONFIG2
0221GPUREG_ATTRIBBUFFER10_OFFSET
0222GPUREG_ATTRIBBUFFER10_CONFIG1
0223GPUREG_ATTRIBBUFFER10_CONFIG2
0224GPUREG_ATTRIBBUFFER11_OFFSET
0225GPUREG_ATTRIBBUFFER11_CONFIG1
0226GPUREG_ATTRIBBUFFER11_CONFIG2
0227GPUREG_INDEXBUFFER_CONFIGPICA_REG_INDEX_ARRAY_ADDR_OFFSET
0228GPUREG_NUMVERTICESPICA_REG_DRAW_VERTEX_NUM
0229GPUREG_GEOSTAGE_CONFIG?PICA_REG_DRAW_MODE0
022AGPUREG_VERTEX_OFFSETPICA_REG_DRAW_VERTEX_OFFSET
022BGPUREG_022B
022CGPUREG_022C
022DGPUREG_POST_VERTEX_CACHE_NUMPICA_REG_POST_VERTEX_CACHE_NUM
022EGPUREG_DRAWARRAYSPICA_REG_START_DRAW_ARRAY
022FGPUREG_DRAWELEMENTSPICA_REG_START_DRAW_ELEMENT
0230GPUREG_0230
0231GPUREG_VTX_FUNC?PICA_REG_VTX_FUNC
0232GPUREG_FIXEDATTRIB_INDEX?PICA_REG_VS_FIXED_ATTR
0233GPUREG_FIXEDATTRIB_DATA0?PICA_REG_VS_FIXED_ATTR_DATA0
0234GPUREG_FIXEDATTRIB_DATA1?PICA_REG_VS_FIXED_ATTR_DATA1
0235GPUREG_FIXEDATTRIB_DATA2?PICA_REG_VS_FIXED_ATTR_DATA2
0236GPUREG_0236
0237GPUREG_0237
0238GPUREG_CMDBUF_SIZE0PICA_REG_COMMAND_BUF_SIZE_CH0
0239GPUREG_CMDBUF_SIZE1PICA_REG_COMMAND_BUF_SIZE_CH1
023AGPUREG_CMDBUF_ADDR0PICA_REG_COMMAND_BUF_ADDR_CH0
023BGPUREG_CMDBUF_ADDR1PICA_REG_COMMAND_BUF_ADDR_CH1
023CGPUREG_CMDBUF_JUMP0PICA_REG_COMMAND_BUF_KICK_CH0
023DGPUREG_CMDBUF_JUMP1PICA_REG_COMMAND_BUF_KICK_CH1
023EGPUREG_023E
023FGPUREG_023F
0240GPUREG_0240
0241GPUREG_0241
0242GPUREG_VSH_NUM_ATTR?PICA_REG_VS_ATTR_NUM1
0243GPUREG_0243
0244GPUREG_VSH_COM_MODE?PICA_REG_VS_COM_MODE
0245GPUREG_START_DRAW_FUNC0?PICA_REG_START_DRAW_FUNC0
0246GPUREG_0246
0247GPUREG_0247
0248GPUREG_0248
0249GPUREG_0249
024AGPUREG_VSH_OUTMAP_TOTAL1?PICA_REG_VS_OUT_REG_NUM1
024BGPUREG_024B
024CGPUREG_024C
024DGPUREG_024D
024EGPUREG_024E
024FGPUREG_024F
0250GPUREG_0250
0251GPUREG_VSH_OUTMAP_TOTAL2?PICA_REG_VS_OUT_REG_NUM2
0252GPUREG_GSH_MISC0?PICA_REG_GS_MISC_REG0
0253GPUREG_GEOSTAGE_CONFIG2?PICA_REG_DRAW_MODE1
0254GPUREG_GSH_MISC1?PICA_REG_GS_MISC_REG1
0255GPUREG_0255
0256GPUREG_0256
0257GPUREG_0257
0258GPUREG_0258
0259GPUREG_0259
025AGPUREG_025A
025BGPUREG_025B
025CGPUREG_025C
025DGPUREG_025D
025EGPUREG_PRIMITIVE_CONFIG?PICA_REG_GS_OUT_REG_NUM3 / PICA_REG_DRAW_MODE2 / PICA_REG_VS_OUT_REG_NUM3
025FGPUREG_RESTART_PRIMITIVE?PICA_REG_START_DRAW_FUNC1
0260GPUREG_0260
0261GPUREG_0261
0262GPUREG_0262
0263GPUREG_0263
0264GPUREG_0264
0265GPUREG_0265
0266GPUREG_0266
0267GPUREG_0267
0268GPUREG_0268
0269GPUREG_0269
026AGPUREG_026A
026BGPUREG_026B
026CGPUREG_026C
026DGPUREG_026D
026EGPUREG_026E
026FGPUREG_026F
0270GPUREG_0270
0271GPUREG_0271
0272GPUREG_0272
0273GPUREG_0273
0274GPUREG_0274
0275GPUREG_0275
0276GPUREG_0276
0277GPUREG_0277
0278GPUREG_0278
0279GPUREG_0279
027AGPUREG_027A
027BGPUREG_027B
027CGPUREG_027C
027DGPUREG_027D
027EGPUREG_027E
027FGPUREG_027F

Shader registers (0x280-0x2DF) #

Register IDRegister nameNotesOfficial Name
Geometry shader
0280GPUREG_GSH_BOOLUNIFORMPICA_REG_GS_BOOL
0281GPUREG_GSH_INTUNIFORM_I0PICA_REG_GS_INT0
0282GPUREG_GSH_INTUNIFORM_I1PICA_REG_GS_INT1
0283GPUREG_GSH_INTUNIFORM_I2PICA_REG_GS_INT2
0284GPUREG_GSH_INTUNIFORM_I3PICA_REG_GS_INT3
0285GPUREG_0285
0286GPUREG_0286
0287GPUREG_0287
0288GPUREG_0288
0289GPUREG_GSH_INPUTBUFFER_CONFIGPICA_REG_GS_ATTR_NUM
028AGPUREG_GSH_ENTRYPOINTPICA_REG_GS_START_ADDR
028BGPUREG_GSH_ATTRIBUTES_PERMUTATION_LOWPICA_REG_GS_ATTR_IN_REG_MAP0
028CGPUREG_GSH_ATTRIBUTES_PERMUTATION_HIGHPICA_REG_GS_ATTR_IN_REG_MAP1
028DGPUREG_GSH_OUTMAP_MASKPICA_REG_GS_OUT_REG_MASK
028EGPUREG_028E
028FGPUREG_GSH_CODETRANSFER_ENDPICA_REG_GS_PROG_RENEWAL_END
0290GPUREG_GSH_FLOATUNIFORM_INDEXPICA_REG_GS_FLOAT_ADDR
0291GPUREG_GSH_FLOATUNIFORM_DATA0PICA_REG_GS_FLOAT_DATA0
0292GPUREG_GSH_FLOATUNIFORM_DATA1PICA_REG_GS_FLOAT_DATA1
0293GPUREG_GSH_FLOATUNIFORM_DATA2PICA_REG_GS_FLOAT_DATA2
0294GPUREG_GSH_FLOATUNIFORM_DATA3PICA_REG_GS_FLOAT_DATA3
0295GPUREG_GSH_FLOATUNIFORM_DATA4PICA_REG_GS_FLOAT_DATA4
0296GPUREG_GSH_FLOATUNIFORM_DATA5PICA_REG_GS_FLOAT_DATA5
0297GPUREG_GSH_FLOATUNIFORM_DATA6PICA_REG_GS_FLOAT_DATA6
0298GPUREG_GSH_FLOATUNIFORM_DATA7PICA_REG_GS_FLOAT_DATA7
0299GPUREG_0299
029AGPUREG_029A
029BGPUREG_GSH_CODETRANSFER_INDEX?PICA_REG_GS_PROG_ADDR
029CGPUREG_GSH_CODETRANSFER_DATA0PICA_REG_GS_PROG_DATA0
029DGPUREG_GSH_CODETRANSFER_DATA1PICA_REG_GS_PROG_DATA1
029EGPUREG_GSH_CODETRANSFER_DATA2PICA_REG_GS_PROG_DATA2
029FGPUREG_GSH_CODETRANSFER_DATA3PICA_REG_GS_PROG_DATA3
02A0GPUREG_GSH_CODETRANSFER_DATA4PICA_REG_GS_PROG_DATA4
02A1GPUREG_GSH_CODETRANSFER_DATA5PICA_REG_GS_PROG_DATA5
02A2GPUREG_GSH_CODETRANSFER_DATA6PICA_REG_GS_PROG_DATA6
02A3GPUREG_GSH_CODETRANSFER_DATA7PICA_REG_GS_PROG_DATA7
02A4GPUREG_02A4
02A5GPUREG_GSH_OPDESCS_INDEXPICA_REG_GS_PROG_SWIZZLE_ADDR
02A6GPUREG_GSH_OPDESCS_DATA0PICA_REG_GS_PROG_SWIZZLE_DATA0
02A7GPUREG_GSH_OPDESCS_DATA1PICA_REG_GS_PROG_SWIZZLE_DATA1
02A8GPUREG_GSH_OPDESCS_DATA2PICA_REG_GS_PROG_SWIZZLE_DATA2
02A9GPUREG_GSH_OPDESCS_DATA3PICA_REG_GS_PROG_SWIZZLE_DATA3
02AAGPUREG_GSH_OPDESCS_DATA4PICA_REG_GS_PROG_SWIZZLE_DATA4
02ABGPUREG_GSH_OPDESCS_DATA5PICA_REG_GS_PROG_SWIZZLE_DATA5
02ACGPUREG_GSH_OPDESCS_DATA6PICA_REG_GS_PROG_SWIZZLE_DATA6
02ADGPUREG_GSH_OPDESCS_DATA7PICA_REG_GS_PROG_SWIZZLE_DATA7
02AEGPUREG_02AE
02AFGPUREG_02AF
Vertex shader
02B0GPUREG_VSH_BOOLUNIFORMPICA_REG_VS_BOOL
02B1GPUREG_VSH_INTUNIFORM_I0PICA_REG_VS_INT0
02B2GPUREG_VSH_INTUNIFORM_I1PICA_REG_VS_INT1
02B3GPUREG_VSH_INTUNIFORM_I2PICA_REG_VS_INT2
02B4GPUREG_VSH_INTUNIFORM_I3PICA_REG_VS_INT3
02B5GPUREG_02B5
02B6GPUREG_02B6
02B7GPUREG_02B7
02B8GPUREG_02B8
02B9GPUREG_VSH_INPUTBUFFER_CONFIGPICA_REG_VS_ATTR_NUM0
02BAGPUREG_VSH_ENTRYPOINTPICA_REG_VS_START_ADDR
02BBGPUREG_VSH_ATTRIBUTES_PERMUTATION_LOWPICA_REG_VS_ATTR_IN_REG_MAP0
02BCGPUREG_VSH_ATTRIBUTES_PERMUTATION_HIGHPICA_REG_VS_ATTR_IN_REG_MAP1
02BDGPUREG_VSH_OUTMAP_MASKPICA_REG_VS_OUT_REG_MASK
02BEGPUREG_02BE
02BFGPUREG_VSH_CODETRANSFER_ENDPICA_REG_VS_PROG_RENEWAL_END
02C0GPUREG_VSH_FLOATUNIFORM_INDEXPICA_REG_VS_FLOAT_ADDR
02C1GPUREG_VSH_FLOATUNIFORM_DATA0PICA_REG_VS_FLOAT_DATA0
02C2GPUREG_VSH_FLOATUNIFORM_DATA1PICA_REG_VS_FLOAT_DATA1
02C3GPUREG_VSH_FLOATUNIFORM_DATA2PICA_REG_VS_FLOAT_DATA2
02C4GPUREG_VSH_FLOATUNIFORM_DATA3PICA_REG_VS_FLOAT_DATA3
02C5GPUREG_VSH_FLOATUNIFORM_DATA4PICA_REG_VS_FLOAT_DATA4
02C6GPUREG_VSH_FLOATUNIFORM_DATA5PICA_REG_VS_FLOAT_DATA5
02C7GPUREG_VSH_FLOATUNIFORM_DATA6PICA_REG_VS_FLOAT_DATA6
02C8GPUREG_VSH_FLOATUNIFORM_DATA7PICA_REG_VS_FLOAT_DATA7
02C9GPUREG_02C9
02CAGPUREG_02CA
02CBGPUREG_VSH_CODETRANSFER_INDEX?PICA_REG_VS_PROG_ADDR
02CCGPUREG_VSH_CODETRANSFER_DATA0PICA_REG_VS_PROG_DATA0
02CDGPUREG_VSH_CODETRANSFER_DATA1PICA_REG_VS_PROG_DATA1
02CEGPUREG_VSH_CODETRANSFER_DATA2PICA_REG_VS_PROG_DATA2
02CFGPUREG_VSH_CODETRANSFER_DATA3PICA_REG_VS_PROG_DATA3
02D0GPUREG_VSH_CODETRANSFER_DATA4PICA_REG_VS_PROG_DATA4
02D1GPUREG_VSH_CODETRANSFER_DATA5PICA_REG_VS_PROG_DATA5
02D2GPUREG_VSH_CODETRANSFER_DATA6PICA_REG_VS_PROG_DATA6
02D3GPUREG_VSH_CODETRANSFER_DATA7PICA_REG_VS_PROG_DATA7
02D4GPUREG_02D4
02D5GPUREG_VSH_OPDESCS_INDEX?PICA_REG_VS_PROG_SWIZZLE_ADDR
02D6GPUREG_VSH_OPDESCS_DATA0PICA_REG_VS_PROG_SWIZZLE_DATA0
02D7GPUREG_VSH_OPDESCS_DATA1PICA_REG_VS_PROG_SWIZZLE_DATA1
02D8GPUREG_VSH_OPDESCS_DATA2PICA_REG_VS_PROG_SWIZZLE_DATA2
02D9GPUREG_VSH_OPDESCS_DATA3PICA_REG_VS_PROG_SWIZZLE_DATA3
02DAGPUREG_VSH_OPDESCS_DATA4PICA_REG_VS_PROG_SWIZZLE_DATA4
02DBGPUREG_VSH_OPDESCS_DATA5PICA_REG_VS_PROG_SWIZZLE_DATA5
02DCGPUREG_VSH_OPDESCS_DATA6PICA_REG_VS_PROG_SWIZZLE_DATA6
02DDGPUREG_VSH_OPDESCS_DATA7PICA_REG_VS_PROG_SWIZZLE_DATA7
02DEGPUREG_02DE
02DFGPUREG_02DF

Unknown registers (0x2E0-0x2FF) #

Register IDRegister nameNotesOfficial Name
02E0GPUREG_02E0
02E1GPUREG_02E1
02E2GPUREG_02E2
02E3GPUREG_02E3
02E4GPUREG_02E4
02E5GPUREG_02E5
02E6GPUREG_02E6
02E7GPUREG_02E7
02E8GPUREG_02E8
02E9GPUREG_02E9
02EAGPUREG_02EA
02EBGPUREG_02EB
02ECGPUREG_02EC
02EDGPUREG_02ED
02EEGPUREG_02EE
02EFGPUREG_02EF
02F0GPUREG_02F0
02F1GPUREG_02F1
02F2GPUREG_02F2
02F3GPUREG_02F3
02F4GPUREG_02F4
02F5GPUREG_02F5
02F6GPUREG_02F6
02F7GPUREG_02F7
02F8GPUREG_02F8
02F9GPUREG_02F9
02FAGPUREG_02FA
02FBGPUREG_02FB
02FCGPUREG_02FC
02FDGPUREG_02FD
02FEGPUREG_02FE
02FFGPUREG_02FF

Miscellaneous registers #

GPUREG_FINALIZE #

BitsDescription
0-31unsigned, 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. Failure to write to this register in any command buffer will result in the GPU hanging.

Rasterizer registers #

GPUREG_FACECULLING_CONFIG #

BitsDescription
0-1unsigned, Culling mode

This register is used to configure the face culling mode.

Culling mode values:

ValueDescription
0None
1Front Face (Counter Clockwise)
2Back Face (Counter Clockwise)

GPUREG_VIEWPORT_WIDTH #

BitsDescription
0-23float1.7.16, width / 2

This register is used to configure the viewport width, along with GPUREG_VIEWPORT_INVW.

GPUREG_VIEWPORT_INVW #

BitsDescription
1-31float1.7.23, 2 / width

This register is used to configure the viewport width, along with GPUREG_VIEWPORT_WIDTH.

GPUREG_VIEWPORT_HEIGHT #

BitsDescription
0-23float1.7.16, height / 2

This register is used to configure the viewport height, along with GPUREG_VIEWPORT_INVH.

GPUREG_VIEWPORT_INVH #

BitsDescription
1-31float1.7.23, 2 / height

This register is used to configure the viewport height, along with GPUREG_VIEWPORT_HEIGHT.

GPUREG_FRAGOP_CLIP #

BitsDescription
0unsigned, Enabled (0 = disabled, 1 = enabled)

This register is used to enable clipping planes.

GPUREG_FRAGOP_CLIP_DATAi #

BitsDescription
0-23float1.7.16, Clipping plane coefficient i

This register is used to configure clipping plane coefficients.

GPUREG_DEPTHMAP_SCALE #

BitsDescription
0-23float1.7.16, Near - Far

This register is used to configure the depth range scale.

GPUREG_DEPTHMAP_OFFSET #

BitsDescription
0-23float1.7.16, Near + Polygon Offset

This register is used to configure the depth range bias.

GPUREG_SH_OUTMAP_TOTAL #

BitsDescription
0-2unsigned, Number of following attributes

This register is used to configure the total shader output map attributes.

GPUREG_SH_OUTMAP_Oi #

BitsDescription
0-4unsigned, Semantic for the x component of the register.
8-12unsigned, Semantic for the y component of the register.
16-20unsigned, Semantic for the z component of the register.
24-28unsigned, Semantic for the w component of the register.

These registers map components of the corresponding vertex shader output register to specific fixed-function semantics.

Semantics that have not been mapped to a component of an output register have a value of 1

Semantic values:

ValueSemanticDescription
0x00position.xVertex Position
0x01position.y
0x02position.z
0x03position.w
0x04normquat.xQuaternion specifying the normal/tangent frame (for fragment lighting)
0x05normquat.y
0x06normquat.z
0x07normquat.w
0x08color.rVertex color
0x09color.g
0x0Acolor.b
0x0Bcolor.a
0x0Ctexcoord0.uTexture coordinates for texture 0
0x0Dtexcoord0.v
0x0Etexcoord1.uTexture coordinates for texture 1
0x0Ftexcoord1.v
0x10texcoord0.w
0x12view.xView vector (for fragment lighting)
0x13view.y
0x14view.z
0x16texcoord2.uTexture coordinates for texture 2
0x17texcoord2.v
0x1FUnused componentShould be set for unused components of the output register

GPUREG_EARLYDEPTH_FUNC #

BitsDescription
0-1unsigned, Early depth function

This register configures the early depth test function.

Early depth function values:

ValueDescription
0>=
1>
2<=
3<

GPUREG_EARLYDEPTH_TEST1 #

BitsDescription
0unsigned, Enabled (0 = disabled, 1 = enabled)

This register sets whether the early depth test is enabled.

GPUREG_EARLYDEPTH_CLEAR #

BitsDescription
0unsigned, Trigger (0 = idle, 1 = clear)

This register triggers clearing the early depth data.

GPUREG_SH_OUTATTR_MODE #

BitsDescription
0unsigned, Use texture coordinates (0 = don’t use, 1 = use)

This register is used to configure the shader output attribute mode.

GPUREG_SCISSORTEST_MODE #

BitsDescription
0-1unsigned, Enabled (0 = disabled, 3 = enabled)

This register is used to enable scissor testing.

GPUREG_SCISSORTEST_POS #

BitsDescription
0-9unsigned, X1
16-25unsigned, Y1

This register is used to configure the scissor test start position.

GPUREG_SCISSORTEST_DIM #

BitsDescription
0-9unsigned, X2
16-25unsigned, Y2

This register is used to configure the scissor test end position.

GPUREG_VIEWPORT_XY #

BitsDescription
0-9signed, X
16-25signed, Y

This register is used to configure the viewport position.

GPUREG_EARLYDEPTH_DATA #

BitsDescription
0-23unsigned, Clear value

This register is used to configure the early depth clear value.

GPUREG_DEPTHMAP_ENABLE #

BitsDescription
0unsigned, Enabled (0 = disabled, 1 = enabled)

This register is used to enable depth range.

GPUREG_RENDERBUF_DIM #

BitsDescription
0-10unsigned, Width
12-21unsigned, Height - 1
240x1

This register is used to configure the output framebuffer dimensions.

GPUREG_SH_OUTATTR_CLOCK #

BitsDescription
0unsigned, ‘position.z’ present (0 = absent, 1 = present)
1unsigned, ‘color’ component present (0 = absent, 1 = present)
8unsigned, ’texcoord0’ component present (0 = absent, 1 = present)
9unsigned, ’texcoord1’ component present (0 = absent, 1 = present)
10unsigned, ’texcoord2’ component present (0 = absent, 1 = present)
16unsigned, ’texcoord0.w’ present (0 = absent, 1 = present)
24unsigned, ’normquat’ or ‘view’ component present (0 = absent, 1 = present)

This register controls the clock supply to parts relating to certain attributes.

Texturing registers #

GPUREG_TEXUNIT_CONFIG #

BitsDescription
0unsigned, Texture 0 enabled (0 = disabled, 1 = enabled)
1unsigned, Texture 1 enabled (0 = disabled, 1 = enabled)
2unsigned, Texture 2 enabled (0 = disabled, 1 = enabled)
30x0
8-9unsigned, Texture 3 coordinates
10unsigned, Texture 3 enabled (0 = disabled, 1 = enabled)
120x1
13unsigned, Texture 2 coordinates
16unsigned, Clear texture cache (0 = don’t clear, 1 = clear)
17-310x0

This register is used to enable texture units.

Texture 3 coordinates values:

ValueDescription
0Texture 0
1Texture 1
2Texture 2

Texture 2 coordinates values:

ValueDescription
0Texture 2
1Texture 1

GPUREG_TEXUNITi_BORDER_COLOR #

BitsDescription
0-7unsigned, Red
8-15unsigned, Green
16-23unsigned, Blue
24-31unsigned, Alpha

This register is used to set a texture unit’s border color.

GPUREG_TEXUNITi_DIM #

BitsDescription
0-10unsigned, Height
16-26unsigned, Width

This register is used to set a texture unit’s dimensions.

GPUREG_TEXUNITi_PARAM #

BitsDescription
1unsigned, Magnification filter
2unsigned, Minification filter
4-5unsigned, ETC1 (0 = not ETC1, 2 = ETC1) note: still 0 for ETC1A4
8-10unsigned, Wrap T
12-14unsigned, Wrap S
16-170x0
20unsigned, Shadow (Texture 0 only, 0 = not shadow, 1 = shadow)
24unsigned, Mipmap filter
28-30unsigned, Type (Texture 0 only)

This register is used to set a texture unit’s extra parameters.

Filter values:

ValueDescription
0Nearest
1Linear

Wrap values:

ValueDescription
0Clamp to edge
1Clamp to border
2Repeat
3Mirrored repeat

Type values:

ValueDescription
02D
1Cube map
2Shadow 2D
3Projection
4Shadow cube
5Disabled

GPUREG_TEXUNITi_LOD #

BitsDescription
0-12fixed1.4.8, Bias
16-19unsigned, Max Level
24-27unsigned, Min Level

This register is used to configure a texture unit’s level of detail.

GPUREG_TEXUNITi_ADDRi #

First ADDR register:

BitsDescription
0-27unsigned, Texture physical address >> 3

Subsequent ADDR registers:

BitsDescription
0-21unsigned, 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 🔗 Z-order curve. Mipmap data is stored directly following the main texture data.

If the texture is a cube:

RegisterDescription
ADDR1Positive X
ADDR2Negative X
ADDR3Positive Y
ADDR4Negative Y
ADDR5Positive Z
ADDR6Negative Z

Otherwise, ADDR(1) points to a 2D texture, and the rest are empty.

GPUREG_TEXUNITi_SHADOW #

BitsDescription
0unsigned, Perspective (0 = perspective, 1 = not perspective)
1-23fixed0.0.24, Z bias (upper 23 bits)

This register is used to set a texture unit’s shadow texture properties.

GPUREG_TEXUNITi_TYPE #

BitsDescription
0-3unsigned, Format

This register is used to set a texture unit’s data format.

Format values:

ValueDescriptionGL FormatGL Data Type
0x0RGBA8888GL_RGBAGL_UNSIGNED_BYTE
0x1RGB888GL_RGBGL_UNSIGNED_BYTE
0x2RGBA5551GL_RGBAGL_UNSIGNED_SHORT_5_5_5_1
0x3RGB565GL_RGBGL_UNSIGNED_SHORT_5_6_5
0x4RGBA4444GL_RGBAGL_UNSIGNED_SHORT_4_4_4_4
0x5IA8GL_LUMINANCE_ALPHAGL_UNSIGNED_BYTE
0x6HILO8
0x7I8GL_LUMINANCEGL_UNSIGNED_BYTE
0x8A8GL_ALPHAGL_UNSIGNED_BYTE
0x9IA44GL_LUMINANCE_ALPHAGL_UNSIGNED_BYTE_4_4_EXT
0xAI4
0xBA4GL_ALPHAGL_UNSIGNED_NIBBLE_EXT
0xCETC1GL_ETC1_RGB8_OES
0xDETC1A4

GPUREG_LIGHTING_ENABLE0 #

BitsDescription
0unsigned, Enabled (0 = disabled, 1 = enabled)

This register is used to enable lighting.

GPUREG_TEXUNIT3_PROCTEX0 #

BitsDescription
0-2unsigned, U-direction clamp
3-5unsigned, V-direction clamp
6-9unsigned, RGB mapping function
10-13unsigned, Alpha mapping function
14unsigned, Handle alpha separately (0 = don’t separate, 1 = separate)
15unsigned, Noise enabled (0 = disabled, 1 = enabled)
16-17unsigned, U-direction shift
18-19unsigned, V-direction shift
20-27float1.5.10, Texture bias (lower 8 bits)

This register is used to configure the procedural texture unit.

Clamp values:

ValueDescription
0Clamp to zero
1Clamp to edge
2Symmetrical repeat
3Mirrored repeat
4Pulse

Mapping function values:

ValueDescription
0U
1
2V
3
4(U + V) / 2
5(U² + V²) / 2
6sqrt(U² + V²)
7Minimum
8Maximum
9Rmax

Shift values:

ValueDescription
0None
1Odd
2Even

GPUREG_TEXUNIT3_PROCTEX1 #

BitsDescription
0-15fixed1.3.12, U-direction noise amplitude
16-31float1.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 #

BitsDescription
0-15fixed1.3.12, V-direction noise amplitude
16-31float1.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 #

BitsDescription
0-15float1.5.10, U-direction noise frequency
16-31float1.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 #

BitsDescription
0-2unsigned, Minification filter
3-6Min LOD (usually 0)
7-10Max LOD (usually 6)
11-18unsigned, Texture width
19-26float1.5.10, Texture bias (upper 8 bits)

This register is used to configure the procedural texture unit.

Minification filter values:

ValueDescription
0Nearest
1Linear
2Nearest, Mipmap Nearest
3Linear, Mipmap Nearest
4Nearest, Mipmap Linear
5Linear, Mipmap Linear

GPUREG_TEXUNIT3_PROCTEX5 #

BitsDescription
0-7unsigned, Texture offset (Mipmap level 0 / base level)
8-15unsigned, mipmap level 1 offset (usually 0x80)
16-23unsigned, mipmap level 2 offset (usually 0xC0)
24-31unsigned, 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 #

BitsDescription
0-7unsigned, Index
8-11unsigned, Reference table

This register is used to set which look-up table to write to, with GPUREG_PROCTEX_LUT_DATAi, at what index.

Reference table values:

ValueDescription
0Noise table
2RGB mapping function table
3Alpha mapping function table
4Color table
5Color difference table

GPUREG_PROCTEX_LUT_DATAi #

BitsDescription
0-31LUT 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:

BitsDescription
0-11fixed0.0.12, Value
12-23fixed0.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:

BitsDescription
0-11fixed0.0.12, Value
12-23fixed0.0.12 with two’s complement, Difference from next element

Alpha Mapping Function Table #

128 elements:

BitsDescription
0-11fixed0.0.12, Value
12-23fixed0.0.12 with two’s complement, Difference from next element

Color Table #

256 elements:

BitsDescription
0-7unsigned, Red
8-15unsigned, Green
16-23unsigned, Blue
24-31unsigned, Alpha

Color Difference Table #

256 elements:

BitsDescription
0-7signed, Half of red difference between current and next color table elements
8-15signed, Half of green difference between current and next color table elements
16-23signed, Half of blue difference between current and next color table elements
24-31signed, Half of alpha difference between current and next color table elements

GPUREG_TEXENVi_SOURCE #

BitsDescription
0-3unsigned, RGB source 0
4-7unsigned, RGB source 1
8-11unsigned, RGB source 2
16-19unsigned, Alpha source 0
20-23unsigned, Alpha source 1
24-27unsigned, Alpha source 2

This register configures a texture combiner’s sources.

Source values:

ValueDescription
0Primary color
1Fragment primary color
2Fragment secondary color
3Texture 0
4Texture 1
5Texture 2
6Texture 3
13Previous buffer
14Constant (from GPUREG_TEXENVi_COLOR)
15Previous

Using previous source in the first TEV stage returns the primary color, while previous buffer returns zero.

GPUREG_TEXENVi_OPERAND #

BitsDescription
0-3unsigned, RGB operand 0
4-7unsigned, RGB operand 1
8-11unsigned, RGB operand 2
12-14unsigned, Alpha operand 0
16-18unsigned, Alpha operand 1
20-22unsigned, Alpha operand 2

This register configures a texture combiner’s operands.

RGB operand values:

ValueDescription
0Source color
1One minus source color
2Source alpha
3One minus source alpha
4Source red
5One minus source red
8Source green
9One minus source green
12Source blue
13One minus source blue

Alpha operand values:

ValueDescription
0Source alpha
1One minus source alpha
2Source red
3One minus source red
4Source green
5One minus source green
6Source blue
7One minus source blue

GPUREG_TEXENVi_COMBINER #

BitsDescription
0-3unsigned, RGB combine
16-19unsigned, Alpha combine

This register configures a texture combiner’s combine mode.

Combine values:

ValueDescription
0Replace
1Modulate
2Add
3Add signed
4Interpolate
5Subtract
6Dot3 RGB
7Dot3 RGBA
8Multiply then add
9Add then multiply

GPUREG_TEXENVi_COLOR #

BitsDescription
0-7unsigned, Red
8-15unsigned, Green
16-23unsigned, Blue
24-31unsigned, Alpha

This register configures a texture combiner’s constant color.

GPUREG_TEXENVi_SCALE #

BitsDescription
0-1unsigned, RGB scale
16-17unsigned, Alpha scale

This register configures a texture combiner’s scale value.

Scale values:

ValueDescription
01x
12x
24x

GPUREG_TEXENV_UPDATE_BUFFER #

BitsDescription
0-2unsigned, Fog mode
3unsigned, Shading density source
8unsigned, TexEnv 1 RGB buffer input
9unsigned, TexEnv 2 RGB buffer input
10unsigned, TexEnv 3 RGB buffer input
11unsigned, TexEnv 4 RGB buffer input
12unsigned, TexEnv 1 alpha buffer input
13unsigned, TexEnv 2 alpha buffer input
14unsigned, TexEnv 3 alpha buffer input
15unsigned, TexEnv 4 alpha buffer input
16unsigned, Z flip (0 = don’t flip, 1 = flip)
24-250x0

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:

ValueDescription
0Disabled
5Fog
7Gas

Shading density source values:

ValueDescription
0Plain density
1Depth density

Buffer input values:

ValueDescription
0Previous buffer
1Previous

GPUREG_FOG_COLOR #

BitsDescription
0-7unsigned, Red
8-15unsigned, Green
16-23unsigned, Blue

This register is used to configure the color of fog.

GPUREG_GAS_ATTENUATION #

BitsDescription
0-15float1.5.10, Gas density attenuation

This register is used to configure the gas density attenuation.

GPUREG_GAS_ACCMAX #

BitsDescription
0-15float1.5.10, Gas maximum density accumulation

This register is used to configure the gas maximum density accumulation.

GPUREG_FOG_LUT_INDEX #

BitsDescription
0-15unsigned, Index

This register is used to set what index to write to with GPUREG_FOG_LUT_DATAi.

GPUREG_FOG_LUT_DATAi #

BitsDescription
0-23LUT 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:

BitsDescription
0-12fixed1.1.11, Difference from next element
13-23fixed0.0.11, Value

GPUREG_TEXENV_BUFFER_COLOR #

BitsDescription
0-7unsigned, Red
8-15unsigned, Green
16-23unsigned, Blue
24-31unsigned, Alpha

This register is used to configure the texture combiner buffer color.

Framebuffer registers #

GPUREG_COLOR_OPERATION #

BitsDescription
0-1unsigned, Fragment operation mode
8unsigned, Blend mode
16-250x0E4

This register is used to configure the fragment operation mode and whether to use logic ops or blending.

Fragment operation mode values:

ValueDescription
0Default
1Gas
3Shadow

Blend mode values:

ValueDescription
0Logic op
1Blend

GPUREG_BLEND_FUNC #

BitsDescription
0-2unsigned, RGB equation
8-10unsigned, Alpha equation
16-19unsigned, RGB source function
20-23unsigned, RGB destination function
24-27unsigned, Alpha source function
28-31unsigned, Alpha destination function

This register is used to configure the blending function.

Equation values:

ValueDescription
0Add
1Subtract
2Reverse subtract
3Minimum
4Maximum

Blend equations 5, 6, 7 appear to behave the same as blend equation 0 (Add)

Function values:

ValueDescription
0Zero
1One
2Source color
3One minus source color
4Destination color
5One minus destination color
6Source alpha
7One minus source alpha
8Destination alpha
9One minus destination alpha
10Constant color
11One minus constant color
12Constant alpha
13One minus constant alpha
14Source alpha saturate

GPUREG_LOGIC_OP #

BitsDescription
0-3unsigned, Logic op

This register is used to configure the logic op.

Logic op values:

ValueDescription
0Clear
1AND
2Reverse AND
3Copy
4Set
5Inverted copy
6Noop
7Invert
8NAND
9OR
10NOR
11XOR
12Equivalent
13Inverted AND
14Reverse OR
15Inverted OR

GPUREG_BLEND_COLOR #

BitsDescription
0-7unsigned, Red
8-15unsigned, Green
16-23unsigned, Blue
24-31unsigned, Alpha

This register is used to configure the blending color.

GPUREG_FRAGOP_ALPHA_TEST #

BitsDescription
0unsigned, Enabled (0 = disabled, 1 = enabled)
4-6unsigned, Function
8-15unsigned, Reference value

This register is used to configure alpha testing.

Function values:

ValueDescription
0Never
1Always
2Equal
3Not equal
4Less than
5Less than or equal
6Greater than
7Greater than or equal

GPUREG_STENCIL_TEST #

BitsDescription
0unsigned, Enabled (0 = disabled, 1 = enabled)
4-6unsigned, Function
8-15unsigned, Buffer mask
16-23signed, Reference value
24-31unsigned, Mask

This register is used to configure stencil testing.

Function values:

ValueDescription
0Never
1Always
2Equal
3Not equal
4Less than
5Less than or equal
6Greater than
7Greater than or equal

GPUREG_STENCIL_OP #

BitsDescription
0-2unsigned, Fail operation
4-6unsigned, Z-fail operation
8-10unsigned, Z-pass operation

This register is used to configure stencil result operations.

Operation values:

ValueDescription
0Keep
1Zero
2Replace
3Increment
4Decrement
5Invert
6Increment and wrap
7Decrement and wrap

GPUREG_DEPTH_COLOR_MASK #

BitsDescription
0unsigned, Depth test enabled (0 = disabled, 1 = enabled)
4-6unsigned, Depth function
8unsigned, Red write enabled (0 = disabled, 1 = enabled)
9unsigned, Green write enabled (0 = disabled, 1 = enabled)
10unsigned, Blue write enabled (0 = disabled, 1 = enabled)
11unsigned, Alpha write enabled (0 = disabled, 1 = enabled)
12unsigned, 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:

ValueDescription
0Never
1Always
2Equal
3Not equal
4Less than
5Less than or equal
6Greater than
7Greater than or equal

GPUREG_FRAMEBUFFER_INVALIDATE #

BitsDescription
0unsigned, Trigger (0 = idle, 1 = invalidate)
1-310x0

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 #

BitsDescription
0unsigned, Trigger (0 = idle, 1 = flush)
1-310x0

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 #

BitsDescription
0-3unsigned, Allow read (0 = disable, 0xF = enable)

This register configures read access from the color buffer.

GPUREG_COLORBUFFER_WRITE #

BitsDescription
0-3unsigned, Allow write (0 = disable, 0xF = enable)

This register configures write access to the color buffer.

GPUREG_DEPTHBUFFER_READ #

BitsDescription
0unsigned, Allow stencil read (0 = disable, 1 = enable)
1unsigned, Allow depth read (0 = disable, 1 = enable)

This register configures read access from the depth and stencil buffers.

GPUREG_DEPTHBUFFER_WRITE #

BitsDescription
0unsigned, Allow stencil write (0 = disable, 1 = enable)
1unsigned, Allow depth write (0 = disable, 1 = enable)

This register configures write access to the depth and stencil buffers.

GPUREG_DEPTHBUFFER_FORMAT #

BitsDescription
0-1unsigned, Format

This register configures the depth buffer data format.

Format values:

ValueDescription
016-bit depth
224-bit depth
324-bit depth + 8-bit stencil

GPUREG_COLORBUFFER_FORMAT #

BitsDescription
0-1unsigned, Pixel size
16-18unsigned, 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:

ValueDescription
016-bit color
232-bit color

Format values:

ValueDescription
0RGBA8/Gas
2RGB5A1
3RGB565
4RGBA4

GPUREG_EARLYDEPTH_TEST2 #

BitsDescription
0unsigned, Enabled (0 = disabled, 1 = enabled)

This register enables the early depth test.

GPUREG_FRAMEBUFFER_BLOCK32 #

BitsDescription
0unsigned, 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 display transfer flags. It is unknown if there are any advantages to using the 32x32 format.

Render block mode values:

ValueDescription
08x8 blocks
132x32 blocks

GPUREG_DEPTHBUFFER_LOC #

BitsDescription
0-27unsigned, Depth buffer physical address >> 3

This register configures the depth buffer physical address.

GPUREG_COLORBUFFER_LOC #

BitsDescription
0-27unsigned, Color buffer physical address >> 3

This register configures the color buffer physical address.

GPUREG_FRAMEBUFFER_DIM #

BitsDescription
0-10unsigned, Width
12-21unsigned, Height - 1
240x1

This register configures the framebuffer dimensions.

GPUREG_GAS_LIGHT_XY #

BitsDescription
0-7unsigned, Planar shading minimum intensity
8-15unsigned, Planar shading maximum intensity
16-23unsigned, Planar shading density attenuation

This register configures gas light planar shading.

GPUREG_GAS_LIGHT_Z #

BitsDescription
0-7unsigned, View shading minimum intensity
8-15unsigned, View shading maximum intensity
16-23unsigned, View shading density attenuation

This register configures gas light view shading.

GPUREG_GAS_LIGHT_Z_COLOR #

BitsDescription
0-7unsigned, View shading effect in line-of-sight direction
8Gas 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:

ValueDescription
0Gas density
1Light factor

GPUREG_GAS_LUT_INDEX #

BitsDescription
0-15unsigned, Index

This register is used to set what index to write to with GPUREG_GAS_LUT_DATAi.

GPUREG_GAS_LUT_DATA #

BitsDescription
0-31LUT 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:

BitsDescription
0-7signed, Red
8-15signed, Green
16-23signed, Blue

Last 8 elements:

BitsDescription
0-7unsigned, Red
8-15unsigned, Green
16-23unsigned, Blue

GPUREG_GAS_DELTAZ_DEPTH #

BitsDescription
0-23fixed0.16.8, Depth direction attenuation proportion
24-25unsigned, 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:

ValueDescription
0Never
1Always
2Greater than/Greater than or equal
3Less than/Less than or equal/Equal/Not equal

GPUREG_FRAGOP_SHADOW #

BitsDescription
0-15float1.5.10, Sum of penumbra scale and penumbra bias
16-31float1.5.10, Penumbra scale with reversed sign

This register is used to configure shadow properties.

Fragment lighting registers #

GPUREG_LIGHTi_SPECULAR0 #

BitsDescription
0-7unsigned, Blue
10-17unsigned, Green
20-27unsigned, Red

These registers contain the specular0 color of the corresponding light. Usually set to material_specular0*lightX_specular0.

GPUREG_LIGHTi_SPECULAR1 #

BitsDescription
0-7unsigned, Blue
10-17unsigned, Green
20-27unsigned, Red

These registers contain the specular1 color of the corresponding light. Usually set to material_specular1*lightX_specular1.

GPUREG_LIGHTi_DIFFUSE #

BitsDescription
0-7unsigned, Blue
10-17unsigned, Green
20-27unsigned, Red

These registers contain the diffuse color of the corresponding light. Usually set to material_diffuse*lightX_diffuse.

GPUREG_LIGHTi_AMBIENT #

BitsDescription
0-7unsigned, Blue
10-17unsigned, Green
20-27unsigned, Red

These registers contain the ambient color of the corresponding light. Usually set to material_ambient*lightX_ambient.

GPUREG_LIGHTi_XY #

BitsDescription
0-15float1.5.10, X coordinate
16-31float1.5.10, Y coordinate

These registers (along with GPUREG_LIGHTi_Z) represent the light position (for a positional light) or the light direction vector (for a directional light) of the corresponding light.

GPUREG_LIGHTi_Z #

BitsDescription
0-15float1.5.10, Z coordinate

These registers (along with GPUREG_LIGHTi_XY) represent the light position (for a positional light) or the light direction vector (for a directional light) of the corresponding light.

GPUREG_LIGHTi_SPOTDIR_XY #

BitsDescription
0-12fixed1.1.11, X coordinate (negated)
16-28fixed1.1.11, Y coordinate (negated)

These registers (along with GPUREG_LIGHTi_SPOTDIR_Z) represent the spot direction (unitary) vector of the corresponding light.

GPUREG_LIGHTi_SPOTDIR_Z #

BitsDescription
0-12fixed1.1.11, Z coordinate (negated)

These registers (along with GPUREG_LIGHTi_SPOTDIR_XY) represent the spot direction (unitary) vector of the corresponding light.

GPUREG_LIGHTi_CONFIG #

BitsDescription
0unsigned, Light type (0 = positional light, 1 = directional light)
1unsigned, Two side diffuse (0 = one side, 1 = both sides)
2unsigned, Use geometric factor 0 (0 = don’t use, 1 = use)
3unsigned, Use geometric factor 1 (0 = don’t use, 1 = use)

This register configures a light’s properties.

GPUREG_LIGHTi_ATTENUATION_BIAS #

BitsDescription
0-19float1.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_LIGHTi_ATTENUATION_SCALE #

BitsDescription
0-19float1.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 #

BitsDescription
0-7unsigned, Blue
10-17unsigned, Green
20-27unsigned, 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 #

BitsDescription
0-2unsigned, Number of active lights - 1

This register configures the number of active lights.

GPUREG_LIGHTING_CONFIG0 #

BitsDescription
0unsigned, Shadow factor enabled (0 = disabled, 1 = enabled) (usually accompanied by bit 16, 17, or 18)
2-3unsigned, Fresnel selector
4-7unsigned, Light environment configuration
8-110x4
16unsigned, Apply shadow attenuation to primary color (0 = don’t apply, 1 = apply)
17unsigned, Apply shadow attenuation to secondary color (0 = don’t apply, 1 = apply)
18unsigned, Invert shadow attenuation (0 = don’t invert, 1 = invert)
19unsigned, Apply shadow attenuation to alpha component (0 = don’t apply, 1 = apply)
22-23unsigned, Bump map texture unit
24-25unsigned, Shadow map texture unit
27unsigned, Clamp highlights (0 = disabled, 1 = enabled)
28-29unsigned, Bump mode
30unsigned, Recalculate bump vectors (0 = enabled, 1 = disabled) (usually set to 1 when bump mode is not 0)
310x1

This register configures the light environment.

Fresnel selector values:

ValueDescription
0None
1Primary alpha
2Secondary alpha
3Primary 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:

ValueDescriptionAvailable LUTs
0Configuration 0D0, RR, SP, DA
1Configuration 1FR, RR, SP, DA
2Configuration 2D0, D1, RR, DA
3Configuration 3D0, D1, FR, DA
4Configuration 4All except for FR
5Configuration 5All except for D1
6Configuration 6All except for RB and RG
8Configuration 7All

Bump mode values:

ValueDescription
0Not used
1Use as bump map
2Use as tangent map

GPUREG_LIGHTING_CONFIG1 #

BitsDescription
0unsigned, Fragment light source 0 shadows disabled (0 = enabled, 1 = disabled)
1unsigned, Fragment light source 1 shadows disabled (0 = enabled, 1 = disabled)
2unsigned, Fragment light source 2 shadows disabled (0 = enabled, 1 = disabled)
3unsigned, Fragment light source 3 shadows disabled (0 = enabled, 1 = disabled)
4unsigned, Fragment light source 4 shadows disabled (0 = enabled, 1 = disabled)
5unsigned, Fragment light source 5 shadows disabled (0 = enabled, 1 = disabled)
6unsigned, Fragment light source 6 shadows disabled (0 = enabled, 1 = disabled)
7unsigned, Fragment light source 7 shadows disabled (0 = enabled, 1 = disabled)
8unsigned, Fragment light source 0 spot light disabled (0 = enabled, 1 = disabled)
9unsigned, Fragment light source 1 spot light disabled (0 = enabled, 1 = disabled)
10unsigned, Fragment light source 2 spot light disabled (0 = enabled, 1 = disabled)
11unsigned, Fragment light source 3 spot light disabled (0 = enabled, 1 = disabled)
12unsigned, Fragment light source 4 spot light disabled (0 = enabled, 1 = disabled)
13unsigned, Fragment light source 5 spot light disabled (0 = enabled, 1 = disabled)
14unsigned, Fragment light source 6 spot light disabled (0 = enabled, 1 = disabled)
15unsigned, Fragment light source 7 spot light disabled (0 = enabled, 1 = disabled)
16unsigned, Term 0 distribution component D0 LUT disabled (0 = enabled, 1 = disabled)
17unsigned, Term 1 distribution component D1 LUT disabled (0 = enabled, 1 = disabled)
180x1
19unsigned, Fresnel FR LUT disabled (0 = enabled, 1 = disabled)
20unsigned, Term 1 reflection component RB LUT disabled (0 = enabled, 1 = disabled)
21unsigned, Term 1 reflection component RG LUT disabled (0 = enabled, 1 = disabled)
22unsigned, Term 1 reflection component RR LUT disabled (0 = enabled, 1 = disabled)
24unsigned, Fragment light source 0 distance attenuation disabled (0 = enabled, 1 = disabled)
25unsigned, Fragment light source 1 distance attenuation disabled (0 = enabled, 1 = disabled)
26unsigned, Fragment light source 2 distance attenuation disabled (0 = enabled, 1 = disabled)
27unsigned, Fragment light source 3 distance attenuation disabled (0 = enabled, 1 = disabled)
28unsigned, Fragment light source 4 distance attenuation disabled (0 = enabled, 1 = disabled)
29unsigned, Fragment light source 5 distance attenuation disabled (0 = enabled, 1 = disabled)
30unsigned, Fragment light source 6 distance attenuation disabled (0 = enabled, 1 = disabled)
31unsigned, 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 #

BitsDescription
0-7unsigned, Starting index
8-12unsigned, Look-up table

This register controls which LUT and what offset into it the GPUREG_LIGHTING_LUT_DATAi register writes to.

Lookup table values:

ValueDescription
0D0
1D1
3FR
4RB
5RG
6RR
8-15SP0-7
16-23DA0-7

GPUREG_LIGHTING_ENABLE1 #

BitsDescription
0unsigned, 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_DATAi #

BitsDescription
0-23LUT 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:

BitsDescription
0-11fixed0.0.12, Entry value
12-23fixed1.0.11, Absolute value of the difference between the next entry and this entry, used to implement linear interpolation

GPUREG_LIGHTING_LUTINPUT_ABS #

BitsDescription
1unsigned, abs() flag for the input of D0 (0 = enabled, 1 = disabled)
5unsigned, abs() flag for the input of D1 (0 = enabled, 1 = disabled)
9unsigned, abs() flag for the input of SP (0 = enabled, 1 = disabled)
13unsigned, abs() flag for the input of FR (0 = enabled, 1 = disabled)
17unsigned, abs() flag for the input of RB (0 = enabled, 1 = disabled)
21unsigned, abs() flag for the input of RG (0 = enabled, 1 = disabled)
25unsigned, 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 #

BitsDescription
0-2unsigned, Input selector for D0
4-6unsigned, Input selector for D1
8-10unsigned, Input selector for SP
12-14unsigned, Input selector for FR
16-18unsigned, Input selector for RB
20-22unsigned, Input selector for RG
24-26unsigned, Input selector for RR

This register selects the input from LUTs.

Input selector values:

ValueDescription
0N·H
1V·H
2N·V
3L·N
4-L·P (aka Spotlight aka SP)
5cos φ (aka CP)

GPUREG_LIGHTING_LUTINPUT_SCALE #

BitsDescription
0-2unsigned, Scaler selector for D0
4-6unsigned, Scaler selector for D1
8-10unsigned, Scaler selector for SP
12-14unsigned, Scaler selector for FR
16-18unsigned, Scaler selector for RB
20-22unsigned, Scaler selector for RG
24-26unsigned, Scaler selector for RR

This register controls the scaling that is applied to the output of a LUT.

Scaler selector values:

ValueDescription
01x
12x
24x
38x
60.25x
70.5x

GPUREG_LIGHTING_LIGHT_PERMUTATION #

BitsDescription
0-2unsigned, ID of the 1st enabled light
4-6unsigned, ID of the 2nd enabled light
8-10unsigned, ID of the 3rd enabled light
12-14unsigned, ID of the 4th enabled light
16-18unsigned, ID of the 5th enabled light
20-22unsigned, ID of the 6th enabled light
24-26unsigned, ID of the 7th enabled light
28-30unsigned, ID of the 8th enabled light

This register sets the IDs of enabled light sources.

Geometry pipeline registers #

GPUREG_ATTRIBBUFFERS_LOC #

BitsDescription
1-28unsigned, Vertex arrays base address

This register sets the base address of all vertex arrays.

GPUREG_ATTRIBBUFFERS_FORMAT_LOW #

BitsDescription
0-1unsigned, Vertex attribute 0 type
2-3unsigned, Vertex attribute 0 size
4-5unsigned, Vertex attribute 1 type
6-7unsigned, Vertex attribute 1 size
8-9unsigned, Vertex attribute 2 type
10-11unsigned, Vertex attribute 2 size
12-13unsigned, Vertex attribute 3 type
14-15unsigned, Vertex attribute 3 size
16-17unsigned, Vertex attribute 4 type
18-19unsigned, Vertex attribute 4 size
20-21unsigned, Vertex attribute 5 type
22-23unsigned, Vertex attribute 5 size
24-25unsigned, Vertex attribute 6 type
26-27unsigned, Vertex attribute 6 size
28-29unsigned, Vertex attribute 7 type
30-31unsigned, Vertex attribute 7 size

This register configures the types and sizes of the first 8 vertex attributes.

Vertex attribute type values:

ValueDescription
0Byte
1Unsigned byte
2Short
3Float

Vertex attribute size values:

ValueDescription
08 bits
116 bits
224 bits
332 bits

GPUREG_ATTRIBBUFFERS_FORMAT_HIGH #

BitsDescription
0-1unsigned, Vertex attribute 8 type
2-3unsigned, Vertex attribute 8 size
4-5unsigned, Vertex attribute 9 type
6-7unsigned, Vertex attribute 9 size
8-9unsigned, Vertex attribute 10 type
10-11unsigned, Vertex attribute 10 size
12-13unsigned, Vertex attribute 11 type
14-15unsigned, Vertex attribute 11 size
16-27unsigned, Fixed vertex attribute mask
28-31unsigned, Total vertex attribute count - 1

This register configures the types and sizes of the last 4 vertex attributes, along with the attribute mask and the total attribute count.

See GPUREG_ATTRIBBUFFERS_FORMAT_LOW for vertex attribute type and size values.

GPUREG_ATTRIBBUFFERi_OFFSET #

BitsDescription
0-27unsigned, Offset from base vertex arrays address

This register configures the offset of a vertex array from the base vertex arrays address.

GPUREG_ATTRIBBUFFERi_CONFIG1 #

BitsDescription
0-3unsigned, Component 1
4-7unsigned, Component 2
8-11unsigned, Component 3
12-15unsigned, Component 4
16-19unsigned, Component 5
20-23unsigned, Component 6
24-27unsigned, Component 7
28-31unsigned, Component 8

This register configures the first 8 component types of a vertex array.

Component values:

ValueDescription
0Vertex attribute 0
1Vertex attribute 1
2Vertex attribute 2
3Vertex attribute 3
4Vertex attribute 4
5Vertex attribute 5
6Vertex attribute 6
7Vertex attribute 7
8Vertex attribute 8
9Vertex attribute 9
10Vertex attribute 10
11Vertex attribute 11
124-byte padding
138-byte padding
1412-byte padding
1516-byte padding

GPUREG_ATTRIBBUFFERi_CONFIG2 #

BitsDescription
0-3unsigned, Component 9
4-7unsigned, Component 10
8-11unsigned, Component 11
12-15unsigned, Component 12
16-23unsigned, Bytes per vertex
28-31unsigned, Total number of components

This register configures the last 4 component types of a vertex array, along with the bytes per vertex and the total number of components.

See GPUREG_ATTRIBBUFFERi_CONFIG1 for component values.

GPUREG_INDEXBUFFER_CONFIG #

BitsDescription
0-27unsigned, Offset from base vertex arrays address
31Index type (0 = unsigned byte, 1 = unsigned short or drawing arrays)

This register configures the index array used when drawing elements.

GPUREG_NUMVERTICES #

BitsDescription
0-31unsigned, Number of vertices to render

This register sets the number of vertices to render.

GPUREG_GEOSTAGE_CONFIG #

BitsDescription
0-1unsigned, Geometry shader in use (0 = not in use, 2 = in use)
8unsigned, Drawing triangle elements (0 = not, 1 = drawing triangle elements)
90x0
31unsigned, Use reserved geometry shader subdivision (0 = don’t use, 1 = use)

This register configures the geometry stage of the GPU pipeline.

When using vertex buffers and drawing elements in triangles mode, bit 8 is set to 1, else it is set to 0.

GPUREG_VERTEX_OFFSET #

BitsDescription
0-31unsigned, Starting vertex offset

This register sets the offset of the first vertex in an array to render.

GPUREG_POST_VERTEX_CACHE_NUM #

BitsDescription
0-7unsigned, Number of entries in the post-vertex cache (usually 0x4 or 0x84)

This register configures the post-vertex cache.

GPUREG_DRAWARRAYS #

BitsDescription
0-31unsigned, Trigger (0 = idle, non-zero = draw arrays)

This register triggers drawing vertex arrays.

GPUREG_DRAWELEMENTS #

BitsDescription
0-31unsigned, Trigger (0 = idle, non-zero = draw elements)

This register triggers drawing vertex array elements.

GPUREG_VTX_FUNC #

BitsDescription
0-31unsigned, Trigger (0 = idle, non-zero = clear post-vertex cache)

This register triggers clearing the post-vertex cache.

GPUREG_FIXEDATTRIB_INDEX #

BitsDescription
0-3unsigned, Fixed attribute index (0-11, 0xF = immediate-mode submission)

This register selects the index of the fixed attribute to be input with GPUREG_FIXEDATTRIB_DATAi. See GPU/Fixed Vertex Attributes and GPU/Immediate-Mode Vertex Submission for usage info.

GPUREG_FIXEDATTRIB_DATAi #

BitsDescription
DATA0:
0-7float1.7.16, Vertex attribute element 3 (Z) (bits 16-23)
8-31float1.7.16, Vertex attribute element 4 (W)
DATA1:
0-15float1.7.16, Vertex attribute element 2 (Y) (bits 8-23)
16-31float1.7.16, Vertex attribute element 3 (Z) (bits 0-15)
DATA2:
0-23float1.7.16, Vertex attribute element 1 (X)
24-31float1.7.16, Vertex attribute element 2 (Y) (bits 0-7)

Accepts four 24-bit floating-point values that make up a vertex attribute. Stored in the fixed attribute currently specified with GPUREG_FIXEDATTRIB_INDEX. If immediate-mode vertex submission is enabled (by writing 0xF to the index register) then vertex data is input here directly.

GPUREG_CMDBUF_SIZE0 #

BitsDescription
0-20unsigned, Size of command buffer 0 >> 3

This register sets the size of the first command buffer.

GPUREG_CMDBUF_SIZE1 #

BitsDescription
0-20unsigned, Size of command buffer 1 >> 3

This register sets the size of the second command buffer.

GPUREG_CMDBUF_ADDR0 #

BitsDescription
0-28unsigned, Physical address of command buffer 0 >> 3

This register sets the physical address of the first command buffer.

GPUREG_CMDBUF_ADDR1 #

BitsDescription
0-28unsigned, Physical address of command buffer 1 >> 3

This register sets the physical address of the second command buffer.

GPUREG_CMDBUF_JUMP0 #

BitsDescription
0-31unsigned, Trigger (0 = idle, non-zero = execute command buffer 0)

This register triggers a jump to the first command buffer.

GPUREG_CMDBUF_JUMP1 #

BitsDescription
0-31unsigned, Trigger (0 = idle, non-zero = execute command buffer 1)

This register triggers a jump to the second command buffer.

GPUREG_VSH_NUM_ATTR #

BitsDescription
0-3unsigned, Number of vertex shader input attributes - 1

This register sets the number of vertex shader input attributes.

GPUREG_VSH_COM_MODE #

BitsDescription
0unsigned, Geometry shader configuration enabled (0 = disabled, 1 = enabled)

This register sets whether to use the geometry shader configuration or reuse the vertex shader configuration for the geometry shader shading unit. When disabled and the geometry unit is not in use, as configured by GPUREG_GEOSTAGE_CONFIG, uniforms, outmap mask, program code and swizzle data are propagated to the geometry shader unit.

GPUREG_START_DRAW_FUNC0 #

BitsDescription
0unsigned, Mode (0 = drawing, 1 = configuration)
1-70x0

This register is related to drawing. When the mode value is set to 1, rendering is not performed properly. When set to 0, changes to the vertex shader configuration registers are not applied correctly. Because of this, it is usually initialized to 1, set to 0 immediately before triggering a draw, and set back to 1 immediately after triggering a draw.

GPUREG_VSH_OUTMAP_TOTAL1 #

BitsDescription
0-3unsigned, Number of vertex shader output map registers - 1

This register sets the number of vertex shader output map registers.

GPUREG_VSH_OUTMAP_TOTAL2 #

BitsDescription
0-3unsigned, Number of vertex shader output map registers - 1

This register sets the number of vertex shader output map registers.

GPUREG_GSH_MISC0 #

BitsDescription
0-31unsigned, Misc data (0x00000001 = Reserved geometry shader subdivision in use, 0x01004302 = Particle system in use, 0 otherwise)

This register configures miscellaneous geometry shader properties.

GPUREG_GEOSTAGE_CONFIG2 #

BitsDescription
0unsigned, Function indicator (with vertex buffers: 0 = draw elements, 1 = draw arrays, without: 0 = not inputting, 1 = inputting vertex attribute data)
8unsigned, Drawing triangle elements (0 = not, 1 = drawing triangle elements)

This register configures the geometry stage of the GPU pipeline.

When using vertex buffers, bit 0 is set to 1 before drawing arrays, and cleared to 0 immediately after. When using immediate mode to directly input vertex attribute data, bit 0 is set to 1 before inputting vertex attribute data, and cleared to 0 immediately after. While bit 0 is set to 1, some register writes outside of the 0x200-0x254 and 0x280-0x2DF ranges may be processed incorrectly.

When using vertex buffers and drawing elements in triangles mode, bit 8 is set to 1, else it is set to 0.

GPUREG_GSH_MISC1 #

BitsDescription
0-4unsigned, Reserved geometry shader subdivision type (2 = Loop, 3 = Catmull-Clark)

This register configures the type of reserved geometry shader subdivision in use. The value is ignored when a subdivision is not in use.

GPUREG_PRIMITIVE_CONFIG #

BitsDescription
0-3unsigned, Number of vertex shader output map registers - 1
8-9unsigned, Primitive mode

This register configures primitive drawing.

Primitive mode value:

ValueDescription
0Triangles
1Triangle strip
2Triangle fan
3Geometry primitive

GPUREG_RESTART_PRIMITIVE #

BitsDescription
0unsigned, Trigger (0 = idle, 1 = reset primitive)
1-310x0

This register triggers resetting primitive drawing.

Shader registers #

GPUREG_SH_BOOLUNIFORM #

BitsDescription
0unsigned, Boolean register b0 value (0 = false, 1 = true)
1unsigned, Boolean register b1 value (0 = false, 1 = true)
2unsigned, Boolean register b2 value (0 = false, 1 = true)
3unsigned, Boolean register b3 value (0 = false, 1 = true)
4unsigned, Boolean register b4 value (0 = false, 1 = true)
5unsigned, Boolean register b5 value (0 = false, 1 = true)
6unsigned, Boolean register b6 value (0 = false, 1 = true)
7unsigned, Boolean register b7 value (0 = false, 1 = true)
8unsigned, Boolean register b8 value (0 = false, 1 = true)
9unsigned, Boolean register b9 value (0 = false, 1 = true)
10unsigned, Boolean register b10 value (0 = false, 1 = true)
11unsigned, Boolean register b11 value (0 = false, 1 = true)
12unsigned, Boolean register b12 value (0 = false, 1 = true)
13unsigned, Boolean register b13 value (0 = false, 1 = true)
14unsigned, Boolean register b14 value (0 = false, 1 = true)
15unsigned, Boolean register b15 value (0 = false, 1 = true)
16-310x7FFF

This register is used to set a shader unit’s boolean registers.

GPUREG_SH_INTUNIFORM_Ii #

BitsDescription
0-7unsigned, Integer register ii X value
8-15unsigned, Integer register ii Y value
16-23unsigned, Integer register ii Z value
24-31unsigned, Integer register ii W value

These registers are used to set a shader unit’s integer registers.

GPUREG_SH_INPUTBUFFER_CONFIG #

BitsDescription
0-3unsigned, Input vertex attributes - 1
8-15unsigned, Use reserved geometry shader subdivision (0 = don’t use, 1 = use) (always 0 for vertex shaders)
16-230x0
24-31unsigned, Use geometry shader (0x8 = use, 0xA0 = don’t use) (always 0xA0 for vertex shaders)

This register is used to configure a shader unit’s input buffer.

GPUREG_SH_ENTRYPOINT #

BitsDescription
0-15unsigned, Code entry point offset, in 32-bit words
16-310x7FFF

This register sets a shader unit’s code entry point.

For geometry shaders, this sets the entry point for 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 entry point, it can also be used to set this single shader unit to run from a different entry point than the other three, even when running a vertex shader.

For vertex shaders, this sets the entry point for the shader units set to vertex shader mode. Depending on the current geometry stage mode this can include either all 4 shader units or just 3 of them.

GPUREG_SH_ATTRIBUTES_PERMUTATION_LOW #

BitsDescription
0-3unsigned, Vertex attribute 0 input register index
4-7unsigned, Vertex attribute 1 input register index
8-11unsigned, Vertex attribute 2 input register index
12-15unsigned, Vertex attribute 3 input register index
16-19unsigned, Vertex attribute 4 input register index
20-23unsigned, Vertex attribute 5 input register index
24-27unsigned, Vertex attribute 6 input register index
28-31unsigned, Vertex attribute 7 input register index

This register sets the shader unit 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. For example, having bits 0-3 set to 5 means that, in the shader program, v5 will contain the input buffer’s 1st attribute.

GPUREG_SH_ATTRIBUTES_PERMUTATION_HIGH #

BitsDescription
0-3unsigned, Vertex attribute 8 input register index
4-7unsigned, Vertex attribute 9 input register index
8-11unsigned, Vertex attribute 10 input register index
12-15unsigned, Vertex attribute 11 input register index
16-19unsigned, Vertex attribute 12 input register index
20-23unsigned, Vertex attribute 13 input register index
24-27unsigned, Vertex attribute 14 input register index
28-31unsigned, Vertex attribute 15 input register index

This register sets the shader unit 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. For example, having bits 0-3 set to 5 means that, in the shader program, v5 will contain the input buffer’s 9th attribute.

GPUREG_SH_OUTMAP_MASK #

BitsDescription
0unsigned, Output register o0 enabled (0 = disabled, 1 = enabled)
1unsigned, Output register o1 enabled (0 = disabled, 1 = enabled)
2unsigned, Output register o2 enabled (0 = disabled, 1 = enabled)
3unsigned, Output register o3 enabled (0 = disabled, 1 = enabled)
4unsigned, Output register o4 enabled (0 = disabled, 1 = enabled)
5unsigned, Output register o5 enabled (0 = disabled, 1 = enabled)
6unsigned, Output register o6 enabled (0 = disabled, 1 = enabled)
7unsigned, Output register o7 enabled (0 = disabled, 1 = enabled) (vertex shader only)
8unsigned, Output register o8 enabled (0 = disabled, 1 = enabled) (vertex shader only)
9unsigned, Output register o9 enabled (0 = disabled, 1 = enabled) (vertex shader only)
10unsigned, Output register o10 enabled (0 = disabled, 1 = enabled) (vertex shader only)
11unsigned, Output register o11 enabled (0 = disabled, 1 = enabled) (vertex shader only)
12unsigned, Output register o12 enabled (0 = disabled, 1 = enabled) (vertex shader only)
13unsigned, Output register o13 enabled (0 = disabled, 1 = enabled) (vertex shader only)
14unsigned, Output register o14 enabled (0 = disabled, 1 = enabled) (vertex shader only)
15unsigned, Output register o15 enabled (0 = disabled, 1 = enabled) (vertex shader only)
16-310x0

This register toggles a shader unit’s output registers.

GPUREG_SH_CODETRANSFER_END #

BitsDescription
0-31unsigned, Signal transfer end (0 = idle, non-zero = signal)

This register’s value should be set to 1 in order to finalize the transfer of shader code.

GPUREG_SH_FLOATUNIFORM_INDEX #

BitsDescription
0-7unsigned, Target floating-point register index (range 0-95, where 0 = c0 and 95 = c95)
31unsigned, Transfer mode (0 = float1.7.16, 1 = float1.8.23)

This register sets the shader unit’s target floating-point register and transfer mode for the data transfer system. As such it is typically used right before GPUREG_SH_FLOATUNIFORM_DATAi, though writing to one register does not make writing to the other mandatory.

GPUREG_SH_FLOATUNIFORM_DATAi #

BitsDescription
0-31Floating-point register component data

This register is used to set the components of a shader unit’s floating-point registers, each having 4 components. The data format which should be written to it depends on the transfer mode set with GPUREG_SH_FLOATUNIFORM_INDEX. This register functions as a FIFO queue: after each time a 4-component uniform register is successfully set, the target register index is incremented, meaning that groups of uniforms with contiguous register IDs can be set with only one initial write to GPUREG_SH_FLOATUNIFORM_INDEX.

  • 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_SH_CODETRANSFER_INDEX #

BitsDescription
0-11unsigned, Target shader code offset

This register is used to set the offset at which upcoming shader code data transferred through GPUREG_SH_CODETRANSFER_DATAi should be written.

GPUREG_SH_CODETRANSFER_DATAi #

BitsDescription
0-31unsigned, Shader instruction data

This register is used to transfer shader code data. This register behaves as a FIFO queue: each write to this register writes the provided value to the GPU shader code memory bank at the offset initially set by GPUREG_SH_CODETRANSFER_INDEX. The offset in question is incremented after each write to this register.

GPUREG_SH_OPDESCS_INDEX #

BitsDescription
0-11unsigned, Target shader operand descriptor offset

This register is used to set the offset at which upcoming shader operand descriptor data transferred through GPUREG_SH_OPDESCS_DATAi should be written.

GPUREG_SH_OPDESCS_DATAi #

BitsDescription
0-31unsigned, Shader operand descriptor data

This register is used to transfer shader operand descriptor data. This register behaves as a FIFO queue: each write to this register writes the provided value to the GPU shader operand descriptor memory bank at the offset initially set by GPUREG_SH_OPDESCS_INDEX. The offset in question is incremented after each write to this register.

Category:GPU