Gfx GX Fn GXEnableTexOffsets - wowjinxy/libPorpoise GitHub Wiki

GXEnableTexOffsets

  • Category: Geometry and Vertex
  • Matrix Status: Partial
  • Matrix Notes: Enable bits are stored per texcoord for line/point paths, but offset effect is not yet applied during primitive expansion/rasterization.
  • 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/GXEnableTexOffsets.html:
    • Signature matches: void GXEnableTexOffsets(GXTexCoordID coord, GXBool line_enable, GXBool point_enable).
    • Behavior is an enable gate for applying tex_offsets (from GXSetLineWidth/GXSetPointSize) to expanded line/point corners, per texcoord and per primitive class.
  • Runtime checked in src/gx/pc_gx.c:
    • Stores enable bits per texcoord: g_gx.tex_offset_line_enable[coord] and g_gx.tex_offset_point_enable[coord].
    • Guards invalid coord >= 8 and otherwise tracks state correctly.
    • Offset effect is not yet consumed by line/point raster expansion path, so backend remains intentionally Partial.