diff --git a/docs/host-latency-plan.md b/docs/host-latency-plan.md index 600100f..b415e41 100644 --- a/docs/host-latency-plan.md +++ b/docs/host-latency-plan.md @@ -24,11 +24,16 @@ placebos. Windows). Each capture/encode/send thread now applies process-wide tuning once (1 ms timer, `DwmEnableMMCSS`, `HIGH_PRIORITY_CLASS`) and per-thread MMCSS "Games" + keep-display-awake. Wired into both the native (`boost_thread_priority`) and GameStream (`stream.rs`) paths. Linux no-op - path builds green; the Windows path is validated by the Windows CI runner / on-box. -- ⏳ **Tier 2A — Linux NV12 convert**: specified to the code level (below) but **not landed** — it is - a ~300-line, colour-correctness-critical change that cannot be A/B-validated on the headless dev - VM (no display; the project has already been burned by the exact green-screen failure mode this - risks — Steam-Deck `SEPARATE_LAYERS` bug). Execute + A/B it on a GPU box **with a display**. + path builds green; the **FFI was validated on the real MSVC toolchain** (standalone probe compiled, + linked against winmm/kernel32/dwmapi/avrt, and ran — timer/priority/MMCSS all succeed). +- ✅ **Tier 2A — Linux NV12 convert**: landed, gated behind `PUNKTFUNK_NV12` (default OFF → the + RGB/BGRx path is byte-for-byte unchanged). The tiled EGL/GL path produces NV12 (BT.709 limited) on + the GPU and feeds NVENC native YUV, deleting NVENC's internal RGB→YUV CSC off the contended SM. + **Validated on an RTX 5070 Ti two ways**: (1) `nv12-selftest` — synthetic RGBA→NV12 round-trip vs a + BT.709 reference, max abs error Y=0.56 / U=0.33 / V=0.26 LSB; (2) live `capture→NV12→NVENC→decode` + of animated content matches the RGB path's colour (avg RGB 230,18,18 vs 231,18,20 — no green-screen, + correct matrix + VUI). LINEAR/Vulkan-bridge (gamescope) path stays RGB. Next: glass-to-glass + latency + fps-under-saturation A/B on a real game (the Tier-0 measurement) before flipping default. ---