feat(gpu,hle): add gameplay-anchored input replay and 5s memory telemetry #301

Manually merged
github merged 1 commit from github-bot/gh-301 into gh-pr/301/base 2026-12-02 01:50:15 +00:00 AGit
Owner

@⁠Androtim on GitHub · 2026-12-02 01:19 UTC · original
Androtim:feat/input-replay-and-memory-telemetry → main · +694 −8 · 6 files · 1 commits · merged 2026-12-02 01:48 UTC

Summary

Addresses the replicable benchmark loop & memory telemetry priority in #276 so long driving/streaming runs can be replayed deterministically and logged automatically with full System RAM, Commit, Shared GPU, and VRAM metrics.

  • Sustained-3D Gameplay Detector & Periodic 5-Second Memory Telemetry (crates/victory-gpu):
    • Added telemetry module tracking sustained 3D rendering (>= 200\ draws/frame for 20 consecutive frames), exporting \in_gameplay()\ and \gameplay_elapsed_ms()\ from \ ictory-gpu.
    • Hooked \ elemetry::log_memory(host())\ into the 5-second meter cadence in \host.rs\ (reusing \panel::process_memory()\ and \panel::pc_memory()), logging \dedicated_mb, \udget_mb, \shared_mb, \working_set_mb, \private_commit_mb, \commit_left_mb, \ ree_ram_mb, and \ otal_ram_mb.
  • Gameplay-Anchored Input Record & Replay (crates/victory-hle, pps/victory):
    • Added \VICTORY_INPUT_RECORD\ and \VICTORY_INPUT_PLAY\ CSV streaming (\phase,t_ms,buttons,lt,rt,lx,ly,rx,ry) in \gameinput.rs, anchoring \play\ events to \ = 0 ms\ once 3D gameplay starts while handling variable boot/menu timings cleanly.
    • Preserved \VICTORY_INPUT_RECORD\ and \VICTORY_INPUT_PLAY\ in \pps/victory/src/play.rs\ \KEPT.

Verification

  • \cargo +1.98.1-x86_64-pc-windows-gnu xtask policy\ -> \sset policy: 320 files ok\
  • \cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-gpu --lib --locked telemetry::\ -> 3 passed, 0 failed
  • \cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-gpu --lib --locked panel::\ -> 7 passed, 0 failed
  • \cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-hle --lib --locked gameinput::\ -> 31 passed, 0 failed, 1 ignored (hardware pad probe)
  • \cargo +1.98.1-x86_64-pc-windows-gnu test -p victory --bin MiniVI --locked\ -> 46 passed, 0 failed
  • \cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --locked --all-targets -- -D warnings\ -> passed
  • \cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --locked --all-targets --features diagnostics -- -D warnings\ -> passed
  • \cargo +1.98.1-x86_64-pc-windows-gnu build --release --bin MiniVI --locked\ + \objdump -p\ -> standard Windows DLLs only.
  • Plain --release\ Live GPU Smoke Tests (1440p Series X parity, RTX 4060 Ti 8 GB / 32 GB RAM):
    • Record pass (30s, \VICTORY_INPUT_RECORD): Reached 3D world (\14.4 fps, \preparing 26.8 ms, \
**@⁠Androtim** on GitHub · 2026-12-02 01:19 UTC · [original](https://github.com/Androtim/MiniVI/pull/301) `Androtim:feat/input-replay-and-memory-telemetry` → `main` · +694 −8 · 6 files · 1 commits · merged 2026-12-02 01:48 UTC ## Summary Addresses the replicable benchmark loop & memory telemetry priority in #276 so long driving/streaming runs can be replayed deterministically and logged automatically with full System RAM, Commit, Shared GPU, and VRAM metrics. - **Sustained-3D Gameplay Detector & Periodic 5-Second Memory Telemetry (crates/victory-gpu):** - Added [telemetry module](crates/victory-gpu/src/host/telemetry.rs) tracking sustained 3D rendering (\>= 200\ draws/frame for 20 consecutive frames), exporting \in_gameplay()\ and \gameplay_elapsed_ms()\ from \ ictory-gpu\. - Hooked \ elemetry::log_memory(host())\ into the 5-second meter cadence in \host.rs\ (reusing \panel::process_memory()\ and \panel::pc_memory()\), logging \dedicated_mb\, \udget_mb\, \shared_mb\, \working_set_mb\, \private_commit_mb\, \commit_left_mb\, \ ree_ram_mb\, and \ otal_ram_mb\. - **Gameplay-Anchored Input Record & Replay (crates/victory-hle, pps/victory):** - Added \VICTORY_INPUT_RECORD\ and \VICTORY_INPUT_PLAY\ CSV streaming (\phase,t_ms,buttons,lt,rt,lx,ly,rx,ry\) in \gameinput.rs\, anchoring \play\ events to \ = 0 ms\ once 3D gameplay starts while handling variable boot/menu timings cleanly. - Preserved \VICTORY_INPUT_RECORD\ and \VICTORY_INPUT_PLAY\ in \pps/victory/src/play.rs\ \KEPT\. ## Verification - \cargo +1.98.1-x86_64-pc-windows-gnu xtask policy\ -> \sset policy: 320 files ok\ - \cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-gpu --lib --locked telemetry::\ -> 3 passed, 0 failed - \cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-gpu --lib --locked panel::\ -> 7 passed, 0 failed - \cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-hle --lib --locked gameinput::\ -> 31 passed, 0 failed, 1 ignored (hardware pad probe) - \cargo +1.98.1-x86_64-pc-windows-gnu test -p victory --bin MiniVI --locked\ -> 46 passed, 0 failed - \cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --locked --all-targets -- -D warnings\ -> passed - \cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --locked --all-targets --features diagnostics -- -D warnings\ -> passed - \cargo +1.98.1-x86_64-pc-windows-gnu build --release --bin MiniVI --locked\ + \objdump -p\ -> standard Windows DLLs only. - **Plain \--release\ Live GPU Smoke Tests (1440p Series X parity, RTX 4060 Ti 8 GB / 32 GB RAM):** - **Record pass (30s, \VICTORY_INPUT_RECORD\):** Reached 3D world (\14.4 fps\, \preparing 26.8 ms\, \
- Add crates/victory-gpu/src/host/telemetry.rs with sustained-3D gameplay detector (in_gameplay / gameplay_elapsed_ms) and 5-second memory telemetry logging (dedicated/budget/shared VRAM, working set, private commit, commit left, free/total RAM).
- Add VICTORY_INPUT_RECORD / VICTORY_INPUT_PLAY controller CSV record and gameplay-anchored replay in victory-hle gameinput.rs, and preserve both vars in play::KEPT.
- Verify with xtask policy, targeted unit tests (telemetry, panel, gameinput, MiniVI), dual workspace clippy, release build + objdump, and plain release record + replay live GPU runs.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-02 01:23:59 +00:00
github-bot changed target branch from main to gh-pr/301/base 2026-12-02 01:50:13 +00:00
github manually merged commit 10a795676e into gh-pr/301/base 2026-12-02 01:50:15 +00:00
Author
Owner

@⁠Androtim on GitHub · 2026-12-02 01:48 UTC · original

Audited full diff (10a79567, +694 -8 across 6 files) for Directive #12 (replicable driving benchmark loop + periodic 5-second full memory telemetry):

  • telemetry.rs & host.rs: Lock-free observe_gameplay_draws latches after 20 consecutive frames >= 200 draws (single Acquire load once active — zero steady-state overhead); log_memory(host()) hooks cleanly into the existing 5-second Meter cadence reusing panel::process_memory() / panel::pc_memory() to emit dedicated_mb, budget_mb, shared_mb, working_set_mb, private_commit_mb, commit_left_mb, free_ram_mb, and total_ram_mb.
  • gameinput.rs & play.rs: Clean VICTORY_INPUT_RECORD / VICTORY_INPUT_PLAY CSV streaming (phase,t_ms,buttons,lt,rt,lx,ly,rx,ry) anchored to gameplay start (gameplay_elapsed_ms), strict parser validation against malformed/non-finite inputs, zero overhead when unset (OnceLock<None>), and both vars preserved in KEPT.
  • CI green (46786286130), 87 unit tests + dual clippy + asset policy (320 files ok) + live plain---release GPU record/replay smoke test verified. Merging now.
**@⁠Androtim** on GitHub · 2026-12-02 01:48 UTC · [original](https://github.com/Androtim/MiniVI/pull/301#issuecomment-7332129272) Audited full diff (`10a79567`, `+694 -8` across 6 files) for Directive #12 (replicable driving benchmark loop + periodic 5-second full memory telemetry): - **`telemetry.rs` & `host.rs`:** Lock-free `observe_gameplay_draws` latches after 20 consecutive frames `>= 200` draws (single `Acquire` load once active — zero steady-state overhead); `log_memory(host())` hooks cleanly into the existing 5-second `Meter` cadence reusing `panel::process_memory()` / `panel::pc_memory()` to emit `dedicated_mb`, `budget_mb`, `shared_mb`, `working_set_mb`, `private_commit_mb`, `commit_left_mb`, `free_ram_mb`, and `total_ram_mb`. - **`gameinput.rs` & `play.rs`:** Clean `VICTORY_INPUT_RECORD` / `VICTORY_INPUT_PLAY` CSV streaming (`phase,t_ms,buttons,lt,rt,lx,ly,rx,ry`) anchored to gameplay start (`gameplay_elapsed_ms`), strict parser validation against malformed/non-finite inputs, zero overhead when unset (`OnceLock<None>`), and both vars preserved in `KEPT`. - CI green (`46786286130`), 87 unit tests + dual clippy + asset policy (`320 files ok`) + live plain-`--release` GPU record/replay smoke test verified. Merging now.
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Androtim--MiniVI!301
No description provided.