benilla-re systems structs docs

s_d3dStateHandlerIndex

global · gx

Address
0x5a34dc · 70 bytes, up to 0x5a3521
Type
uint8_t[70]
Meaning
Maps a render state id to the index of its Direct3D handler in the jump table 0x5a3460
Confidence
verified, proof one
Finding
gx/renderstate#render-state-ids

Finding: Render state ids in gx: render state

Both applicators read the id and act as below; a state the table gives to the cache only is applied by a later flush.

idsstate
0depth bias value (Depth bias)
1, 2, 3, 4material: ambient and diffuse colour, emissive colour, specular colour, specular power
5normalise normals
6global ambient colour
7, 8blend mode 0 to 10; alpha reference
9 to 13fog mode (0 linear, 1 exp, 2 exp2), start, end, density, colour
14 to 17lighting on; fog on; depth test on; depth function 0 to 3
18, 19depth write; colour write mask (4 bits)
20 to 22cull on; clip plane mask (6 bits); multisample on
0x17 to 0x1etexture of stage id - 0x17
0x1f to 0x26combine preset of stage id - 0x1f
0x27 to 0x2emip bias of the stage (float)

The derivation is in the doc.