Gfx GX Fn GXSetArray - wowjinxy/libPorpoise GitHub Wiki
GXSetArray
- Category:
Geometry and Vertex
- Matrix Status:
Implemented
- Matrix Notes: SDK parity pass done: valid attr range + NBT aliasing now match Dolphin
GXAttr.c.
- Matrix Link: Gfx-GX-API-Matrix
Official SDK (Reference)
- Manual page:
E:/GPT5/Porpoise_SDK/libPorpoise/reference/man/gfx/gx/Geometry/GXSetArray.html
- SDK source parity check area:
E:/GPT5/ACGC-PC-Port-Debug-Stuff/src/static/dolphin/gx/GXAttr.c
- Notes:
libPorpoise Implementation
- Runtime implementation area:
E:/GPT5/Porpoise_SDK/libPorpoise/src/gx/pc_gx.c
- Public API surface:
E:/GPT5/Porpoise_SDK/libPorpoise/include/dolphin/gx/GXGeometry.h
- Notes:
SDK vs Porpoise Diff
- Signature parity:
- SDK:
void GXSetArray(GXAttr attr, const void* base_ptr, u8 stride)
- Porpoise: now matches.
- Behavioral parity:
- SDK: aliases
GX_VA_NBT to GX_VA_NRM, validates attr domain, then stores array base/stride.
- Porpoise: now mirrors this behavior.
- Known divergence:
- SDK writes masked physical addresses into CP registers; PC backend stores host pointers directly for software/indexed decode.
- SDK debug path asserts on invalid args; PC backend uses fail-soft early return.
Validation Checklist
Working Notes
- This API is central for matrix/light indexed loads too, not just vertex attribute arrays.