Gfx GX Fn GXSetClipMode - wowjinxy/libPorpoise GitHub Wiki
GXSetClipMode
Category: Clipping and Culling
Matrix Status: Partial
Matrix Notes: Clip mode value is tracked and sanitized to SDK enum values; backend intentionally keeps standard clipping (no direct emulation of GX clip-disable path).
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:
libPorpoise Implementation
Runtime implementation area: src/gx
Public API surface: include/dolphin/gx
Notes:
SDK vs Porpoise Diff
Signature parity:
Behavioral parity:
Known divergence:
Validation Checklist
Working Notes
Docs checked against reference/man/gfx/gx/Culling/GXSetClipMode.html and SDK source in reference/gx/GXTransform.c.
SDK behavior:
Writes mode directly to XF clip-disable register (XF_CLIPDISABLE) with GX_CLIP_ENABLE/GX_CLIP_DISABLE.
Runtime behavior in src/gx/pc_gx.c:
Flushes pending geometry before state change.
Stores clip mode with enum sanitization (DISABLE or ENABLE), matching SDK accepted-value domain.
Keeps GL_DEPTH_CLAMP disabled to avoid incorrect overdraw artifacts from prior approximation attempts.
Known divergence:
GX_CLIP_DISABLE is tracked but not fully emulated in GL rasterization path; clipping remains effectively enabled.
🗂️ Page Index for this GitHub Wiki