Gfx GX Fn GXGetTexObjFmt - wowjinxy/libPorpoise GitHub Wiki
GXGetTexObjFmt
- Category:
Texture
- Matrix Status:
Implemented
- Matrix Notes: Getter returns texture format.
- Matrix Link: Gfx-GX-API-Matrix
Official SDK (Reference)
- Manual page:
reference/man/gfx/gx/Texture/GXGetTexObjFmt.html
- SDK source:
reference/ACGC-PC-Port/src/static/dolphin/gx/GXTexture.c (GXGetTexObjFmt)
- SDK behavior:
- Returns texture format (
GXTexFmt) from texture object state.
- No state mutation; pure accessor.
- SDK debug path asserts non-null texture object pointer.
libPorpoise Implementation
- Public API declaration:
include/dolphin/gx/GXGet.h
- Runtime implementation:
src/gx/pc_gx_texture.c (GXGetTexObjFmt)
- Behavior:
- Returns format from
TEXOBJ_FORMAT in PC texture object storage.
- No side effects.
SDK vs Porpoise Diff
- Signature parity:
- Manual documents
GXTexObj*; SDK source uses const GXTexObj*.
- Porpoise uses
GXTexObj*; call-site semantics are equivalent for reads.
- Behavioral parity:
- SDK: returns texture format enum stored in object.
- Porpoise: returns texture format enum stored in object.
- Known divergence:
- SDK has explicit debug assert on null pointer; Porpoise follows existing low-level getter convention (no assert in this accessor path).
Validation Checklist
Working Notes
- No runtime code change required in this pass.