Gfx GX Fn GXGetTexObjUserData - wowjinxy/libPorpoise GitHub Wiki
GXGetTexObjUserData
- Category:
Texture
- Matrix Status:
Implemented
- Matrix Notes: Implemented user-data retrieval for pointers set via
GXInitTexObjUserData.
- Matrix Link: Gfx-GX-API-Matrix
Official SDK (Reference)
- Manual page:
reference/man/gfx/gx/Texture/GXGetTexObjUserData.html
- SDK source:
reference/ACGC-PC-Port/src/static/dolphin/gx/GXTexture.c (GXGetTexObjUserData)
- SDK behavior:
- Returns the user-data pointer stored in the
GXTexObj.
- 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 (GXGetTexObjUserData)
- Behavior:
- Returns stored user-data pointer from per-object PC-side metadata.
- 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 pointer previously set by
GXInitTexObjUserData.
- Porpoise: same.
- Known divergence:
- SDK has explicit debug assert on null pointer; Porpoise fail-soft returns
NULL when object pointer is null.
Validation Checklist
Working Notes
- No runtime code change required in this pass.