benilla-re systems structs docs

s_d3dAddressMode

global · gx

Address
0x80a254 · 8 bytes, up to 0x80a25b
Type
uint32_t[2]
Meaning
Holds the D3DTADDRESS value for a clear and a set wrap bit: clamp, wrap
Confidence
verified, proof one
Finding
gx/renderstate#stage-sampler-state

Finding: Stage sampler state in gx: render state

Binding a texture to a stage (ids 0x17 to 0x1e) also sets the stage's sampler from the texture's flags word (textures.md, Texture flags word). Direct3D (0x5a29d0) sets the texture, then magnification, minimisation and mip filters from the table 0x85c7d8 by the low three bits, ADDRESSU and ADDRESSV from bits 3 and 4 (0x80a254: clear CLAMP 3, set WRAP 1), and MAXANISOTROPY from bits 9 to 13. OpenGL (0x59f170) sets GL_TEXTURE_MAG_FILTER and MIN_FILTER from 0x80a01c and 0x80a004, wrap from bits 3 and 4 (GL_REPEAT when set, GL_CLAMP_TO_EDGE or GL_CLAMP when clear), mip generation from bit 6 and anisotropy from bits 9 to 13.

The derivation is in the doc.