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
pull from: upstream-pr/2801
merge into: ProjectLeonida:main
ProjectLeonida:main
ProjectLeonida:claude/loop-total
ProjectLeonida:claude/pops-collision-seed
ProjectLeonida:claude/dstorage-hold-page-reads
ProjectLeonida:claude/host-image-copy-switch
ProjectLeonida:feat/gdk-lifecycle-window-hook
ProjectLeonida:claude/d16s8-uav-nvidia-fallback
ProjectLeonida:feat/mfplat-offline-shim
ProjectLeonida:claude/gameinput-slow-reader
ProjectLeonida:fix/rt-null-barrier-clear
ProjectLeonida:claude/depth-resolve-sample-positions
ProjectLeonida:integration/palmetto-parity
ProjectLeonida:claude/valu-literal-sext
ProjectLeonida:claude/slot74-pool-handle
ProjectLeonida:claude/rgb9e5-uint-alias-view
ProjectLeonida:claude/fssm-root-layout-tables
ProjectLeonida:feat/gdk-speech-display-lifecycle
ProjectLeonida:asset-audio-skip-current
ProjectLeonida:qemmhd/old-9940-rectangle-quad-lists
ProjectLeonida:feat/ws2-offline-shim
ProjectLeonida:qemmhd/rt-d16-unorm-uav
ProjectLeonida:feat/xs-device-stops-7-9
ProjectLeonida:qemmhd/rt-depth-same-base-shapes
ProjectLeonida:qemmhd/rt-lazy-attachment-variant
ProjectLeonida:feat/acphal-xma2-decoder
ProjectLeonida:asset-audio-skip
ProjectLeonida:codex/coord-claim-check-20261124-7e48
ProjectLeonida:feat/xs-frame-pacing-presentx
ProjectLeonida:feat/xs-device-vm-options
ProjectLeonida:old-pr/9844
ProjectLeonida:old-pr/9978
ProjectLeonida:old-pr/9815
ProjectLeonida:old-pr/10057
ProjectLeonida:old-pr/9874
ProjectLeonida:old-pr/9965
ProjectLeonida:old-pr/9863
ProjectLeonida:old-pr/10068
ProjectLeonida:old-pr/10066
ProjectLeonida:old-pr/10067
ProjectLeonida:old-pr/10007
ProjectLeonida:old-pr/10061
ProjectLeonida:old-pr/10065
ProjectLeonida:old-pr/10059
ProjectLeonida:old-pr/10063
ProjectLeonida:old-pr/10055
ProjectLeonida:old-pr/10062
ProjectLeonida:old-pr/10042
ProjectLeonida:old-pr/10041
ProjectLeonida:old-pr/10049
ProjectLeonida:old-pr/10047
ProjectLeonida:old-pr/10046
ProjectLeonida:old-pr/10045
ProjectLeonida:old-pr/10056
ProjectLeonida:old-pr/10043
ProjectLeonida:old-pr/10036
ProjectLeonida:old-pr/10034
ProjectLeonida:old-pr/9984
ProjectLeonida:old-pr/10052
ProjectLeonida:old-pr/10038
ProjectLeonida:old-pr/10033
ProjectLeonida:old-pr/10028
ProjectLeonida:old-pr/10050
ProjectLeonida:old-pr/9891
ProjectLeonida:old-pr/9889
ProjectLeonida:old-pr/10051
ProjectLeonida:old-pr/10019
ProjectLeonida:old-pr/10027
ProjectLeonida:old-pr/10029
ProjectLeonida:old-pr/10031
ProjectLeonida:old-pr/10026
ProjectLeonida:old-pr/9941
ProjectLeonida:old-pr/10030
ProjectLeonida:old-pr/10040
ProjectLeonida:old-pr/9990
ProjectLeonida:old-pr/10021
ProjectLeonida:old-pr/9962
ProjectLeonida:old-pr/10022
ProjectLeonida:old-pr/10020
ProjectLeonida:old-pr/10015
ProjectLeonida:old-pr/10025
ProjectLeonida:old-pr/9886
ProjectLeonida:old-pr/10048
ProjectLeonida:old-pr/10014
ProjectLeonida:old-pr/10011
ProjectLeonida:old-pr/9861
ProjectLeonida:old-pr/10010
ProjectLeonida:old-pr/10008
ProjectLeonida:old-pr/9860
ProjectLeonida:old-pr/10006
ProjectLeonida:old-pr/9920
ProjectLeonida:old-pr/9995
ProjectLeonida:old-pr/10000
ProjectLeonida:old-pr/10016
ProjectLeonida:old-pr/10004
ProjectLeonida:old-pr/10023
ProjectLeonida:old-pr/9982
ProjectLeonida:old-pr/9981
ProjectLeonida:old-pr/9983
ProjectLeonida:old-pr/9970
ProjectLeonida:old-pr/9969
ProjectLeonida:old-pr/9968
ProjectLeonida:old-pr/9971
ProjectLeonida:old-pr/9972
ProjectLeonida:old-pr/9942
ProjectLeonida:old-pr/9963
ProjectLeonida:old-pr/9960
ProjectLeonida:old-pr/9964
ProjectLeonida:old-pr/9985
ProjectLeonida:old-pr/9973
ProjectLeonida:old-pr/9862
ProjectLeonida:old-pr/9953
ProjectLeonida:old-pr/10017
ProjectLeonida:old-pr/9952
ProjectLeonida:old-pr/9955
ProjectLeonida:old-pr/9946
ProjectLeonida:old-pr/9954
ProjectLeonida:old-pr/9938
ProjectLeonida:old-pr/9956
ProjectLeonida:old-pr/9856
ProjectLeonida:old-pr/9947
ProjectLeonida:old-pr/9924
ProjectLeonida:old-pr/9961
ProjectLeonida:old-pr/9927
ProjectLeonida:old-pr/9979
ProjectLeonida:old-pr/10032
ProjectLeonida:old-pr/9926
ProjectLeonida:old-pr/5237
ProjectLeonida:old-pr/9951
ProjectLeonida:old-pr/9931
ProjectLeonida:old-pr/9902
ProjectLeonida:old-pr/9921
ProjectLeonida:old-pr/9994
ProjectLeonida:old-pr/9775
ProjectLeonida:old-pr/9768
ProjectLeonida:old-pr/9905
ProjectLeonida:old-pr/9936
ProjectLeonida:old-pr/9901
ProjectLeonida:old-pr/9904
ProjectLeonida:old-pr/9906
ProjectLeonida:old-pr/9988
ProjectLeonida:old-pr/9908
ProjectLeonida:old-pr/9909
ProjectLeonida:old-pr/9911
ProjectLeonida:old-pr/9912
ProjectLeonida:old-pr/9913
ProjectLeonida:old-pr/9887
ProjectLeonida:old-pr/9916
ProjectLeonida:old-pr/9919
ProjectLeonida:old-pr/9925
ProjectLeonida:old-pr/9933
ProjectLeonida:old-pr/9935
ProjectLeonida:old-pr/9918
ProjectLeonida:old-pr/9879
ProjectLeonida:old-pr/9880
ProjectLeonida:old-pr/9881
ProjectLeonida:old-pr/9996
ProjectLeonida:old-pr/9876
ProjectLeonida:old-pr/9892
ProjectLeonida:old-pr/9899
ProjectLeonida:old-pr/9915
ProjectLeonida:old-pr/9914
ProjectLeonida:old-pr/9872
ProjectLeonida:old-pr/9869
ProjectLeonida:old-pr/9866
ProjectLeonida:old-pr/9819
ProjectLeonida:old-pr/10012
ProjectLeonida:old-pr/9857
ProjectLeonida:old-pr/9893
ProjectLeonida:old-pr/9897
ProjectLeonida:old-pr/9928
ProjectLeonida:old-pr/9868
ProjectLeonida:old-pr/9917
ProjectLeonida:old-pr/9940
ProjectLeonida:old-pr/9873
ProjectLeonida:old-pr/9816
ProjectLeonida:old-pr/10009
ProjectLeonida:old-pr/9900
ProjectLeonida:old-pr/9966
ProjectLeonida:old-pr/9859
ProjectLeonida:old-pr/9843
ProjectLeonida:old-pr/9991
ProjectLeonida:old-pr/10058
ProjectLeonida:old-pr/9883
ProjectLeonida:old-pr/9838
ProjectLeonida:old-pr/9835
ProjectLeonida:old-pr/9959
ProjectLeonida:old-pr/9895
ProjectLeonida:old-pr/9837
ProjectLeonida:old-pr/9858
ProjectLeonida:old-pr/9865
ProjectLeonida:old-pr/9864
ProjectLeonida:old-pr/9840
ProjectLeonida:old-pr/9820
ProjectLeonida:old-pr/4669
ProjectLeonida:old-pr/9848
ProjectLeonida:old-pr/9850
ProjectLeonida:old-pr/9810
ProjectLeonida:old-pr/9799
ProjectLeonida:old-pr/9853
ProjectLeonida:old-pr/9875
ProjectLeonida:old-pr/9831
ProjectLeonida:old-pr/9796
ProjectLeonida:old-pr/9801
ProjectLeonida:old-pr/9813
ProjectLeonida:old-pr/9794
ProjectLeonida:old-pr/7417
ProjectLeonida:old-pr/9781
ProjectLeonida:old-pr/9806
ProjectLeonida:old-pr/9958
ProjectLeonida:old-pr/9809
ProjectLeonida:old-pr/9791
ProjectLeonida:old-pr/9792
ProjectLeonida:old-pr/10053
ProjectLeonida:old-pr/9784
ProjectLeonida:old-pr/9789
ProjectLeonida:old-pr/9849
ProjectLeonida:old-pr/9846
ProjectLeonida:old-pr/9773
ProjectLeonida:old-pr/9785
ProjectLeonida:old-pr/9803
ProjectLeonida:old-pr/9826
ProjectLeonida:old-pr/9839
ProjectLeonida:old-pr/9922
ProjectLeonida:old-pr/9948
ProjectLeonida:old-pr/7189
ProjectLeonida:old-pr/9957
ProjectLeonida:old-pr/9823
ProjectLeonida:old-pr/9807
ProjectLeonida:old-pr/9851
ProjectLeonida:old-pr/9774
ProjectLeonida:old-pr/9830
ProjectLeonida:old-pr/9836
ProjectLeonida:old-pr/9822
ProjectLeonida:old-pr/9783
ProjectLeonida:old-pr/9833
ProjectLeonida:old-pr/9890
ProjectLeonida:old-pr/9770
ProjectLeonida:old-pr/9769
ProjectLeonida:old-pr/9772
ProjectLeonida:old-pr/9787
ProjectLeonida:old-pr/9852
ProjectLeonida:old-pr/9834
ProjectLeonida:old-pr/9845
ProjectLeonida:old-pr/9871
ProjectLeonida:old-pr/9771
ProjectLeonida:old-pr/9776
ProjectLeonida:old-pr/10005
ProjectLeonida:old-pr/9949
ProjectLeonida:old-pr/9923
ProjectLeonida:old-pr/9805
ProjectLeonida:old-pr/9829
ProjectLeonida:old-pr/9790
ProjectLeonida:old-pr/9827
ProjectLeonida:old-pr/9929
ProjectLeonida:old-pr/9855
ProjectLeonida:old-pr/9934
ProjectLeonida:old-pr/9907
ProjectLeonida:old-pr/9910
ProjectLeonida:old-pr/9779
ProjectLeonida:old-pr/9780
ProjectLeonida:old-pr/9885
ProjectLeonida:old-pr/9882
ProjectLeonida:old-pr/9877
ProjectLeonida:old-pr/9998
ProjectLeonida:old-pr/4251
ProjectLeonida:old-pr/9987
ProjectLeonida:old-pr/9989
ProjectLeonida:old-pr/9950
ProjectLeonida:old-pr/9777
ProjectLeonida:old-pr/10044
ProjectLeonida:old-pr/9884
ProjectLeonida:old-pr/2906
ProjectLeonida:old-pr/5076
ProjectLeonida:old-pr/9937
ProjectLeonida:old-pr/9986
ProjectLeonida:old-pr/3014
ProjectLeonida:old-pr/9943
ProjectLeonida:old-pr/9939
ProjectLeonida:old-pr/4682
ProjectLeonida:old-pr/4765
No reviewers
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Assignees
Clear assignees
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
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2801"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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,simpleorcycle. 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_PANELunset, empty,0,1or any other value the run is as onmain: F3 shows and hides the numbers panel, theFPS: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 withoutdiagnosticsdo not have the panel. Outside it: the dot font gains a~glyph (all builds, where it drew a box before) andfont::has_dots, whether it has dots of its own for a character;trainer::Pipeline,pipelineanduploadbecomepub(super); the two places indraw.rsthat ask whether a dispatch is the ray-tracing builder's keep the answer in a local (asked once, as before);leonida-gputurns on thewindowscrate'sWin32_UI_HiDpifeature.hud/tests.rschecks the values of before (start_of, the menu's value, the corner, the lines taken). The code paths that read them are inhost/panel.rs(asked, F3),host/menu.rs(fps_line,apply_live,refresh_live) andhost/trainer.rs(knobs::PANEL, the lines below the panel).With the new values.
fpsstarts the frame rate alone,simplethe simple mode,cyclehidden. F3 then goes hidden, the frame rate alone, simple, the numbers panel (unchanged, with its frame-time rows), hidden. TheFPS: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 onmain).The rows and where each figure comes from:
60 FPS(large), then60.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 theFPS:line multiplies by too, so the two always agree), and+60.0is computed as the difference, not counted. Where that does not fit,+60.0moves afterFG 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 withLEONIDA_RENDER_SCALEset, 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:DLSSorSTRETCHwhenlist::upscale_nowrecorded one,GAME FSRwhen the call was passed on to the title's own FidelityFX upscale (leonida-hle'sffxDispatchcalls the title's, and tellslist::upscale_passed_onfirst; diagnostics builds only). A call that is neither (nothing recorded, the title'sffxDispatchnot found) is not counted. Shown only while such calls come (no row part without one).WINDOWis 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;IDLEwhile Streamline's or FSR 3's swap chain has the presents and generates nothing;X2...).RTisONwhile 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 indraw.rs, wherebuilder_runslet 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.pngandpanel-simple-fg.pngare 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 atry_lock. When the box's size or format changes, the old texture goes to the host's retirement (one allocation, its lock). In acyclerun, 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 theLEONIDA_PANELrow is edited, by hand, to whattools/d3d12_switches.pymakes from the new comment; the tool was not run. Regenerated, it would also change theLEONIDA_RENDER_SCALErow's "Named in" count from+5to+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 leonidawith and withoutdiagnostics,cargo clippy --locked -p leonida-gpu -p leonida-menu -p leonida --all-targetsandcargo clippy --locked -p leonida-hle --all-targets, each with and withoutdiagnostics(no new warning againstmain), andcargo build --locked --profile play -p leonida --features diagnostics. The tilde glyph's test fails withmain'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 asrowdraws 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 (ffxDispatchpassing a call on, a builder dispatch going on), which need the title.In the title (Series X profile, 3840x2160 picture, pipelines precompiled with
leonida shadersandleonida warm --used), four runs of four to six minutes each:LEONIDA_PANELunset: theFPS:line as onmain; 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 (theFPS:line back), the frame rate alone, simple.LEONIDA_PANEL=simple: the simple mode from the start.LEONIDA_PANEL=cycle: nothing of the panel, theFPS: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 FSRmarked only when the call is passed on,RTmarked at the dispatch, the window size read throughwindows::Win32::UI::HiDpi). After them, one more run withLEONIDA_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 (theFPS: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
mainand merges cleanly (a conflicting pull request is labeledneeds rebase). Based onafb511541; merges cleanly into398c085c4(checked withgit merge-tree), not rebuilt on it.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.
🤖 Generated with Claude Code
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, maincd9fe51a9. This is a type-check plus a code read:leonida-gpudoes not build natively on macOS, so the Mac can't run your unit tests or the panel.MEASURED
git merge-treeof this head onto main gives no conflicts.cargo check --target x86_64-pc-windows-msvc(no MSVC; theccbuild 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 newhud/*/tests.rs)-p leonida-hle --tests: 19 / 19 (ffx.rs)diagnostics.READ IN CODE
start_of()(host/hud.rs) givesSomeonly forfps,simpleorcycle(trimmed, any case). Unset, empty,0,1or any other value givesNone, soactive()is false and F3 stays with the numbers panel.start()readsLEONIDA_PANELonce (OnceLock).menu.rs:78keepsLEONIDA_PANELas the F1 "STATS PANEL (F3)" item, live.ASSUMED
Note:
d3d12/docs/switches.mdis 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
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 onmainplus this diff and not onmainalone. I did not get to the bottom of why, and I am reporting it anyway rather than leaving it for CI.maind920d850dplus this head,cargo 1.98.1, Windows:Line 25 is where the test looks for the startup line in the app's stderr:
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:
mainalone passes the same test, and the two runs are minutes apart on the same binary target.apps/leonida- it changesleonida-gpu(host/panel.rs,host/trainer.rs,list.rs),leonida-hle(modules/ffx.rs) andleonida-menu(font.rs), all of which the app links.git grep 'LEONIDA_ settings'matches only the test, so the line is composed with a format string I did not chase down, andapply_settings_namesonly sets variables - it does not log. That is where I would look next: something betweenmain's first call and the log line now runs earlier or panics quietly, andfont.rsis 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:
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.
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-01T01:39:00Z.
I have the diagnosis now: the app's stderr on
mainstarts with the settings line, and with this diff it starts with the error. Same binary target, same command, same environment.maind920d850d:mainplus this head:Six lines against five, and the missing one is the first. So
apply_settings_names()- whichmain.rs:188calls beforelogging::init("info")atmain.rs:189- no longer results in a line, or the log that prints it never runs.What that tells whoever fixes it:
apply_settings_names. It runs before the subscriber is installed, and it only callsstd::env::set_var(apps/leonida/src/leonida.rs:33-38). So the log comes from something afterlogging::initthat reads the applied settings and reports them, withtargetsettings.logging::initisleonida-core/src/logging.rs:20:EnvFilterfromLEONIDA_LOG/RUST_LOG, default"info", plus aCAPlayer andwith_target(true). If a change anywhere in this diff made thesettingstarget's event go to a level theCAPlayer drops, that is exactly the shape of this failure - the process still works, only the line is gone.apps/leonida,leonida-coreorleonida-lua. It changesleonida-gpu(host/panel.rs,host/trainer.rs,list.rs),leonida-hle(ffx.rs) andleonida-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 modulesettingsthat 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,infoon 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'sleonida-menu/font.rsstartup path is where to look.The test itself is unchanged and that is why it is a fair gate:
apps/leonida/tests/settings_line.rsasserts 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.
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_linedoes 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 onafb511541, andmainhas moved since:main'sapply_settings_namesreturnsVec<String>and feedsleonida::settings_line(...)atmain.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
maind920d850d- it is clean and different: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:
Run on its own, three times:
So
only_what_differs_goes_upis real and reproducible, andkernel_reads_into_guarded_blocks_after_openingis load- or order-dependent - it fails inside the full suite and passes alone, three times each way. Both are inleonida-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_upasserts. 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.
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.
So this is not a timing or ordering failure:
only_what_differs_goes_upbuilds a buffer, changes one region, and asserts what the refresh sends - and with this diff the refresh sends nothing.leftis the empty list,rightis 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) andlist.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:14749is the test's own line; the predicate it calls is whatever this diff changed.How it behaves next to the rest of the suite:
So
only_what_differs_goes_upis the one to fix; thewatchtest 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_linepasses when the diff is applied correctly (my earlier report of it was my replay, retracted above), and the only reds are these two inleonida-gpu.AI-assisted: yes - DeepSeek v4.1 (flash).
Written with an AI assistant.
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_upis red onmainbefore your change, so it is not yours either.With all 19 of your
leonida-gpufiles reverted and the tree clean, the test still fails. Then on a cleanmaind920d850d, with nothing applied:And on
b7a1be296, two merges earlier, it passes. So the red comes from6d0ba44f0/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:
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
mainwith 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.
Imported from ubiquitarianism/leonida. Originally posted by KelboLive on 2026-12-01T02:36:23Z.
Confirmed independently, on pristine
origin/mainwith no PR involved.cargo test -p leonida-gpu --lib host::refresh_testsatd920d850d(Windows 11, the repo's toolchain, shared target dir):The same test passes at
d920d850d^(6d0ba44f0), so the red isd920d850d("Pages written since they were taken go up by the 4 KiB that changed, on by default"), which turnsLEONIDA_TAKE_BLOCKSon by default while the test'selsearm still expects the whole page. Not this pull request's diff, either.Imported from ubiquitarianism/leonida. Originally posted by KelboLive on 2026-12-01T04:24:48Z.
Correction to my own finding above: the red at
d920d850dis fixed on currentmain, so nothing is red now.The test learned about
LEONIDA_TAKE_BLOCKSinb9bfae60d("test: only_what_differs_goes_up knows about LEONIDA_TAKE_BLOCKS") and again inaee2d526b("... pages go up by the 4 KiB that changed"). So the window betweend920d850dand those commits was red and is not any more; my earlier note that it was stilld920d850d's business was right for that commit only.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 overfps/simple/cycleand rejects everything else to "no panel, F3 as on main";next(:82-93) is closed overTurn, 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 theFps/Simplearms ofnextis caught.One thing to polish:
Fps -> Simplerepaints only at the next 500 ms look.paint::waitkeys offlast_paint, sowake()'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. Amode != painted.mode(dirty) check inwaitwould make the key feel right.On
tools/d3d12_switches.py --checkfailing on ten names: they were already missing at the base commit (afb511541), and yourLEONIDA_PANELrow is byte-identical to what--outgenerates, so this is not your change. Running--outonce would also fix theLEONIDA_RENDER_SCALE+5 -> +6the body mentions (which--checkdoes 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.
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 checkrun, and to @fiestorra for looking for regressions in the diff.🤖 Generated with Claude Code
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, itssince < EVERYarm) keyed off the last paint alone, so the wake fromsetwas 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:waitnow takes the mode of the last paint (throughwait_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_onceandthe_wait_is_taken_from_the_mode_painted_lastfail 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.mdwas not regenerated here, so as not to mix in rows unrelated to this change (the PR description already says so).🤖 Generated with Claude Code
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-01T19:12:48Z.
Offscreen check of immediate HUD mode publication at
cc8cd652versus892cc870, both onmain60f7dcd9. 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.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).
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:mainSHA it was merged onto;mainalone 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).
Imported from ubiquitarianism/leonida. Originally posted by Kal0s-design on 2026-12-02T14:18:42Z.
Ran natively on Windows 11, head
cc8cd6529merged into currentmain(d0bf821fa, clean merge, no conflicts), repo toolchain,--locked.Suites on the merge
cargo test -p leonida-gpu --features diagnostics --libcargo test -p leonida-gpu --libcargo test -p leonida-menucargo test -p leonida-hle --libcargo clippy -p leonida-gpu -p leonida-menu -p leonida-hle -p leonida --all-targets, with and withoutdiagnosticshost.rsaway from its hunks)tools/d3d12_switches.py --check,tests/test_d3d12_switches.py, the 13tests/test_docs_*.pyThe parsing and the F3 cycle are already covered by earlier reviews, so I only rechecked them briefly. Odd values (
fps,simple,fps=1, a fullwidthfps,fpsplus NUL,simpl,cycles,true,off) all giveNone. 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::DrawI 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 throughDraw::draw,execute_sync_internalandsent(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.size_of, margin)[17,18,21,200]plus 55/255 of the backdrop, so the box is translucent as described.hud::cycle()withLEONIDA_PANEL=cycle: hidden, fps box, simple box, then nothing drawn when the turn goes to the numbers panel, then hidden.fpsstart with F3 at frame 27 of 30: the simple box was on screen about 120 ms later, which confirms thecc8cd65wait change.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: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 visibilityALL, while both the menu and the panel move the texture toPIXEL_SHADER_RESOURCEonly. I enabled the debug layer in the existinghost::trainertestthe_overlay_draws_the_menu_offscreen, and it reports the same id 538 twice on the merge. This PR leaves that pipeline unchanged apart frompub(super), somainhas it too.Changing only the
RSdefine toDescriptorTable(SRV(t0), visibility=SHADER_VISIBILITY_PIXEL)gave 0 messages over the same 200-frame run, and thehost::trainertests still pass (4/4). This does not block the panel, and it may fit better in a separate PR. As it stands, aLEONIDA_D3D12_DEBUG=1run with the panel shown logs an extra debug-layer error about twice a second.Edge formatting (CPU,
text::rowsandlayout::commands)-- FPS0 FPS 0.1 FPSNaN/inf999 US/FRAME/9990 US/PAINT~10240X4320 -> 10240X4320)~3840X1080 -> OUTPUT 5120X1440)9999 FPS, 168x41, fits10000 FPS)That last row is low severity. The fps box is sized for
9999 FPS, andpicture()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
ffxDispatchpass-on and ray-tracing builder hooks. The presenter's real swap-chain path was not run either: my test callsDrawdirectly on an offscreen buffer with no window.GPUs tested: one NVIDIA desktop card + WARP.
AI-assisted: yes (Claude Code).
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.cc8cd6529, merge basebf19719ab, 776 behind currentmain45dc41f95. A trial merge is clean.action_required).d0bf821fa:leonida-gpu --features diagnostics --lib: 808 passed.leonida-gpu --lib: 691 passed.leonida-menu: 49 passed.leonida-hle --lib: 248 passed.Review notes (24 files, about 3,000 added, mostly new
host/hud/*modules with tests):diagnosticsbuilds and only withLEONIDA_PANEL=fps|simple|cycle. Unset, or any other value, keepsmain's F3, FPS line, menus and threads.hud/tests.rspins those defaults.~glyph inleonida-menu/src/font.rs;draw.rsray-tracing-builder check cached in a local (the same call count);trainer::Pipelinevisibility;leonida-hle/src/modules/ffx.rs(16 lines);Win32_UI_HiDpifeature on thewindowscrate.None of these changes behaviour on the default path, as far as I can read.
layout,paint,text,state,watchandgpumodules), 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
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
cc8cd65294b9f647b11fdd7152f6f143545a2509locally merged ontod9b618f10150f275c30088e4769c1acbf1d8d689(local merge8650205079af23b671e7817f6d52324ce70c51e2). Locked offline diagnostic build succeeded, featuresdiagnostics,dlss,mimalloc, Rust 1.98.1. Executable SHA-256b1a33475bebd746f4923f63b91bed22044d46c79857be3478ec594d533998837verified 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_PANEL0xC0000409(not clean)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.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.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.