Repository navigation
Gfx GX Fn GXSetTevColor
wowjinxy edited this page Apr 9, 2026
·
2 revisions
- Category:
Texture Environment - Matrix Status:
Implemented - Matrix Notes: Implemented typed register-color upload (
GXColor) for TEV color registers. - Matrix Link: Gfx-GX-API-Matrix
- Manual page:
reference/man/gfx/gx/Tev/GXSetTevColor.html - SDK source:
reference/ACGC-PC-Port/src/static/dolphin/gx/GXTev.c(GXSetTevColor) - SDK behavior:
- Writes one TEV color register (
id) using unsigned 8-bit RGBA inputs fromGXColor. - Intended for constant TEV register colors; signed 10-bit path is
GXSetTevColorS10. - SDK debug path checks GX-begin state (no explicit
idrange assert in this function).
- Writes one TEV color register (
- Public API declaration:
include/dolphin/gx/GXTev.h - Runtime implementation:
src/gx/pc_gx.c(GXSetTevColor) - Behavior:
- Stores
GXColorinto per-register TEV constant color state and marks TEV-color state dirty. - Uses normalized float storage (
0..1) for shader consumption. - Applies
id < GX_MAX_TEVREGguard.
- Stores
- Signature parity:
- Signatures match (
GXTevRegID,GXColor).
- Signatures match (
- Behavioral parity:
- TEV constant register color update behavior matches intended TEV usage.
- Known divergence:
- SDK uses BP register writes directly; Porpoise stores normalized float state for shader path.
- Porpoise adds explicit
idbound guard; SDK code path does not include a dedicatedidassert in this routine.
- GX demo coverage checked
- Pikmin usage path checked
- Matrix status updated if needed
- Notes updated with concrete file/function references
- No runtime code change required in this pass.