Gfx GX Fn GXBegin - wowjinxy/libPorpoise GitHub Wiki
GXBegin
- Category:
Geometry and Vertex
- Matrix Status:
Implemented
- Matrix Notes: SDK parity pass done: typed signature, primitive/vtxfmt guards, and documented max-count handling (
nverts==0 -> 65536).
- Matrix Link: Gfx-GX-API-Matrix
Official SDK (Reference)
- Manual page:
E:/GPT5/Porpoise_SDK/libPorpoise/reference/man/gfx/gx/Geometry/GXBegin.html
- Related page:
E:/GPT5/Porpoise_SDK/libPorpoise/reference/man/gfx/gx/Geometry/GXEnd.html
- SDK source parity check area:
E:/GPT5/ACGC-PC-Port-Debug-Stuff/src/static/dolphin/gx
- 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 GXBegin(GXPrimitive, GXVtxFmt, u16)
- Porpoise: matches in
pc_gx.c and public header
- Behavioral parity:
- SDK: primitive begin packet with typed primitive/vtxfmt and 16-bit vertex count
- Porpoise: mirrors begin-state setup and expected-count tracking, with soft guards for invalid input
- Known divergence:
- SDK uses assert/debug checks for invalid input; PC backend fails soft (fallback to
GX_TRIANGLES / GX_VTXFMT0).
- PC backend auto-flushes previous pending batch when a new
GXBegin starts if GXEnd was omitted.
Validation Checklist
Working Notes
- Implementation location:
GXBegin in E:/GPT5/Porpoise_SDK/libPorpoise/src/gx/pc_gx.c near the vertex-submission section.