Gfx GX Fn GXEndDisplayList - wowjinxy/libPorpoise GitHub Wiki

GXEndDisplayList

  • Category: Display List
  • Matrix Status: Implemented
  • Matrix Notes: Verified docs behavior: returns padded 32-byte size with GX_NOP tail, returns 0 on overflow/error path, restores normal submission, and now explicitly flushes on end.
  • Matrix Link: Gfx-GX-API-Matrix

Official SDK (Reference)

  • Manual root: reference/rvlsdk/man/en_US/gx
  • Primary SDK source area: demos/PikminDemo/src/gx (GC-style Dolphin GX source)
  • Notes:
    • Confirm official signature/prototype
    • Confirm documented side effects (register/state updates)
    • Confirm special behavior and edge cases from manual

libPorpoise Implementation

  • Runtime implementation area: src/gx
  • Public API surface: include/dolphin/gx
  • Notes:
    • Confirm API signature matches SDK
    • Confirm state writes match SDK semantics
    • Confirm backend behavior in PC renderer path

SDK vs Porpoise Diff

  • Signature parity:
    • SDK:
    • Porpoise:
  • Behavioral parity:
    • SDK:
    • Porpoise:
  • Known divergence:

Validation Checklist

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

Working Notes

  • Docs checked against reference/man/gfx/gx/DisplayList/GXEndDisplayList.html and SDK source in reference/gx/GXDisplayList.c.
  • Runtime checked in src/gx/pc_gx.c:
    • Calls GXFlush() during end, matching documented behavior.
    • Returns 0 when no display list is active (non-assert PC fail-soft path) or when overflow occurred.
    • On success, returns byte count padded to 32-byte multiple and fills tail with GX_NOP.
    • Clears display-list recording state and resumes normal command submission path.
  • Result: function-level parity is correct for end-recording semantics; no runtime code changes needed.