Matthew Stanley
|
2ba74f3b4b
|
pgxp: land clean-room value-propagation engine (phases 0+1, issue #92)
The G1.2/G1.3 mechanism: per-word RAM/scratchpad + per-GPR + per-GTE-reg
shadows carrying sub-pixel projections BY PROVENANCE, validated against
the actual guest word on every read (never guessed from rounded position
- the measured 93.1%-ambiguous G1.4 dead end). Clean-room from psx-spx +
public design docs; vendored duckstation (CC BY-NC-ND) and beetle-psx
(GPL) trees remain black-box oracles only - no code ported.
- runtime/src/pgxp.cpp + pgxp.h: engine, per-vertex GetPreciseVertex
(dataflow -> ambiguity-gated position cache -> native) with truncation
agreement + tolerance safeguards; stats; test accessors.
- pgxp_hooks.h: 5-entry hook funnel; PGXP_*() macros no-op unless
-DPSX_PGXP=1 (codegen-time gate over ONE generated tree); appended
PGXPHooks* table member in OverlayCallbacks (ABI bump ships with the
Phase-2 emitter change).
- Both interpreters wired: loads/stores/COP2 + precision-carrying
arithmetic (moves, add/sub, or-merge, 16-bit shifts, LUI, HI/LO).
- gte.cpp: RTPS feeds the GTE reg shadows; retired s_precise_sxy FIFO,
hashed s_precision_store, and plain-store invalidation (redundant
under validate-on-read; store hot path gets 3 calls back).
- gpu.c: prepare_precise_triangle rewritten per-vertex; perspective UVs
share the same provenance and compose per triangle.
- [video] pgxp_cpu_mode / pgxp_tolerance keys; TCP pgxp verb live-
toggles geometry/texture/cpu_mode/tolerance; geom_correction census
grew the pgxp dataflow counters (G1.9 gate metric).
- tests: new pgxp_test (registered); gte_register_access_test updated
to precise invalidation contract. 33/33 enabled tests green.
Also fixed while landing (both broke a fresh master tree):
- runtime.cmake: once-only psx_game_version.txt stamp (multi-target
file(GENERATE) collision broke every fresh single-config configure).
- test_overlay_capture_retry: SDL3 rot (SDL_SetMainReady gone, inverted
SDL_Init check) -> psx_sdl_init.
Tracked as beads-eio.3.48; postmortem + this landing: ENHANCEMENTS.md
G1-G1.10.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
2026-08-15 18:34:47 -07:00 |
|