Gfx GX Fn GXSetPointSize - wowjinxy/libPorpoise GitHub Wiki

GXSetPointSize

  • Category: Geometry and Vertex
  • Matrix Status: Partial
  • Matrix Notes: Size units corrected to GX 1/6-pixel semantics and state is tracked; textured point offset behavior is not rasterized.
  • 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/Geometry/GXSetPointSize.html:
    • Signature matches: void GXSetPointSize(u8 size, GXTexOffset tex_offsets).
    • Size unit is 1/6 pixel (max effective size 42.5 px at size=255).
    • tex_offsets is intended for textured point-corner coordinates after texgen.
  • Runtime checked in src/gx/pc_gx.c:
    • Stores size and tex_offsets in GX state (g_gx.point_size, g_gx.point_tex_offset).
    • Applies raster size via OpenGL with unit conversion: glPointSize(size / 6.0f).
    • Textured point offset behavior is tracked in state but not rasterized in backend (matrix stays Partial).