Gfx GX Fn GXBeginDisplayList - wowjinxy/libPorpoise GitHub Wiki

GXBeginDisplayList

  • Category: Display List
  • Matrix Status: Implemented
  • Matrix Notes: Verified PC backend behavior against docs: recording mode start, nested-call guard, and 32-byte alignment/size validation for list buffer.
  • 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/GXBeginDisplayList.html and SDK source in reference/gx/GXDisplayList.c.
  • Runtime checked in src/gx/pc_gx.c:
    • Flushes pending primitive state before entering display-list recording (pc_gx_commit_pending_and_flush()).
    • Enforces non-nested call behavior (if (g_pc_gx_dl.active) return; in non-assert PC path).
    • Enforces SDK-required buffer constraints:
      • list non-null
      • size non-zero and 32-byte aligned
      • list pointer 32-byte aligned
    • Initializes DL recording state (active/buf/size/off/overflow) for subsequent GX command capture.
  • Result: function-level parity is correct for begin-recording semantics; no runtime code changes needed.