Gfx GX Fn GXGetTlutObjData - wowjinxy/libPorpoise GitHub Wiki

GXGetTlutObjData

  • Category: Texture
  • Matrix Status: Implemented
  • Matrix Notes: Getter returns TLUT data pointer.
  • Matrix Link: Gfx-GX-API-Matrix

Official SDK (Reference)

  • Manual page: reference/man/gfx/gx/Texture/GXGetTlutObjData.html
  • SDK source: reference/ACGC-PC-Port/src/static/dolphin/gx/GXTexture.c (GXGetTlutObjData)
  • SDK behavior:
    • Returns base TLUT data pointer from GXTlutObj state.
    • No state mutation; pure accessor.
    • SDK debug path asserts non-null TLUT object pointer.

libPorpoise Implementation

  • Public API declaration: include/dolphin/gx/GXGet.h
  • Runtime implementation: src/gx/pc_gx_texture.c (GXGetTlutObjData)
  • Behavior:
    • Returns TLUT data pointer from PC-side TLUT object storage (tlutobj_get_data_ptr).
    • No side effects.

SDK vs Porpoise Diff

  • Signature parity:
    • Manual documents GXTlutObj*; SDK source uses const GXTlutObj*.
    • Porpoise uses GXTlutObj*; call-site semantics are equivalent for reads.
  • Behavioral parity:
    • SDK: returns TLUT data pointer from object.
    • Porpoise: same.
  • Known divergence:
    • SDK has explicit debug assert on null pointer; Porpoise accessor does not assert in this path.

Validation Checklist

  • GX demo coverage checked
  • Pikmin usage path checked
  • Matrix status updated if needed
  • Notes updated with concrete file/function references

Working Notes

  • No runtime code change required in this pass.