Merge remote-tracking branch 'origin/glass-lamp-latency'

This commit is contained in:
Joe DiPrima
2026-08-04 16:53:32 -05:00
3 changed files with 60 additions and 1 deletions
+1
View File
@@ -522,6 +522,7 @@ default-ON (`'0'` disables).
| `BT_SECTOR_LOG` | SectorDisplay Make/Execute |
| `BT_NET_TRACE` | `[net-tx]/[net-rx]/[net-upd]` MP tracing |
| `BT_DEV_GAUGES` | render the 6 pod MFD surfaces in a separate dev window |
| `BT_GLASS_LAMP_SWEEP` | `0` = restore authentic once-per-gauge-cycle cockpit-lamp updates; default (on) sweeps the lamps EVERY frame in the dev/glass composite path so the lit buttons track the sim even when the throttled background gauge sweep starves under MP load (`L4VB16.cpp` `BTGlassSweepLamps`; the "lighting slow/nonexistent" fix — glass-only, pod serial cadence untouched) |
| `BT_AIM="x y"` | pin the reticle crosshair (reticle coords) — headless aim harness |
| `BT_AIM_LOG` | `[pick]` ray/box/hit diagnostics (Mech::PickRayHit) |
| `BT_FIRE_ARC=<deg>` | OPT-IN external-camera fire-arc clamp (unset = authentic no-arc) |
+15
View File
@@ -111,6 +111,21 @@ viewport), and `gWindowAspect` = the view rect's on-screen aspect (`BTWorldAspec
the work area). Green tint tunable via `BT_COCKPIT_TINT=RRGGBB` (default `0x27E8`). Labels are a
lazy GDI-baked MANAGED atlas (survives device reset). Renders in ALL builds; only the PadRIO
click/lamp seam is BT_GLASS-gated. Full detail: `docs/GAUGE_COMPOSITE.md`.
-**Cockpit-lamp LATENCY under MP load (2026-08-04, glass playtest fix) [T2 runtime-verified].**
The lit cockpit buttons are drawn every frame (`BTDrawCockpitPanels`, reading `PadRIO::GetLampState`),
but the lamp STATE sweep that fills that store — `LampManager::Update``AssertNewLampValue`
`SetLamp` — authentically rides `GaugeRenderer::ExecuteForeground`, which fires only **once per full
gauge cycle** (foreground→background→copy). The cycle can't advance to the next foreground turn
until the THROTTLED background gauge sweep drains the ~140-instrument active list, and that
background task starves under load (issue #45 — "instruments freeze while fps stays healthy"). So on
a busy MP mission the lamp sweep ran ~1×/s: **buttons froze / flashes stalled while the 3D view (a
separate per-frame foreground render) stayed smooth** — the "lighting slow or nonexistent" reports
(all testers on glass surround). Fix: `BTGlassSweepLamps()` runs the lamp sweep EVERY frame on the
dev/glass composite path (`L4VB16.cpp`, in `BTDrawGaugeInset`) — cheap (deduped pushes, ~72 lamps),
decoupled from the gauge cycle. The pod never enters this path (real gauge hardware), so its
bandwidth-paced serial lamp cadence is untouched. Kill switch `BT_GLASS_LAMP_SWEEP=0`. NB the RIO
serial/lamp stack itself is byte-identical to pod-proven Red Planet (`L4LAMP.cpp`/`L4SERIAL.cpp`
diffed) — the defect was purely the glass update CADENCE, not the lamp wiring.
## MP gauge-window FREEZE = dangling bindings + permanent SEH disable (Gitea #12, 2026-07-19) [T2 log-convicted]
The live-MP "dev-gauges window froze entirely mid-session" incident (issue #12) is NOT a