Gfx GX Fn GXLoadTexMtxImm - wowjinxy/libPorpoise GitHub Wiki
GXLoadTexMtxImm
- Category:
Transformation and Matrix
- Matrix Status:
Partial
- Matrix Notes: Verified first-pass texture matrix load and corrected
GX_MTX2x4 vs GX_MTX3x4 size handling; HW2 post-transform (GX_PTTEXMTX*) path remains unimplemented.
- Matrix Link: Gfx-GX-API-Matrix
Official SDK (Reference)
- Manual root:
reference/rvlsdk/man/en_US/gx
- Primary SDK source area:
demos/PikminDemo/src/gx (GC-style Dolphin GX source)
- Notes:
libPorpoise Implementation
- Runtime implementation area:
src/gx
- Public API surface:
include/dolphin/gx
- Notes:
SDK vs Porpoise Diff
- Signature parity:
- Behavioral parity:
-
Known divergence:
Validation Checklist
Working Notes
- Docs checked against
reference/man/gfx/gx/Transform/GXLoadTexMtxImm.html and SDK source in reference/gx/GXTransform.c.
- Runtime checked in
src/gx/pc_gx.c:
- Accepts both
GX_MTX2x4 and GX_MTX3x4 input forms.
GX_MTX2x4: copies first 2 rows and synthesizes row3 as [0,0,0,1] for backend use.
GX_MTX3x4: copies full 12 floats directly.
- Marks texgen state dirty so updated matrix is applied to subsequent draws.
- Matrix ID mapping currently targets first-pass texture matrices (
GX_TEXMTX* / slot IDs); GX_IDENTITY is treated as fixed identity and not writable.
- Known divergence (keeps status
Partial):
- HW2 post-transform texture matrix IDs (
GX_PTTEXMTX*) are not yet mapped/loaded in this backend path.