d3d12: with LEONIDA_PANEL=fps, simple or cycle, F3 cycles an information panel (D3D12-PANEL-MODES) #2801

Open
Sergentval wants to merge 5 commits from upstream-pr/2801 into main
Sergentval commented 2026-12-01 00:02:19 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Sergentval on 2026-12-01T00:02:19Z.


Claimed in the coordination issue as: D3D12-PANEL-MODES (https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7287864208)

What and why

An information panel for diagnostics builds, shown only when a run asks for it with LEONIDA_PANEL=fps, simple or cycle. It puts the frame rate, the sizes the picture goes through and the state of the upscaler, frame generation and the ray-tracing builder in one coloured box in the top left corner, so that a screenshot or a short clip says how a run was set up.

What does not change. With LEONIDA_PANEL unset, empty, 0, 1 or any other value the run is as on main: F3 shows and hides the numbers panel, the FPS: line is drawn as before, the F1 and F4 menus behave as before and the F1 menu saves the same values, and the panel starts no thread and draws nothing. Builds without diagnostics do not have the panel. Outside it: the dot font gains a ~ glyph (all builds, where it drew a box before) and font::has_dots, whether it has dots of its own for a character; trainer::Pipeline, pipeline and upload become pub(super); the two places in draw.rs that ask whether a dispatch is the ray-tracing builder's keep the answer in a local (asked once, as before); leonida-gpu turns on the windows crate's Win32_UI_HiDpi feature. hud/tests.rs checks the values of before (start_of, the menu's value, the corner, the lines taken). The code paths that read them are in host/panel.rs (asked, F3), host/menu.rs (fps_line, apply_live, refresh_live) and host/trainer.rs (knobs::PANEL, the lines below the panel).

With the new values. fps starts the frame rate alone, simple the simple mode, cycle hidden. F3 then goes hidden, the frame rate alone, simple, the numbers panel (unchanged, with its frame-time rows), hidden. The FPS: line is hidden only while this panel or the numbers panel is shown. The F4 menu's FPS panel switch turns the simple mode on and off. The F1 menu's STATS PANEL shows or hides the numbers panel as before and hides this panel, so the two never overlap. The F1 menu keeps the value the run started with, so saving writes back nothing the player did not pick (F3 counts as a pick, as on main).

The rows and where each figure comes from:

  • 60 FPS (large), then 60.0 FPS: the frame meter's rate (METER_FPS_TENTHS, the frames rendered a second). With frame generation at work, 120 FPS 60.0 RENDERED +60.0 FG: the large figure is the frames rendered times what Streamline or FSR 3 frame generation reports for each (fg::shown_per_frame, which the FPS: line multiplies by too, so the two always agree), and +60.0 is computed as the difference, not counted. Where that does not fit, +60.0 moves after FG X2.
  • RENDER 1280X720 -> OUTPUT 1920X1080: the render size the title gives in its FidelityFX upscale call (ffxDispatchDescUpscale) while such calls come. Without a call, and with LEONIDA_RENDER_SCALE set, the presented picture at that scale, marked as an estimate (~960X540). Otherwise ?. The output is the size of the picture the title presents.
  • UPSCALE DLSS | WINDOW 1280X720: DLSS or STRETCH when list::upscale_now recorded one, GAME FSR when the call was passed on to the title's own FidelityFX upscale (leonida-hle's ffxDispatch calls the title's, and tells list::upscale_passed_on first; diagnostics builds only). A call that is neither (nothing recorded, the title's ffxDispatch not found) is not counted. Shown only while such calls come (no row part without one). WINDOW is the window's client area in pixels, read per-monitor aware for the call alone (SetThreadDpiAwarenessContext, there from Windows 10 1607; the layer needs 2004 or later), shown when it differs from the output.
  • FG X2 | RT ON: frame generation (OFF; IDLE while Streamline's or FSR 3's swap chain has the presents and generates nothing; X2...). RT is ON while a dispatch of the layer's ray-tracing structure builder (LEONIDA_BVH_BUILDER=1) went on to its pipeline in the last three seconds (marked in draw.rs, where builder_runs let it).
  • PANEL CPU 20 US/FRAME | 900 US/PAINT: the panel's own CPU time on the presenting thread per frame and on its own thread per repaint, as means over two seconds, and - until measured.

The previews panel-fps.png, panel-simple.png and panel-simple-fg.png are painted by the unit tests from round figures (PANEL_PREVIEW_DIR=<folder>), not taken from the title.

Cost. Hidden, a present loads the mode (one atomic) once for the panel's draw, once more while the FPS: line is on and the F1 menu closed (to know whether the corner is free) and once more while the F4 menu is open (the lines it leaves to the panel); an upscale call and a dispatch of the ray-tracing builder load it once before they publish anything. Shown, the panel's own thread (leonida-info-panel) gathers the figures twice a second and paints the box on the CPU only when a row changed, into an upload buffer whose last copy has run. The presenting thread copies a new box into a texture at most twice a second and draws it every frame in one blended quad with the trainer menu's pipeline. Each frame it allocates nothing and takes no lock but a try_lock. When the box's size or format changes, the old texture goes to the host's retirement (one allocation, its lock). In a cycle run, the first F3 starts the panel's thread. If that thread panics or cannot be started, the panel is hidden for good, its last picture is forgotten and F3 goes between hidden and the numbers panel. The thread is not joined at exit: the repository has no exit point for the layer's own threads. It holds no lock while it sleeps.

d3d12/docs/switches.md: only the LEONIDA_PANEL row is edited, by hand, to what tools/d3d12_switches.py makes from the new comment; the tool was not run. Regenerated, it would also change the LEONIDA_RENDER_SCALE row's "Named in" count from +5 to +6.

Follow-up pull requests, not in this one: an advanced page built on frametime.rs (frame-time percentiles and stalls, a graph, the card, memory and processors), and text sized to the window as well as the picture.

Tested

cargo test --locked -p leonida-gpu --features diagnostics --lib (686 pass), cargo test --locked -p leonida-menu (49 pass), cargo test --locked -p leonida-hle --lib (221 pass), cargo check --locked -p leonida with and without diagnostics, cargo clippy --locked -p leonida-gpu -p leonida-menu -p leonida --all-targets and cargo clippy --locked -p leonida-hle --all-targets, each with and without diagnostics (no new warning against main), and cargo build --locked --profile play -p leonida --features diagnostics. The tilde glyph's test fails with main's font (no ~ picture). Mutations of the start values, the cycle, the corner, the menu's value, the panic path, a thread that could not be started, the render size, the upscale row, the frames shown with FSR 3 frame generation, which swap chain counts as presenting, the cost's width, a row's width as row draws it, the box's height and the upload's reuse are each caught by a test. Not unit-tested: where the two hooks are called (ffxDispatch passing a call on, a builder dispatch going on), which need the title.

In the title (Series X profile, 3840x2160 picture, pipelines precompiled with leonida shaders and leonida warm --used), four runs of four to six minutes each:

  • LEONIDA_PANEL unset: the FPS: line as on main; F3 shows the numbers panel, F3 hides it, F3 shows it again.
  • LEONIDA_PANEL=fps: the frame rate alone; then F3 five times gave simple, the numbers panel, hidden (the FPS: line back), the frame rate alone, simple.
  • LEONIDA_PANEL=simple: the simple mode from the start.
  • LEONIDA_PANEL=cycle: nothing of the panel, the FPS: line; F3 gave the frame rate alone.

The four runs above were made before the last review's changes (frame generation counted as the FPS: line counts it, GAME FSR marked only when the call is passed on, RT marked at the dispatch, the window size read through windows::Win32::UI::HiDpi). After them, one more run with LEONIDA_PANEL=simple: the simple mode from the start (RENDER ~2560X1440 -> OUTPUT 3840X2160, WINDOW 3840X2053, FG OFF | RT OFF), then F3 four times gave the numbers panel, hidden (the FPS: line back), the frame rate alone, simple.

Not run in the title: frame generation of either kind (the FSR 3 case is covered by unit tests only), an upscale call passed on to the title, and the ray-tracing builder.

No panic, no error line and no device removal in the five logs. The cost row read 24 to 41 us a frame on the presenting thread with the panel shown. No frame-rate comparison was made: the runs were 8 to 13 frames a second in a scene that varies too much for one.

GPUs tested: NVIDIA GeForce RTX 3090, driver 617.42, Windows 11

AI-assisted: yes (Claude Opus 5.5, in Claude Code). Reviewed by a separate agent (Claude Opus 5.5) before opening, twice.

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase). Based on afb511541; merges cleanly into 398c085c4 (checked with git merge-tree), not rebuilt on it.
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • n/a: A new translator rule is in the contract table of docs/design.md, with how it was confirmed (no translator rule here).

These are not in-game captures: the three pictures below are painted by the unit tests from round, made-up figures, with no game content.

panel-fps panel-simple panel-simple-fg

🤖 Generated with Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5576066769 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2801). Originally posted by [Sergentval](https://github.com/Sergentval) on 2026-12-01T00:02:19Z. --- Claimed in the coordination issue as: D3D12-PANEL-MODES (https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7287864208) ### What and why An information panel for diagnostics builds, shown only when a run asks for it with `LEONIDA_PANEL=fps`, `simple` or `cycle`. It puts the frame rate, the sizes the picture goes through and the state of the upscaler, frame generation and the ray-tracing builder in one coloured box in the top left corner, so that a screenshot or a short clip says how a run was set up. **What does not change.** With `LEONIDA_PANEL` unset, empty, `0`, `1` or any other value the run is as on `main`: F3 shows and hides the numbers panel, the `FPS:` line is drawn as before, the F1 and F4 menus behave as before and the F1 menu saves the same values, and the panel starts no thread and draws nothing. Builds without `diagnostics` do not have the panel. Outside it: the dot font gains a `~` glyph (all builds, where it drew a box before) and `font::has_dots`, whether it has dots of its own for a character; `trainer::Pipeline`, `pipeline` and `upload` become `pub(super)`; the two places in `draw.rs` that ask whether a dispatch is the ray-tracing builder's keep the answer in a local (asked once, as before); `leonida-gpu` turns on the `windows` crate's `Win32_UI_HiDpi` feature. `hud/tests.rs` checks the values of before (`start_of`, the menu's value, the corner, the lines taken). The code paths that read them are in `host/panel.rs` (`asked`, F3), `host/menu.rs` (`fps_line`, `apply_live`, `refresh_live`) and `host/trainer.rs` (`knobs::PANEL`, the lines below the panel). **With the new values.** `fps` starts the frame rate alone, `simple` the simple mode, `cycle` hidden. F3 then goes hidden, the frame rate alone, simple, the numbers panel (unchanged, with its frame-time rows), hidden. The `FPS:` line is hidden only while this panel or the numbers panel is shown. The F4 menu's FPS panel switch turns the simple mode on and off. The F1 menu's STATS PANEL shows or hides the numbers panel as before and hides this panel, so the two never overlap. The F1 menu keeps the value the run started with, so saving writes back nothing the player did not pick (F3 counts as a pick, as on `main`). **The rows and where each figure comes from:** - `60 FPS` (large), then `60.0 FPS`: the frame meter's rate (`METER_FPS_TENTHS`, the frames rendered a second). With frame generation at work, `120 FPS 60.0 RENDERED +60.0 FG`: the large figure is the frames rendered times what Streamline or FSR 3 frame generation reports for each (`fg::shown_per_frame`, which the `FPS:` line multiplies by too, so the two always agree), and `+60.0` is computed as the difference, not counted. Where that does not fit, `+60.0` moves after `FG X2`. - `RENDER 1280X720 -> OUTPUT 1920X1080`: the render size the title gives in its FidelityFX upscale call (`ffxDispatchDescUpscale`) while such calls come. Without a call, and with `LEONIDA_RENDER_SCALE` set, the presented picture at that scale, marked as an estimate (`~960X540`). Otherwise `?`. The output is the size of the picture the title presents. - `UPSCALE DLSS | WINDOW 1280X720`: `DLSS` or `STRETCH` when `list::upscale_now` recorded one, `GAME FSR` when the call was passed on to the title's own FidelityFX upscale (`leonida-hle`'s `ffxDispatch` calls the title's, and tells `list::upscale_passed_on` first; diagnostics builds only). A call that is neither (nothing recorded, the title's `ffxDispatch` not found) is not counted. Shown only while such calls come (no row part without one). `WINDOW` is the window's client area in pixels, read per-monitor aware for the call alone (`SetThreadDpiAwarenessContext`, there from Windows 10 1607; the layer needs 2004 or later), shown when it differs from the output. - `FG X2 | RT ON`: frame generation (`OFF`; `IDLE` while Streamline's or FSR 3's swap chain has the presents and generates nothing; `X2`...). `RT` is `ON` while a dispatch of the layer's ray-tracing structure builder (`LEONIDA_BVH_BUILDER=1`) went on to its pipeline in the last three seconds (marked in `draw.rs`, where `builder_runs` let it). - `PANEL CPU 20 US/FRAME | 900 US/PAINT`: the panel's own CPU time on the presenting thread per frame and on its own thread per repaint, as means over two seconds, and `-` until measured. The previews `panel-fps.png`, `panel-simple.png` and `panel-simple-fg.png` are painted by the unit tests from round figures (`PANEL_PREVIEW_DIR=<folder>`), not taken from the title. **Cost.** Hidden, a present loads the mode (one atomic) once for the panel's draw, once more while the `FPS:` line is on and the F1 menu closed (to know whether the corner is free) and once more while the F4 menu is open (the lines it leaves to the panel); an upscale call and a dispatch of the ray-tracing builder load it once before they publish anything. Shown, the panel's own thread (`leonida-info-panel`) gathers the figures twice a second and paints the box on the CPU only when a row changed, into an upload buffer whose last copy has run. The presenting thread copies a new box into a texture at most twice a second and draws it every frame in one blended quad with the trainer menu's pipeline. Each frame it allocates nothing and takes no lock but a `try_lock`. When the box's size or format changes, the old texture goes to the host's retirement (one allocation, its lock). In a `cycle` run, the first F3 starts the panel's thread. If that thread panics or cannot be started, the panel is hidden for good, its last picture is forgotten and F3 goes between hidden and the numbers panel. The thread is not joined at exit: the repository has no exit point for the layer's own threads. It holds no lock while it sleeps. `d3d12/docs/switches.md`: only the `LEONIDA_PANEL` row is edited, by hand, to what `tools/d3d12_switches.py` makes from the new comment; the tool was not run. Regenerated, it would also change the `LEONIDA_RENDER_SCALE` row's "Named in" count from `+5` to `+6`. **Follow-up pull requests, not in this one:** an advanced page built on `frametime.rs` (frame-time percentiles and stalls, a graph, the card, memory and processors), and text sized to the window as well as the picture. ### Tested `cargo test --locked -p leonida-gpu --features diagnostics --lib` (686 pass), `cargo test --locked -p leonida-menu` (49 pass), `cargo test --locked -p leonida-hle --lib` (221 pass), `cargo check --locked -p leonida` with and without `diagnostics`, `cargo clippy --locked -p leonida-gpu -p leonida-menu -p leonida --all-targets` and `cargo clippy --locked -p leonida-hle --all-targets`, each with and without `diagnostics` (no new warning against `main`), and `cargo build --locked --profile play -p leonida --features diagnostics`. The tilde glyph's test fails with `main`'s font (no `~` picture). Mutations of the start values, the cycle, the corner, the menu's value, the panic path, a thread that could not be started, the render size, the upscale row, the frames shown with FSR 3 frame generation, which swap chain counts as presenting, the cost's width, a row's width as `row` draws it, the box's height and the upload's reuse are each caught by a test. Not unit-tested: where the two hooks are called (`ffxDispatch` passing a call on, a builder dispatch going on), which need the title. In the title (Series X profile, 3840x2160 picture, pipelines precompiled with `leonida shaders` and `leonida warm --used`), four runs of four to six minutes each: - `LEONIDA_PANEL` unset: the `FPS:` line as on `main`; F3 shows the numbers panel, F3 hides it, F3 shows it again. - `LEONIDA_PANEL=fps`: the frame rate alone; then F3 five times gave simple, the numbers panel, hidden (the `FPS:` line back), the frame rate alone, simple. - `LEONIDA_PANEL=simple`: the simple mode from the start. - `LEONIDA_PANEL=cycle`: nothing of the panel, the `FPS:` line; F3 gave the frame rate alone. The four runs above were made before the last review's changes (frame generation counted as the `FPS:` line counts it, `GAME FSR` marked only when the call is passed on, `RT` marked at the dispatch, the window size read through `windows::Win32::UI::HiDpi`). After them, one more run with `LEONIDA_PANEL=simple`: the simple mode from the start (`RENDER ~2560X1440 -> OUTPUT 3840X2160`, `WINDOW 3840X2053`, `FG OFF | RT OFF`), then F3 four times gave the numbers panel, hidden (the `FPS:` line back), the frame rate alone, simple. Not run in the title: frame generation of either kind (the FSR 3 case is covered by unit tests only), an upscale call passed on to the title, and the ray-tracing builder. No panic, no error line and no device removal in the five logs. The cost row read 24 to 41 us a frame on the presenting thread with the panel shown. No frame-rate comparison was made: the runs were 8 to 13 frames a second in a scene that varies too much for one. GPUs tested: NVIDIA GeForce RTX 3090, driver 617.42, Windows 11 AI-assisted: yes (Claude Opus 5.5, in Claude Code). Reviewed by a separate agent (Claude Opus 5.5) before opening, twice. ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). Based on `afb511541`; merges cleanly into `398c085c4` (checked with `git merge-tree`), not rebuilt on it. - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [x] n/a: A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed (no translator rule here). **These are not in-game captures: the three pictures below are painted by the unit tests from round, made-up figures, with no game content.** <img width="168" height="41" alt="panel-fps" src="https://github.com/user-attachments/assets/007a7889-4dd0-498e-a646-d96d1da54df9" /> <img width="480" height="129" alt="panel-simple" src="https://github.com/user-attachments/assets/993df7d6-eed1-4f9f-aad3-65331340e62d" /> <img width="480" height="129" alt="panel-simple-fg" src="https://github.com/user-attachments/assets/927baa34-1317-40f0-b245-961d39c3b264" /> 🤖 Generated with [Claude Code](https://claude.com/claude-code)
OreoFR commented 2026-12-01 00:09:43 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-12-01T00:09:43Z.


Verified by OreoFR on macOS 27.2.1, Apple M5, head ac7a2a9d8, main cd9fe51a9. This is a type-check plus a code read: leonida-gpu does not build natively on macOS, so the Mac can't run your unit tests or the panel.

MEASURED

  • git merge-tree of this head onto main gives no conflicts.
  • cargo check --target x86_64-pc-windows-msvc (no MSVC; the cc build steps are replaced with stand-ins), main vs main + this PR, exit 0 on both sides. The sorted warning lists are byte-identical:
    • -p leonida-gpu: 19 / 19
    • -p leonida-gpu --features diagnostics: 11 / 11
    • -p leonida-gpu --tests: 24 / 24 (this compiles the new hud/*/tests.rs)
    • -p leonida-hle --tests: 19 / 19 (ffx.rs)
  • So about 3,000 new lines add no warning in either crate, with or without diagnostics.

READ IN CODE

  • The switch exists, and the default is unchanged. start_of() (host/hud.rs) gives Some only for fps, simple or cycle (trimmed, any case). Unset, empty, 0, 1 or any other value gives None, so active() is false and F3 stays with the numbers panel. start() reads LEONIDA_PANEL once (OnceLock).
  • menu.rs:78 keeps LEONIDA_PANEL as the F1 "STATS PANEL (F3)" item, live.

ASSUMED

  • The unit test results and the in-game behavior (F3 cycle, FG figures, cost per frame) are from your run on Windows. Not reproduced here.

Note: d3d12/docs/switches.md is also edited by enlighted's reaper branch (LEONIDA_REAPER_LIMIT, not a PR yet), so whichever lands second will need a small rebase of that file.

AI-assisted: Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7296003027 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2801#issuecomment-7296003027). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-12-01T00:09:43Z. --- Verified by OreoFR on macOS 27.2.1, Apple M5, head `ac7a2a9d8`, main `cd9fe51a9`. This is a type-check plus a code read: `leonida-gpu` does not build natively on macOS, so the Mac can't run your unit tests or the panel. **MEASURED** - `git merge-tree` of this head onto main gives no conflicts. - `cargo check --target x86_64-pc-windows-msvc` (no MSVC; the `cc` build steps are replaced with stand-ins), main vs main + this PR, exit 0 on both sides. The sorted warning lists are byte-identical: - `-p leonida-gpu`: 19 / 19 - `-p leonida-gpu --features diagnostics`: 11 / 11 - `-p leonida-gpu --tests`: 24 / 24 (this compiles the new `hud/*/tests.rs`) - `-p leonida-hle --tests`: 19 / 19 (`ffx.rs`) - So about 3,000 new lines add no warning in either crate, with or without `diagnostics`. **READ IN CODE** - The switch exists, and the default is unchanged. `start_of()` (`host/hud.rs`) gives `Some` only for `fps`, `simple` or `cycle` (trimmed, any case). Unset, empty, `0`, `1` or any other value gives `None`, so `active()` is false and F3 stays with the numbers panel. `start()` reads `LEONIDA_PANEL` once (`OnceLock`). - `menu.rs:78` keeps `LEONIDA_PANEL` as the F1 "STATS PANEL (F3)" item, live. **ASSUMED** - The unit test results and the in-game behavior (F3 cycle, FG figures, cost per frame) are from your run on Windows. Not reproduced here. Note: `d3d12/docs/switches.md` is also edited by enlighted's reaper branch (`LEONIDA_REAPER_LIMIT`, not a PR yet), so whichever lands second will need a small rebase of that file. AI-assisted: Claude Code
fiestorra commented 2026-12-01 01:26:55 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-01T01:26:55Z.


This pull request breaks apps/leonida/tests/settings_line.rs, and it does so deterministically on main plus this diff and not on main alone. I did not get to the bottom of why, and I am reporting it anyway rather than leaving it for CI.

main d920d850d plus this head, cargo 1.98.1, Windows:

cargo test -p leonida --test settings_line
  main alone:                      test result: ok. 1 passed; 0 failed
  main plus this pull request:     test result: FAILED. 0 passed; 1 failed

  thread 'a_run_logs_the_settings_it_starts_with' panicked at apps\leonida\tests\settings_line.rs:25:91:
  Error: reading E:\ports\repos\leonida\d3d12\apps\leonida\no-such-title.exe

Line 25 is where the test looks for the startup line in the app's stderr:

let line = stderr.lines().find(|l| l.contains("LEONIDA_ settings")).unwrap_or_else(|| panic!(...));

So the app starts, fails to read the deliberately missing title (which is the expected path), and the startup line it used to print is no longer in stderr. The test never reaches its other two assertions.

What I know and what I do not:

  • It is this diff: main alone passes the same test, and the two runs are minutes apart on the same binary target.
  • It is not a flake: I ran it twice with the diff applied, both failed.
  • It is indirect: this pull request touches no file under apps/leonida - it changes leonida-gpu (host/panel.rs, host/trainer.rs, list.rs), leonida-hle (modules/ffx.rs) and leonida-menu (font.rs), all of which the app links.
  • I did not find the emitting site. git grep 'LEONIDA_ settings' matches only the test, so the line is composed with a format string I did not chase down, and apply_settings_names only sets variables - it does not log. That is where I would look next: something between main's first call and the log line now runs earlier or panics quietly, and font.rs is the one of the four that plausibly does work at startup.

A sweep of the rest, so this comment is not only a red flag:

cargo test -p leonida-gpu       584 passed, 0 failed, 53 ignored   (with the change)
cargo test -p leonida-lua        40 passed (its own crate)
cargo test -p xtask              fails until #2815, unrelated (two oversized source files)

The fix is probably small - a startup-order change or a missing log - but I would rather hand the author the failing test than guess at it.

AI-assisted: yes - DeepSeek v4.1 (flash), which reproduced it three times on the machine above.

Written with an AI assistant.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7297510297 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2801#issuecomment-7297510297). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-12-01T01:26:55Z. --- **This pull request breaks `apps/leonida/tests/settings_line.rs`, and it does so deterministically on `main` plus this diff and not on `main` alone. I did not get to the bottom of why, and I am reporting it anyway rather than leaving it for CI.** **`main` `d920d850d` plus this head, `cargo 1.98.1`, Windows:** ``` cargo test -p leonida --test settings_line main alone: test result: ok. 1 passed; 0 failed main plus this pull request: test result: FAILED. 0 passed; 1 failed thread 'a_run_logs_the_settings_it_starts_with' panicked at apps\leonida\tests\settings_line.rs:25:91: Error: reading E:\ports\repos\leonida\d3d12\apps\leonida\no-such-title.exe ``` **Line 25 is where the test looks for the startup line in the app's stderr:** ```rust let line = stderr.lines().find(|l| l.contains("LEONIDA_ settings")).unwrap_or_else(|| panic!(...)); ``` **So the app starts, fails to read the deliberately missing title (which is the expected path), and the startup line it used to print is no longer in stderr.** **The test never reaches its other two assertions.** **What I know and what I do not:** - **It is this diff**: `main` alone passes the same test, and the two runs are minutes apart on the same binary target. - **It is not a flake**: I ran it twice with the diff applied, both failed. - **It is indirect**: **this pull request touches no file under `apps/leonida`** - **it changes `leonida-gpu` (`host/panel.rs`, `host/trainer.rs`, `list.rs`), `leonida-hle` (`modules/ffx.rs`) and `leonida-menu` (`font.rs`)**, all of which the app links. - **I did not find the emitting site.** **`git grep 'LEONIDA_ settings'` matches only the test**, so the line is composed with a format string I did not chase down, **and `apply_settings_names` only sets variables - it does not log.** **That is where I would look next: something between `main`'s first call and the log line now runs earlier or panics quietly, and `font.rs` is the one of the four that plausibly does work at startup.** **A sweep of the rest, so this comment is not only a red flag:** ``` cargo test -p leonida-gpu 584 passed, 0 failed, 53 ignored (with the change) cargo test -p leonida-lua 40 passed (its own crate) cargo test -p xtask fails until #2815, unrelated (two oversized source files) ``` **The fix is probably small** - **a startup-order change or a missing log** - **but I would rather hand the author the failing test than guess at it.** **AI-assisted:** yes - DeepSeek v4.1 (flash), which reproduced it three times on the machine above. Written with an AI assistant.
fiestorra commented 2026-12-01 01:39:00 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-01T01:39:00Z.


I have the diagnosis now: the app's stderr on main starts with the settings line, and with this diff it starts with the error. Same binary target, same command, same environment.

main d920d850d:

2026-12-01T01:37:46.676400Z  INFO settings: 2 LEONIDA_ settings: LEONIDA_TEST_FOLDER=<hidden, 23 chars>, LEONIDA_TEST_KEYS=5:Enter,10-20:W
Error: reading no-such-title.exe
Caused by:
   The system cannot find the file specified. (os error 2)

main plus this head:

Error: reading no-such-title.exe
Caused by:
   The system cannot find the file specified. (os error 2)

Six lines against five, and the missing one is the first. So apply_settings_names() - which main.rs:188 calls before logging::init("info") at main.rs:189 - no longer results in a line, or the log that prints it never runs.

What that tells whoever fixes it:

  • The line is not printed by apply_settings_names. It runs before the subscriber is installed, and it only calls std::env::set_var (apps/leonida/src/leonida.rs:33-38). So the log comes from something after logging::init that reads the applied settings and reports them, with target settings.
  • logging::init is leonida-core/src/logging.rs:20: EnvFilter from LEONIDA_LOG/RUST_LOG, default "info", plus a CAP layer and with_target(true). If a change anywhere in this diff made the settings target's event go to a level the CAP layer drops, that is exactly the shape of this failure - the process still works, only the line is gone.
  • This diff touches none of apps/leonida, leonida-core or leonida-lua. It changes leonida-gpu (host/panel.rs, host/trainer.rs, list.rs), leonida-hle (ffx.rs) and leonida-menu (font.rs). So the dependency is real but indirect, and I could not name the emitter: git grep 'LEONIDA_ settings' matches only the test, and the module settings that exists (leonida-lua/src/settings.rs) is about Lua-side setting names, not this log.

The likeliest next probe: run the binary with LEONIDA_LOG=settings=trace,info on both arms. If the line reappears with the diff, the change moved the event's level or its target rather than removing the report; if it does not, the reporting itself stopped and the diff's leonida-menu/font.rs startup path is where to look.

The test itself is unchanged and that is why it is a fair gate: apps/leonida/tests/settings_line.rs asserts the line exists, that the folder is hidden, and that the path never reaches the log - three things about a startup contract, none about the panel this diff is for.

AI-assisted: yes - DeepSeek v4.1 (flash), which built both arms and captured both stderrs.

Written with an AI assistant.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7297738715 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2801#issuecomment-7297738715). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-12-01T01:39:00Z. --- **I have the diagnosis now: the app's stderr on `main` starts with the settings line, and with this diff it starts with the error. Same binary target, same command, same environment.** **`main` `d920d850d`:** ``` 2026-12-01T01:37:46.676400Z INFO settings: 2 LEONIDA_ settings: LEONIDA_TEST_FOLDER=<hidden, 23 chars>, LEONIDA_TEST_KEYS=5:Enter,10-20:W Error: reading no-such-title.exe Caused by: The system cannot find the file specified. (os error 2) ``` **`main` plus this head:** ``` Error: reading no-such-title.exe Caused by: The system cannot find the file specified. (os error 2) ``` **Six lines against five, and the missing one is the first.** **So `apply_settings_names()` - which `main.rs:188` calls before `logging::init("info")` at `main.rs:189` - no longer results in a line, or the log that prints it never runs.** **What that tells whoever fixes it:** - **The line is not printed by `apply_settings_names`.** **It runs before the subscriber is installed, and it only calls `std::env::set_var`** (`apps/leonida/src/leonida.rs:33-38`). **So the log comes from something after `logging::init` that reads the applied settings and reports them, with `target` `settings`.** - **`logging::init` is `leonida-core/src/logging.rs:20`**: `EnvFilter` from `LEONIDA_LOG`/`RUST_LOG`, default `"info"`, plus a `CAP` layer and `with_target(true)`. **If a change anywhere in this diff made the `settings` target's event go to a level the `CAP` layer drops, that is exactly the shape of this failure** - **the process still works, only the line is gone.** - **This diff touches none of `apps/leonida`, `leonida-core` or `leonida-lua`.** **It changes `leonida-gpu` (`host/panel.rs`, `host/trainer.rs`, `list.rs`), `leonida-hle` (`ffx.rs`) and `leonida-menu` (`font.rs`).** **So the dependency is real but indirect, and I could not name the emitter: `git grep 'LEONIDA_ settings'` matches only the test, and the module `settings` that exists (`leonida-lua/src/settings.rs`) is about Lua-side setting names, not this log.** **The likeliest next probe**: **run the binary with `LEONIDA_LOG=settings=trace,info` on both arms.** **If the line reappears with the diff, the change moved the event's level or its target rather than removing the report; if it does not, the reporting itself stopped and the diff's `leonida-menu/font.rs` startup path is where to look.** **The test itself is unchanged and that is why it is a fair gate**: **`apps/leonida/tests/settings_line.rs` asserts the line exists, that the folder is hidden, and that the path never reaches the log - three things about a startup contract, none about the panel this diff is for.** **AI-assisted:** yes - DeepSeek v4.1 (flash), which built both arms and captured both stderrs. Written with an AI assistant.
fiestorra commented 2026-12-01 01:43:12 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-01T01:43:12Z.


Correction, and it is mine, not the pull request's: settings_line does not fail with this diff. My earlier report was wrong, I found why, and there is a real red - a different one.

What I did wrong. I applied the pull request with git checkout <ref> -- ., which replaces the whole tree with the branch's. This branch is based on afb511541, and main has moved since: main's apply_settings_names returns Vec<String> and feeds leonida::settings_line(...) at main.rs:247, and the branch's older tree does not. So my "main plus this pull request" was really "this branch's whole tree", which reverts a newer startup feature - and that is what made the settings line disappear.

Applied correctly - the three commits of its range cherry-picked onto main d920d850d - it is clean and different:

git merge-base origin/main <head>   -> afb511541
git log afb511541..<head>           -> 3 commits, cherry-pick clean, 0 conflicts

cargo test -p leonida --test settings_line
  test result: ok. 1 passed; 0 failed

So the diagnosis I wrote two hours ago was of my own replay, not of this change. I would rather say that plainly than leave a red on the wrong test.

The real red, and it is deterministic:

cargo test --workspace
  FAILED: host::refresh_tests::only_what_differs_goes_up
  (and, in the same run, watch::tests::kernel_reads_into_guarded_blocks_after_opening)

Run on its own, three times:

host::refresh_tests::only_what_differs_goes_up        0 passed, 1 failed   x3
watch::tests::kernel_reads_into_guarded_blocks_after_opening   1 passed    x3

So only_what_differs_goes_up is real and reproducible, and kernel_reads_into_guarded_blocks_after_opening is load- or order-dependent - it fails inside the full suite and passes alone, three times each way. Both are in leonida-gpu, which this diff changes (host/panel.rs, host/trainer.rs, list.rs), so unlike my earlier claim this one is in the right crate.

What I have not done: read what only_what_differs_goes_up asserts. I am giving you the failing name and the three-for-three result now rather than another analysis I would have to correct.

AI-assisted: yes - DeepSeek v4.1 (flash), which got the application method wrong first and is telling you exactly how.

Written with an AI assistant.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7297816292 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2801#issuecomment-7297816292). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-12-01T01:43:12Z. --- **Correction, and it is mine, not the pull request's: `settings_line` does not fail with this diff. My earlier report was wrong, I found why, and there is a real red - a different one.** **What I did wrong.** **I applied the pull request with `git checkout <ref> -- .`, which replaces the whole tree with the branch's.** **This branch is based on `afb511541`, and `main` has moved since**: **`main`'s `apply_settings_names` returns `Vec<String>` and feeds `leonida::settings_line(...)` at `main.rs:247`, and the branch's older tree does not.** **So my "main plus this pull request" was really "this branch's whole tree", which reverts a newer startup feature - and that is what made the settings line disappear.** **Applied correctly - the three commits of its range cherry-picked onto `main` `d920d850d` - it is clean and different:** ``` git merge-base origin/main <head> -> afb511541 git log afb511541..<head> -> 3 commits, cherry-pick clean, 0 conflicts cargo test -p leonida --test settings_line test result: ok. 1 passed; 0 failed ``` **So the diagnosis I wrote two hours ago was of my own replay, not of this change.** **I would rather say that plainly than leave a red on the wrong test.** **The real red, and it is deterministic:** ``` cargo test --workspace FAILED: host::refresh_tests::only_what_differs_goes_up (and, in the same run, watch::tests::kernel_reads_into_guarded_blocks_after_opening) ``` **Run on its own, three times:** ``` host::refresh_tests::only_what_differs_goes_up 0 passed, 1 failed x3 watch::tests::kernel_reads_into_guarded_blocks_after_opening 1 passed x3 ``` **So `only_what_differs_goes_up` is real and reproducible, and `kernel_reads_into_guarded_blocks_after_opening` is load- or order-dependent** - **it fails inside the full suite and passes alone, three times each way.** **Both are in `leonida-gpu`, which this diff changes (`host/panel.rs`, `host/trainer.rs`, `list.rs`), so unlike my earlier claim this one is in the right crate.** **What I have not done**: **read what `only_what_differs_goes_up` asserts.** **I am giving you the failing name and the three-for-three result now rather than another analysis I would have to correct.** **AI-assisted:** yes - DeepSeek v4.1 (flash), which got the application method wrong first and is telling you exactly how. Written with an AI assistant.
fiestorra commented 2026-12-01 01:43:44 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-01T01:43:44Z.


The assertion, so you do not have to reproduce it: the upload list is empty where the test expects one range of 64 KiB at offset 64 KiB.

cargo test -p leonida-gpu --lib host::refresh_tests::only_what_differs_goes_up

thread 'host::refresh_tests::only_what_differs_goes_up' panicked at crates\leonida-gpu\src\host.rs:14749:13:
assertion `left == right` failed
  left:  []
  right: [(65536, 131072)]

So this is not a timing or ordering failure: only_what_differs_goes_up builds a buffer, changes one region, and asserts what the refresh sends - and with this diff the refresh sends nothing. left is the empty list, right is the one range the test put in. The test fails in 0.00 s, which is consistent: nothing to wait for.

Where that points, given the diff: host/panel.rs (14 lines), host/trainer.rs (30) and list.rs (20) are the three places this pull request touches that sit on the refresh path, and the range comparison that decides "what differs" is the code the assertion is about. host.rs:14749 is the test's own line; the predicate it calls is whatever this diff changed.

How it behaves next to the rest of the suite:

cargo test -p leonida-gpu --lib     581-582 passed, 1-2 failed
  host::refresh_tests::only_what_differs_goes_up         fails 3 of 3 alone
  watch::tests::kernel_reads_into_guarded_blocks_after_opening   passes 3 of 3 alone, failed once inside the suite

So only_what_differs_goes_up is the one to fix; the watch test is order- or load-dependent and I would not chase it until the first is green.

And the status of everything else in this diff, from the same run: the workspace's other suites are ok, settings_line passes when the diff is applied correctly (my earlier report of it was my replay, retracted above), and the only reds are these two in leonida-gpu.

AI-assisted: yes - DeepSeek v4.1 (flash).

Written with an AI assistant.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7297826471 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2801#issuecomment-7297826471). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-12-01T01:43:44Z. --- **The assertion, so you do not have to reproduce it: the upload list is empty where the test expects one range of 64 KiB at offset 64 KiB.** ``` cargo test -p leonida-gpu --lib host::refresh_tests::only_what_differs_goes_up thread 'host::refresh_tests::only_what_differs_goes_up' panicked at crates\leonida-gpu\src\host.rs:14749:13: assertion `left == right` failed left: [] right: [(65536, 131072)] ``` **So this is not a timing or ordering failure**: **`only_what_differs_goes_up` builds a buffer, changes one region, and asserts what the refresh sends** - **and with this diff the refresh sends nothing.** **`left` is the empty list, `right` is the one range the test put in.** **The test fails in 0.00 s, which is consistent: nothing to wait for.** **Where that points**, given the diff: **`host/panel.rs` (14 lines), `host/trainer.rs` (30) and `list.rs` (20) are the three places this pull request touches that sit on the refresh path**, **and the range comparison that decides "what differs" is the code the assertion is about.** **`host.rs:14749` is the test's own line; the predicate it calls is whatever this diff changed.** **How it behaves next to the rest of the suite**: ``` cargo test -p leonida-gpu --lib 581-582 passed, 1-2 failed host::refresh_tests::only_what_differs_goes_up fails 3 of 3 alone watch::tests::kernel_reads_into_guarded_blocks_after_opening passes 3 of 3 alone, failed once inside the suite ``` **So `only_what_differs_goes_up` is the one to fix; the `watch` test is order- or load-dependent and I would not chase it until the first is green.** **And the status of everything else in this diff, from the same run**: **the workspace's other suites are `ok`**, **`settings_line` passes when the diff is applied correctly** (my earlier report of it was my replay, retracted above), **and the only reds are these two in `leonida-gpu`.** **AI-assisted:** yes - DeepSeek v4.1 (flash). Written with an AI assistant.
fiestorra commented 2026-12-01 01:46:35 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-01T01:46:35Z.


Second correction on this pull request, and it is the same mistake twice: only_what_differs_goes_up is red on main before your change, so it is not yours either.

With all 19 of your leonida-gpu files reverted and the tree clean, the test still fails. Then on a clean main d920d850d, with nothing applied:

cargo test -p leonida-gpu --lib host::refresh_tests::only_what_differs_goes_up
  panicked at crates\leonida-gpu\src\host.rs:14749:13
  assertion `left == right` failed
    left:  []
    right: [(65536, 131072)]

And on b7a1be296, two merges earlier, it passes. So the red comes from 6d0ba44f0 / d920d850d, "pages written since they were taken go up by the 4 KiB that changed" - not from the F3 panel. I have written that up in #2570 with the bisect.

So the tally for this pull request, correctly this time:

cargo test -p leonida --test settings_line        ok        (my first report was wrong: my replay)
host::refresh_tests::only_what_differs_goes_up    red on main, not yours
watch::tests::kernel_reads_into_guarded_blocks    order-dependent, passes 3 of 3 alone
everything else in the workspace                  ok

That means I have not found anything this diff breaks, and I am sorry for the two rounds it took to say so. Both mistakes came from the same place: attributing a failure to the pull request without first reproducing it on main with nothing applied. The second time I had the clean check available and did not run it until the revert left the tree empty and the test still failed.

What would still be worth a look when you next touch it: the two tests above will fail for whoever rebases onto today's main, so a reviewer running the suite will see red and assume it is this branch. A note in the description would save them the hour it cost me.

AI-assisted: yes - DeepSeek v4.1 (flash).

Written with an AI assistant.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7297881120 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2801#issuecomment-7297881120). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-12-01T01:46:35Z. --- **Second correction on this pull request, and it is the same mistake twice: `only_what_differs_goes_up` is red on `main` before your change, so it is not yours either.** **With all 19 of your `leonida-gpu` files reverted and the tree clean, the test still fails. Then on a clean `main` `d920d850d`, with nothing applied:** ``` cargo test -p leonida-gpu --lib host::refresh_tests::only_what_differs_goes_up panicked at crates\leonida-gpu\src\host.rs:14749:13 assertion `left == right` failed left: [] right: [(65536, 131072)] ``` **And on `b7a1be296`, two merges earlier, it passes.** **So the red comes from `6d0ba44f0` / `d920d850d`, "pages written since they were taken go up by the 4 KiB that changed" - not from the F3 panel.** **I have written that up in #2570 with the bisect.** **So the tally for this pull request, correctly this time:** ``` cargo test -p leonida --test settings_line ok (my first report was wrong: my replay) host::refresh_tests::only_what_differs_goes_up red on main, not yours watch::tests::kernel_reads_into_guarded_blocks order-dependent, passes 3 of 3 alone everything else in the workspace ok ``` **That means I have not found anything this diff breaks**, **and I am sorry for the two rounds it took to say so.** **Both mistakes came from the same place: attributing a failure to the pull request without first reproducing it on `main` with nothing applied.** **The second time I had the clean check available and did not run it until the revert left the tree empty and the test still failed.** **What would still be worth a look when you next touch it**: **the two tests above will fail for whoever rebases onto today's `main`, so a reviewer running the suite will see red and assume it is this branch.** **A note in the description would save them the hour it cost me.** **AI-assisted:** yes - DeepSeek v4.1 (flash). Written with an AI assistant.
KelboLive commented 2026-12-01 02:36:23 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by KelboLive on 2026-12-01T02:36:23Z.


Confirmed independently, on pristine origin/main with no PR involved.

cargo test -p leonida-gpu --lib host::refresh_tests at d920d850d (Windows 11, the repo's toolchain, shared target dir):

host::refresh_tests::only_what_differs_goes_up ... FAILED
  left: []  right: [(65536, 131072)]
  test result: FAILED. 5 passed; 1 failed; 2 ignored

The same test passes at d920d850d^ (6d0ba44f0), so the red is d920d850d ("Pages written since they were taken go up by the 4 KiB that changed, on by default"), which turns LEONIDA_TAKE_BLOCKS on by default while the test's else arm still expects the whole page. Not this pull request's diff, either.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7298797140 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2801#issuecomment-7298797140). Originally posted by [KelboLive](https://github.com/KelboLive) on 2026-12-01T02:36:23Z. --- Confirmed independently, on pristine `origin/main` with no PR involved. `cargo test -p leonida-gpu --lib host::refresh_tests` at `d920d850d` (Windows 11, the repo's toolchain, shared target dir): ``` host::refresh_tests::only_what_differs_goes_up ... FAILED left: [] right: [(65536, 131072)] test result: FAILED. 5 passed; 1 failed; 2 ignored ``` The same test **passes at `d920d850d^` (`6d0ba44f0`)**, so the red is `d920d850d` ("Pages written since they were taken go up by the 4 KiB that changed, on by default"), which turns `LEONIDA_TAKE_BLOCKS` on by default while the test's `else` arm still expects the whole page. Not this pull request's diff, either.
KelboLive commented 2026-12-01 04:24:48 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by KelboLive on 2026-12-01T04:24:48Z.


Correction to my own finding above: the red at d920d850d is fixed on current main, so nothing is red now.

origin/main 86c30fcea   cargo test -p leonida-gpu --lib host::refresh_tests
  test host::refresh_tests::only_what_differs_goes_up ... ok
  test result: ok. 6 passed; 0 failed; 2 ignored; 0 measured; 635 filtered out

The test learned about LEONIDA_TAKE_BLOCKS in b9bfae60d ("test: only_what_differs_goes_up knows about LEONIDA_TAKE_BLOCKS") and again in aee2d526b ("... pages go up by the 4 KiB that changed"). So the window between d920d850d and those commits was red and is not any more; my earlier note that it was still d920d850d's business was right for that commit only.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7300708289 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2801#issuecomment-7300708289). Originally posted by [KelboLive](https://github.com/KelboLive) on 2026-12-01T04:24:48Z. --- Correction to my own finding above: the red at `d920d850d` is **fixed on current `main`**, so nothing is red now. ``` origin/main 86c30fcea cargo test -p leonida-gpu --lib host::refresh_tests test host::refresh_tests::only_what_differs_goes_up ... ok test result: ok. 6 passed; 0 failed; 2 ignored; 0 measured; 635 filtered out ``` The test learned about `LEONIDA_TAKE_BLOCKS` in `b9bfae60d` ("test: only_what_differs_goes_up knows about LEONIDA_TAKE_BLOCKS") and again in `aee2d526b` ("... pages go up by the 4 KiB that changed"). So the window between `d920d850d` and those commits was red and is not any more; my earlier note that it was still `d920d850d`'s business was right for that commit only.
KelboLive commented 2026-12-01 05:55:35 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by KelboLive on 2026-12-01T05:55:35Z.

Review: COMMENTED


The modes and the cycle are right, and the compatibility surface is tested: start_of (hud.rs:96-104) is trimmed and case-insensitive over fps/simple/cycle and rejects everything else to "no panel, F3 as on main"; next (:82-93) is closed over Turn, with the dead-thread path limited to hidden ↔ numbers panel; the F1 toggle, the F4 knob, the panic path and the thread-start failure all land inside it; and the F1 row keeps the run's start value, so a save writes nothing new. 39 hud/panel/menu tests, 49 menu, 5 ffx and 19 switch tests pass, and swapping the Fps/Simple arms of next is caught.

One thing to polish: Fps -> Simple repaints only at the next 500 ms look. paint::wait keys off last_paint, so wake()'s unpark just sleeps the remainder and the old mode's box stays up for up to half a second — showing and hiding are immediate, but this one transition is not. A mode != painted.mode (dirty) check in wait would make the key feel right.

On tools/d3d12_switches.py --check failing on ten names: they were already missing at the base commit (afb511541), and your LEONIDA_PANEL row is byte-identical to what --out generates, so this is not your change. Running --out once would also fix the LEONIDA_RENDER_SCALE +5 -> +6 the body mentions (which --check does not compare). Not a blocker — the page itself says no CI job keeps it current.

No key conflict: F3 stays the numbers panel's key and only becomes the cycle when the run asked for a panel, the foreground check is unchanged, and the title still sees the key.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6125889850 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2801#pullrequestreview-6125889850). Originally posted by [KelboLive](https://github.com/KelboLive) on 2026-12-01T05:55:35Z. **Review:** COMMENTED --- The modes and the cycle are right, and the compatibility surface is tested: `start_of` (`hud.rs:96-104`) is trimmed and case-insensitive over `fps`/`simple`/`cycle` and rejects everything else to "no panel, F3 as on main"; `next` (`:82-93`) is closed over `Turn`, with the dead-thread path limited to hidden ↔ numbers panel; the F1 toggle, the F4 knob, the panic path and the thread-start failure all land inside it; and the F1 row keeps the run's start value, so a save writes nothing new. 39 hud/panel/menu tests, 49 menu, 5 ffx and 19 switch tests pass, and swapping the `Fps`/`Simple` arms of `next` is caught. One thing to polish: **`Fps -> Simple` repaints only at the next 500 ms look.** `paint::wait` keys off `last_paint`, so `wake()`'s unpark just sleeps the remainder and the old mode's box stays up for up to half a second — showing and hiding are immediate, but this one transition is not. A `mode != painted.mode` (dirty) check in `wait` would make the key feel right. On `tools/d3d12_switches.py --check` failing on ten names: they were already missing at the base commit (`afb511541`), and your `LEONIDA_PANEL` row is byte-identical to what `--out` generates, so this is not your change. Running `--out` once would also fix the `LEONIDA_RENDER_SCALE` `+5 -> +6` the body mentions (which `--check` does not compare). Not a blocker — the page itself says no CI job keeps it current. No key conflict: F3 stays the numbers panel's key and only becomes the cycle when the run asked for a panel, the foreground check is unchanged, and the title still sees the key.
Sergentval commented 2026-12-01 11:50:31 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Sergentval on 2026-12-01T11:50:31Z.


Merged main (bf19719ab) into the branch with a plain merge commit, no conflicts; nothing was rebased.
On the merged tree: leonida-gpu lib tests (diagnostics) 697 passed, 0 failed, 53 ignored; leonida-menu 49 passed; leonida 42 + 2 + 2 + 1 passed (plus a 0-test target); both cargo check variants are clean.
Thanks to @OreoFR for the merge and cargo check run, and to @fiestorra for looking for regressions in the diff.

🤖 Generated with Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7310225379 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2801#issuecomment-7310225379). Originally posted by [Sergentval](https://github.com/Sergentval) on 2026-12-01T11:50:31Z. --- Merged main (bf19719ab) into the branch with a plain merge commit, no conflicts; nothing was rebased. On the merged tree: leonida-gpu lib tests (diagnostics) 697 passed, 0 failed, 53 ignored; leonida-menu 49 passed; leonida 42 + 2 + 2 + 1 passed (plus a 0-test target); both cargo check variants are clean. Thanks to @OreoFR for the merge and `cargo check` run, and to @fiestorra for looking for regressions in the diff. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sergentval commented 2026-12-01 18:46:05 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Sergentval on 2026-12-01T18:46:05Z.


Confirmed: paint::wait (d3d12/crates/leonida-gpu/src/host/hud/paint.rs, its since < EVERY arm) keyed off the last paint alone, so the wake from set was spent sleeping out the rest of the 500 ms.
Only these were actually late: F3 from the frame rate alone to simple, the F4 switch off and on from the frame rate alone (from simple it comes back to simple, already painted), and a quick F3 round that lands on the other shown mode than the one painted last.
cc8cd65: wait now takes the mode of the last paint (through wait_after, from what was painted), so another mode is painted as soon as the thread is woken if an upload buffer is free (else at the next look); the same wake after a size or format change still waits for the next look, and will be a follow-up.
a_new_mode_is_painted_at_once and the_wait_is_taken_from_the_mode_painted_last fail without the change (the second also when the current mode is passed instead of the painted one); leonida-gpu lib with diagnostics: 699 passed, 0 failed, 53 ignored; leonida-menu: 49 passed.
In the title (Series X profile, RTX 3090, driver 617.42) on 890842a, the commit before this rework: four "frame rate alone" -> "simple" switches showed the new box 164 to 231 ms after the press (key held 120 ms, 6 to 14 fps, so one to two frames), never 500 ms; a quick round of four F3 presses was inconclusive (one press lost).
docs/switches.md was not regenerated here, so as not to mix in rows unrelated to this change (the PR description already says so).

🤖 Generated with Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7321504631 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2801#issuecomment-7321504631). Originally posted by [Sergentval](https://github.com/Sergentval) on 2026-12-01T18:46:05Z. --- Confirmed: `paint::wait` (`d3d12/crates/leonida-gpu/src/host/hud/paint.rs`, its `since < EVERY` arm) keyed off the last paint alone, so the wake from `set` was spent sleeping out the rest of the 500 ms. Only these were actually late: F3 from the frame rate alone to simple, the F4 switch off and on from the frame rate alone (from simple it comes back to simple, already painted), and a quick F3 round that lands on the other shown mode than the one painted last. cc8cd65: `wait` now takes the mode of the last paint (through `wait_after`, from what was painted), so another mode is painted as soon as the thread is woken if an upload buffer is free (else at the next look); the same wake after a size or format change still waits for the next look, and will be a follow-up. `a_new_mode_is_painted_at_once` and `the_wait_is_taken_from_the_mode_painted_last` fail without the change (the second also when the current mode is passed instead of the painted one); leonida-gpu lib with diagnostics: 699 passed, 0 failed, 53 ignored; leonida-menu: 49 passed. In the title (Series X profile, RTX 3090, driver 617.42) on 890842a, the commit before this rework: four "frame rate alone" -> "simple" switches showed the new box 164 to 231 ms after the press (key held 120 ms, 6 to 14 fps, so one to two frames), never 500 ms; a quick round of four F3 presses was inconclusive (one press lost). `docs/switches.md` was not regenerated here, so as not to mix in rows unrelated to this change (the PR description already says so). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
merzleckeier commented 2026-12-01 19:12:48 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-01T19:12:48Z.


Offscreen check of immediate HUD mode publication at cc8cd652 versus 892cc870, both on main 60f7dcd9. With the initial FPS picture already ready, I called the production F3 cycle function and timed until the Simple picture was published. Polling used a 1 ms sleep. Each row is three fresh runs under Wine 11.22 / VKD3D-Proton 3.1.0.

GPU Prior head (ms) Updated head (ms)
RTX 4070 SUPER (620.73.4) 500.774, 500.996, 500.968 1.089, 1.085, 1.068
Radeon (RADV 26.3.1) 500.772, 500.749, 500.239 1.084, 1.085, 1.085

The picture grew from 108 × 24 to 240 × 57 each time. After the timing ended, the real HUD draw was submitted to a 640 × 480 offscreen D3D12 target and read back after a fence. All 12 draws changed 13,680 pixels from the backdrop value and kept the sampled far corner unchanged. Stock HUD tests passed 34 before and 36 after on each GPU. This measures the cycle call to paint readiness, before display or present.

MEASURED with synthetic inputs. AI-assisted (Codex).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7322403241 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2801#issuecomment-7322403241). Originally posted by [merzleckeier](https://github.com/merzleckeier) on 2026-12-01T19:12:48Z. --- Offscreen check of immediate HUD mode publication at `cc8cd652` versus `892cc870`, both on `main` `60f7dcd9`. With the initial FPS picture already ready, I called the production F3 cycle function and timed until the Simple picture was published. Polling used a 1 ms sleep. Each row is three fresh runs under Wine 11.22 / VKD3D-Proton 3.1.0. | GPU | Prior head (ms) | Updated head (ms) | | --- | --- | --- | | RTX 4070 SUPER (620.73.4) | 500.774, 500.996, 500.968 | 1.089, 1.085, 1.068 | | Radeon (RADV 26.3.1) | 500.772, 500.749, 500.239 | 1.084, 1.085, 1.085 | The picture grew from 108 × 24 to 240 × 57 each time. After the timing ended, the real HUD draw was submitted to a 640 × 480 offscreen D3D12 target and read back after a fence. All 12 draws changed 13,680 pixels from the backdrop value and kept the sampled far corner unchanged. Stock HUD tests passed 34 before and 36 after on each GPU. This measures the cycle call to paint readiness, before display or present. MEASURED with synthetic inputs. AI-assisted (Codex).
MoonEyes commented 2026-12-02 12:26:09 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T12:26:09Z.


This pull request touches the render path, so it needs an in-game run before it can be merged: unit tests and CI do not catch rendering regressions (a device loss after an earlier merge is why this gate exists).

Could you, or anyone with a working setup, post a run report on the current head merged onto current main:

  • the head SHA and the main SHA it was merged onto;
  • GPU, driver and OS;
  • at least 300 s in the world after loading;
  • device lost / crashes (count), and rendered fps (median) if you have them;
  • the same run on main alone for comparison, if you can.

Please do not attach logs or screenshots that show game content. If a run on this exact head is already posted, a link to it in a reply is enough.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7345334636 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2801#issuecomment-7345334636). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-02T12:26:09Z. --- This pull request touches the render path, so it needs an in-game run before it can be merged: unit tests and CI do not catch rendering regressions (a device loss after an earlier merge is why this gate exists). Could you, or anyone with a working setup, post a run report on the **current head** merged onto current `main`: - the head SHA and the `main` SHA it was merged onto; - GPU, driver and OS; - at least 300 s in the world after loading; - device lost / crashes (count), and rendered fps (median) if you have them; - the same run on `main` alone for comparison, if you can. Please do not attach logs or screenshots that show game content. If a run on this exact head is already posted, a link to it in a reply is enough. AI-assisted (Claude Code).
Kal0s-design commented 2026-12-02 14:18:42 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Kal0s-design on 2026-12-02T14:18:42Z.


Ran natively on Windows 11, head cc8cd6529 merged into current main (d0bf821fa, clean merge, no conflicts), repo toolchain, --locked.

Suites on the merge

Command Result
cargo test -p leonida-gpu --features diagnostics --lib 808 passed, 0 failed, 59 ignored
cargo test -p leonida-gpu --lib 691 passed, 0 failed, 59 ignored
cargo test -p leonida-menu 49 passed
cargo test -p leonida-hle --lib 248 passed, 2 ignored
cargo clippy -p leonida-gpu -p leonida-menu -p leonida-hle -p leonida --all-targets, with and without diagnostics 1 and 12 warnings, none on a line this PR adds or changes (all in files it does not touch, or in host.rs away from its hunks)
tools/d3d12_switches.py --check, tests/test_d3d12_switches.py, the 13 tests/test_docs_*.py all pass (20/20 switch tests)

The parsing and the F3 cycle are already covered by earlier reviews, so I only rechecked them briefly. Odd values (fps,simple, fps=1, a fullwidth fps, fps plus NUL, simpl, cycles, true, off) all give None. Values with surrounding tabs and newlines are accepted. Sequences from each start, with the thread alive or dead, match the description.

New: the panel drawn on the GPU through the PR's own hud::gpu::Draw

I wrote a throwaway test that uses the host device (WARP, then the hardware adapter), LEONIDA_D3D12_DEBUG=1, and an offscreen back buffer in the copy-destination state. Each frame goes through Draw::draw, execute_sync_internal and sent(0), 60 ms apart, while the panel's own thread paints. Then I read back the buffer. The window handle is 0, and there are no upscale calls, so the simple box has 4 rows (480x107 at 1080 lines), not 5. The four simple-mode rows and the debug-layer finding below ran on both adapters. The fps rows, the F3 runs, the blend check and the root-signature fix check ran on WARP only.

Target Mode Box read back Expected (size_of, margin)
1920x1080 RGBA8 simple (8,8)-(487,114) 480x107 at 8
3840x2160 BGRA8 simple (12,12)-(731,168) 720x157 at 12
5120x1440 RGB10A2 simple (8,8)-(487,114) 480x107 at 8
1280x720 RGBA8 simple (4,4)-(243,60) 240x57 at 4
1280x720, 2560x1440, 3840x2160 fps 108x24, 168x41, 234x58 same
  • Blending: over a 128 grey backdrop, the box ground reads 45/46/49. That matches the premultiplied ground [17,18,21,200] plus 55/255 of the backdrop, so the box is translucent as described.
  • F3 via hud::cycle() with LEONIDA_PANEL=cycle: hidden, fps box, simple box, then nothing drawn when the turn goes to the numbers panel, then hidden.
  • fps start with F3 at frame 27 of 30: the simple box was on screen about 120 ms later, which confirms the cc8cd65 wait change.
  • A size change in the same format: after going from 1280x720 back to 1920x1080, the old 720-line box (margin 4) was drawn on the 1080 buffer until the next look. That is the follow-up already named in the last comment, and nothing more.

Finding: debug-layer error on every new picture, inherited from the trainer menu's pipeline

My test first reported no messages, because the host drains the info queue itself during submission. With a tracing subscriber that captures those D3D12: lines (a deliberately wrong barrier is reported, as a positive control), the panel produces this on both WARP and the hardware adapter:

SetGraphicsRootDescriptorTable: Resource state (0x80: PIXEL_SHADER_RESOURCE) ... is invalid for use as a
NON_PIXEL_SHADER_RESOURCE|PIXEL_SHADER_RESOURCE ... the descriptor ... is declared as DATA_STATIC_WHILE_SET_AT_EXECUTE.  id=538 severity=1 (ERROR)

It is followed by a consequential id 527 on the next transition of the texture. Over 200 frames across 4 targets, that was 2 to 5 errors per 1.5 s segment, about one per repaint.

The cause is not new code. The trainer menu's root signature, DescriptorTable(SRV(t0)), has the default visibility ALL, while both the menu and the panel move the texture to PIXEL_SHADER_RESOURCE only. I enabled the debug layer in the existing host::trainer test the_overlay_draws_the_menu_offscreen, and it reports the same id 538 twice on the merge. This PR leaves that pipeline unchanged apart from pub(super), so main has it too.

Changing only the RS define to DescriptorTable(SRV(t0), visibility=SHADER_VISIBILITY_PIXEL) gave 0 messages over the same 200-frame run, and the host::trainer tests still pass (4/4). This does not block the panel, and it may fit better in a separate PR. As it stands, a LEONIDA_D3D12_DEBUG=1 run with the panel shown logs an extra debug-layer error about twice a second.

Edge formatting (CPU, text::rows and layout::commands)

Input Shown
0 frames counted -- FPS
0.1 fps 0 FPS 0.1 FPS
cost NaN / inf clamped to 999 US/FRAME / 9990 US/PAINT
5-digit sizes at 4320 lines (~10240X4320 -> 10240X4320) fits the box
32:9 (~3840X1080 -> OUTPUT 5120X1440) fits
window 0x0 the upscale/window row is left out
fps mode, 9999.4 shown fps 9999 FPS, 168x41, fits
fps mode, 9999.5 shown fps and above (10000 FPS) painted 174 px wide in a 168 px box

That last row is low severity. The fps box is sized for 9999 FPS, and picture() clamps to the texture, which is the simple box's width (480), so the last digit spills past the dark ground onto the picture instead of being clipped. It needs 2,500 rendered fps with x4 frame generation, or 10,000 without.

Not checked: a run of the title (no game launch), Streamline or FSR 3 frame generation, and the ffxDispatch pass-on and ray-tracing builder hooks. The presenter's real swap-chain path was not run either: my test calls Draw directly on an offscreen buffer with no window.

GPUs tested: one NVIDIA desktop card + WARP.

AI-assisted: yes (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7348333040 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2801#issuecomment-7348333040). Originally posted by [Kal0s-design](https://github.com/Kal0s-design) on 2026-12-02T14:18:42Z. --- Ran natively on Windows 11, head `cc8cd6529` merged into current `main` (`d0bf821fa`, clean merge, no conflicts), repo toolchain, `--locked`. **Suites on the merge** | Command | Result | |---|---| | `cargo test -p leonida-gpu --features diagnostics --lib` | 808 passed, 0 failed, 59 ignored | | `cargo test -p leonida-gpu --lib` | 691 passed, 0 failed, 59 ignored | | `cargo test -p leonida-menu` | 49 passed | | `cargo test -p leonida-hle --lib` | 248 passed, 2 ignored | | `cargo clippy -p leonida-gpu -p leonida-menu -p leonida-hle -p leonida --all-targets`, with and without `diagnostics` | 1 and 12 warnings, none on a line this PR adds or changes (all in files it does not touch, or in `host.rs` away from its hunks) | | `tools/d3d12_switches.py --check`, `tests/test_d3d12_switches.py`, the 13 `tests/test_docs_*.py` | all pass (20/20 switch tests) | The parsing and the F3 cycle are already covered by earlier reviews, so I only rechecked them briefly. Odd values (`fps,simple`, `fps=1`, a fullwidth `fps`, `fps` plus NUL, `simpl`, `cycles`, `true`, `off`) all give `None`. Values with surrounding tabs and newlines are accepted. Sequences from each start, with the thread alive or dead, match the description. **New: the panel drawn on the GPU through the PR's own `hud::gpu::Draw`** I wrote a throwaway test that uses the host device (WARP, then the hardware adapter), `LEONIDA_D3D12_DEBUG=1`, and an offscreen back buffer in the copy-destination state. Each frame goes through `Draw::draw`, `execute_sync_internal` and `sent(0)`, 60 ms apart, while the panel's own thread paints. Then I read back the buffer. The window handle is 0, and there are no upscale calls, so the simple box has 4 rows (480x107 at 1080 lines), not 5. The four simple-mode rows and the debug-layer finding below ran on both adapters. The fps rows, the F3 runs, the blend check and the root-signature fix check ran on WARP only. | Target | Mode | Box read back | Expected (`size_of`, margin) | |---|---|---|---| | 1920x1080 RGBA8 | simple | (8,8)-(487,114) | 480x107 at 8 | | 3840x2160 BGRA8 | simple | (12,12)-(731,168) | 720x157 at 12 | | 5120x1440 RGB10A2 | simple | (8,8)-(487,114) | 480x107 at 8 | | 1280x720 RGBA8 | simple | (4,4)-(243,60) | 240x57 at 4 | | 1280x720, 2560x1440, 3840x2160 | fps | 108x24, 168x41, 234x58 | same | - **Blending:** over a 128 grey backdrop, the box ground reads 45/46/49. That matches the premultiplied ground `[17,18,21,200]` plus 55/255 of the backdrop, so the box is translucent as described. - **F3 via `hud::cycle()` with `LEONIDA_PANEL=cycle`:** hidden, fps box, simple box, then nothing drawn when the turn goes to the numbers panel, then hidden. - **`fps` start with F3 at frame 27 of 30:** the simple box was on screen about 120 ms later, which confirms the `cc8cd65` wait change. - **A size change in the same format:** after going from 1280x720 back to 1920x1080, the old 720-line box (margin 4) was drawn on the 1080 buffer until the next look. That is the follow-up already named in the last comment, and nothing more. **Finding: debug-layer error on every new picture, inherited from the trainer menu's pipeline** My test first reported no messages, because the host drains the info queue itself during submission. With a tracing subscriber that captures those `D3D12:` lines (a deliberately wrong barrier is reported, as a positive control), the panel produces this on both WARP and the hardware adapter: ``` SetGraphicsRootDescriptorTable: Resource state (0x80: PIXEL_SHADER_RESOURCE) ... is invalid for use as a NON_PIXEL_SHADER_RESOURCE|PIXEL_SHADER_RESOURCE ... the descriptor ... is declared as DATA_STATIC_WHILE_SET_AT_EXECUTE. id=538 severity=1 (ERROR) ``` It is followed by a consequential id 527 on the next transition of the texture. Over 200 frames across 4 targets, that was 2 to 5 errors per 1.5 s segment, about one per repaint. The cause is not new code. The trainer menu's root signature, `DescriptorTable(SRV(t0))`, has the default visibility `ALL`, while both the menu and the panel move the texture to `PIXEL_SHADER_RESOURCE` only. I enabled the debug layer in the existing `host::trainer` test `the_overlay_draws_the_menu_offscreen`, and it reports the same id 538 twice on the merge. This PR leaves that pipeline unchanged apart from `pub(super)`, so `main` has it too. Changing only the `RS` define to `DescriptorTable(SRV(t0), visibility=SHADER_VISIBILITY_PIXEL)` gave 0 messages over the same 200-frame run, and the `host::trainer` tests still pass (4/4). This does not block the panel, and it may fit better in a separate PR. As it stands, a `LEONIDA_D3D12_DEBUG=1` run with the panel shown logs an extra debug-layer error about twice a second. **Edge formatting (CPU, `text::rows` and `layout::commands`)** | Input | Shown | |---|---| | 0 frames counted | `-- FPS` | | 0.1 fps | `0 FPS 0.1 FPS` | | cost `NaN` / `inf` | clamped to `999 US/FRAME` / `9990 US/PAINT` | | 5-digit sizes at 4320 lines (`~10240X4320 -> 10240X4320`) | fits the box | | 32:9 (`~3840X1080 -> OUTPUT 5120X1440`) | fits | | window 0x0 | the upscale/window row is left out | | fps mode, 9999.4 shown fps | `9999 FPS`, 168x41, fits | | fps mode, 9999.5 shown fps and above (`10000 FPS`) | painted 174 px wide in a 168 px box | That last row is low severity. The fps box is sized for `9999 FPS`, and `picture()` clamps to the texture, which is the simple box's width (480), so the last digit spills past the dark ground onto the picture instead of being clipped. It needs 2,500 rendered fps with x4 frame generation, or 10,000 without. Not checked: a run of the title (no game launch), Streamline or FSR 3 frame generation, and the `ffxDispatch` pass-on and ray-tracing builder hooks. The presenter's real swap-chain path was not run either: my test calls `Draw` directly on an offscreen buffer with no window. GPUs tested: one NVIDIA desktop card + WARP. AI-assisted: yes (Claude Code).
MoonEyes commented 2026-12-02 18:03:16 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T18:03:16Z.


Light code review only, not built (Windows-only leonida-gpu). Ready on code. The in-game gate is still open.

  • Head: cc8cd6529, merge base bf19719ab, 776 behind current main 45dc41f95. A trial merge is clean.
  • CI: the runs on this head are waiting for maintainer approval (action_required).
  • Already verified on this exact head:
    • Kal0s-design (14:18) ran on a clean merge onto d0bf821fa:
      • leonida-gpu --features diagnostics --lib: 808 passed.
      • leonida-gpu --lib: 691 passed.
      • leonida-menu: 49 passed.
      • leonida-hle --lib: 248 passed.
      • Clippy: no new lints on changed lines.
      • Switches and docs tests pass.
    • merzleckeier measured F3 cycle-to-paint at 1.1 ms (was about 500 ms) under Wine on two vendors.
  • Missing: the render-path in-game run MoonEyes asked for (12:26).

Review notes (24 files, about 3,000 added, mostly new host/hud/* modules with tests):

  • Scope is contained. The panel exists only in diagnostics builds and only with LEONIDA_PANEL=fps|simple|cycle. Unset, or any other value, keeps main's F3, FPS line, menus and threads. hud/tests.rs pins those defaults.
  • Changes outside the panel affect all builds, so they deserve a look in the gate:
    • a ~ glyph in leonida-menu/src/font.rs;
    • the draw.rs ray-tracing-builder check cached in a local (the same call count);
    • trainer::Pipeline visibility;
    • leonida-hle/src/modules/ffx.rs (16 lines);
    • the Win32_UI_HiDpi feature on the windows crate.
      None of these changes behaviour on the default path, as far as I can read.
  • At about 3,000 lines this is large for one topic. It is cohesive, though (one panel, split into layout, paint, text, state, watch and gpu modules), and the PR says what is unchanged when the panel is off.

Verdict: ready on code. Do not merge until an in-game run on this head (300 s, device losses, median fps, with and without LEONIDA_PANEL) is posted.

AI-assisted verification: Claude Opus (Claude Code), separate agent per batch.


Generated by Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7353897727 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2801#issuecomment-7353897727). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-02T18:03:16Z. --- **Light code review only, not built (Windows-only `leonida-gpu`). Ready on code. The in-game gate is still open.** - Head: `cc8cd6529`, merge base `bf19719ab`, 776 behind current `main` `45dc41f95`. A trial merge is clean. - CI: the runs on this head are waiting for maintainer approval (`action_required`). - Already verified on this exact head: - Kal0s-design (14:18) ran on a clean merge onto `d0bf821fa`: - `leonida-gpu --features diagnostics --lib`: 808 passed. - `leonida-gpu --lib`: 691 passed. - `leonida-menu`: 49 passed. - `leonida-hle --lib`: 248 passed. - Clippy: no new lints on changed lines. - Switches and docs tests pass. - merzleckeier measured F3 cycle-to-paint at 1.1 ms (was about 500 ms) under Wine on two vendors. - Missing: the render-path in-game run MoonEyes asked for (12:26). **Review notes (24 files, about 3,000 added, mostly new `host/hud/*` modules with tests):** - Scope is contained. The panel exists only in `diagnostics` builds and only with `LEONIDA_PANEL=fps|simple|cycle`. Unset, or any other value, keeps `main`'s F3, FPS line, menus and threads. `hud/tests.rs` pins those defaults. - Changes outside the panel affect all builds, so they deserve a look in the gate: - a `~` glyph in `leonida-menu/src/font.rs`; - the `draw.rs` ray-tracing-builder check cached in a local (the same call count); - `trainer::Pipeline` visibility; - `leonida-hle/src/modules/ffx.rs` (16 lines); - the `Win32_UI_HiDpi` feature on the `windows` crate. None of these changes behaviour on the default path, as far as I can read. - At about 3,000 lines this is large for one topic. It is cohesive, though (one panel, split into `layout`, `paint`, `text`, `state`, `watch` and `gpu` modules), and the PR says what is unchanged when the panel is off. Verdict: **ready** on code. Do not merge until an in-game run on this head (300 s, device losses, median fps, with and without `LEONIDA_PANEL`) is posted. AI-assisted verification: Claude Opus (Claude Code), separate agent per batch. --- _Generated by [Claude Code](https://claude.ai/code)_
EdenBendheim commented 2026-12-03 08:56:16 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by EdenBendheim on 2026-12-03T08:56:16Z.


Independent retail hardware gate, 2026-12-03 — partial pass; F3 visual/cycle verification remains open.

Tested exact PR head cc8cd65294b9f647b11fdd7152f6f143545a2509 locally merged onto d9b618f10150f275c30088e4769c1acbf1d8d689 (local merge 8650205079af23b671e7817f6d52324ce70c51e2). Locked offline diagnostic build succeeded, features diagnostics,dlss,mimalloc, Rust 1.98.1. Executable SHA-256 b1a33475bebd746f4923f63b91bed22044d46c79857be3478ec594d533998837 verified at staging. Windows 11 Home build 26200, RTX 3090 24 GiB, driver 610.88, Ryzen 9 5900X, 32 GiB RAM.

Stock gate, Series X 1440p output, no frame generation/precompile, warm cache, same outdoor save and native control-triggered placement at a busy location, one fresh process per mode. Actual target-stop results:

LEONIDA_PANEL World seconds Actual exit Median / p5 rendered FPS Frame p95 Longest present gap
unset 301.068 0 (clean) 14.98 / 5.02 199.11 ms 7.094 s
cycle (startup hidden) 304.802 0xC0000409 (not clean) 14.51 / 4.42 226.44 ms 3.074 s
simple (startup) 302.265 0 (clean) 15.31 / 5.05 197.85 ms 3.831 s
fps (startup) 301.852 0 (clean) 15.54 / 5.48 182.39 ms 2.543 s

FPS basis is stock gate present intervals from world+60 s; longest gap is the in-world gate statistic. All four confirmed control and native placement; no detected device loss. The cycle run reached the five-minute target and the stock summary said PASS, but the actual process exit was nonzero after graceful close was requested. A final allocation failure was recorded (about 1.51 GiB requested), with peak private bytes 31,407 MiB and minimum sampled system commit headroom 409 MiB. Cause attribution to the panel is not established. No performance benefit inferred from these single sequential runs; scene/cache work varied.

The native desktop-control service was unavailable, so I could not safely send F3 to the owned foreground window or inspect the presented overlay. The enabled startup legs exercise the configured render paths, not proof of visual correctness or F3 transitions; the hidden→FPS→simple→numbers→hidden cycle still needs interactive verification. The cycle exit anomaly also remains open. No game files, screenshots or raw logs attached.

AI-assisted test execution/report: GPT-6.2 Sol (Codex). No merge or approval requested.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7372947436 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2801#issuecomment-7372947436). Originally posted by [EdenBendheim](https://github.com/EdenBendheim) on 2026-12-03T08:56:16Z. --- Independent retail hardware gate, 2026-12-03 — **partial pass; F3 visual/cycle verification remains open**. Tested exact PR head `cc8cd65294b9f647b11fdd7152f6f143545a2509` locally merged onto `d9b618f10150f275c30088e4769c1acbf1d8d689` (local merge `8650205079af23b671e7817f6d52324ce70c51e2`). Locked offline diagnostic build succeeded, features `diagnostics,dlss,mimalloc`, Rust 1.98.1. Executable SHA-256 `b1a33475bebd746f4923f63b91bed22044d46c79857be3478ec594d533998837` verified at staging. Windows 11 Home build 26200, RTX 3090 24 GiB, driver 610.88, Ryzen 9 5900X, 32 GiB RAM. Stock gate, Series X 1440p output, no frame generation/precompile, warm cache, same outdoor save and native control-triggered placement at a busy location, one fresh process per mode. Actual target-stop results: | `LEONIDA_PANEL` | World seconds | Actual exit | Median / p5 rendered FPS | Frame p95 | Longest present gap | |---|---:|---|---:|---:|---:| | unset | 301.068 | 0 (clean) | 14.98 / 5.02 | 199.11 ms | 7.094 s | | cycle (startup hidden) | 304.802 | `0xC0000409` (not clean) | 14.51 / 4.42 | 226.44 ms | 3.074 s | | simple (startup) | 302.265 | 0 (clean) | 15.31 / 5.05 | 197.85 ms | 3.831 s | | fps (startup) | 301.852 | 0 (clean) | 15.54 / 5.48 | 182.39 ms | 2.543 s | FPS basis is stock gate present intervals from world+60 s; longest gap is the in-world gate statistic. All four confirmed control and native placement; no detected device loss. The cycle run reached the five-minute target and the stock summary said PASS, but the actual process exit was nonzero after graceful close was requested. A final allocation failure was recorded (about 1.51 GiB requested), with peak private bytes 31,407 MiB and minimum sampled system commit headroom 409 MiB. Cause attribution to the panel is not established. No performance benefit inferred from these single sequential runs; scene/cache work varied. The native desktop-control service was unavailable, so I could not safely send F3 to the owned foreground window or inspect the presented overlay. The enabled startup legs exercise the configured render paths, not proof of visual correctness or F3 transitions; the hidden→FPS→simple→numbers→hidden cycle still needs interactive verification. The cycle exit anomaly also remains open. No game files, screenshots or raw logs attached. AI-assisted test execution/report: GPT-6.2 Sol (Codex). No merge or approval requested.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/2801:upstream-pr/2801'
git switch 'upstream-pr/2801'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/2801'
git switch 'upstream-pr/2801'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2801'
git switch 'upstream-pr/2801'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2801'
git switch 'main'
git merge --squash 'upstream-pr/2801'
git switch 'main'
git merge --ff-only 'upstream-pr/2801'
git switch 'main'
git merge 'upstream-pr/2801'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
ProjectLeonida/mandy!2801
No description provided.