d3d12: with LEONIDA_PANEL=fps, simple or cycle, F3 cycles an information panel (D3D12-PANEL-MODES) #2801
Open
github-bot
wants to merge 5 commits from
github-bot/gh-2801 into main
AGit
pull from: github-bot/gh-2801
merge into: github:main
github:main
github:perf/darner-title-priority-ceiling
github:gh-readonly-queue/main/pr-3311-b5c45b663dbc5a9c3532bb3f307e5f81b32faefa
github:gh-readonly-queue/main/pr-3088-af22e7847ff5808f72d1a1881c24be2fafd20b54
github:gh-readonly-queue/main/pr-3123-7f3fa026a94c6646e89244f28e1ce22290361867
github:gh-readonly-queue/main/pr-3354-637baa0b77ba47222e7280b17c1a59c6a1781d57
github:gh-readonly-queue/main/pr-3365-d7a0e0196a43834813014b4bd3aa5502a8263b14
github:gh-readonly-queue/main/pr-3361-5dfe8bbd05ed12fb2f2e1718d9af77a7c5f46fd8
github:gh-readonly-queue/main/pr-3366-8da9148204e9d12c585efa9ac2b7cc1ab08c7682
github:fix/runtime-test-conservative-fixtures
github:ci/shard-semantic-linux
github:docs/fg-limit-fps-switch
github:fix/runtime-test-fixture-paths
github:fix/runtime-test-fixture-readers
github:fix/read-file-hard-link
github:fix/book-slot-heap-never-read
github:fix/depth-resolve-spv-path
github:fix/indirect-unused-batched
github:gh-pr/3358/base
github:fix/xmem-refusal-diagnostics
github:gh-pr/3357/base
github:ci/shorten-ci-time
github:fix/alias-later-queued-submissions
github:claude/gallant-sagan-aamatr
github:gh-pr/3342/base
github:gh-pr/3341/base
github:d3d12/agility-sdk-621
github:gh-pr/3293/base
github:gh-pr/3319/base
github:gh-pr/3318/base
github:gh-pr/3315/base
github:gh-pr/3313/base
github:gh-pr/3314/base
github:claude/fervent-curie-m19lnr
github:gh-pr/3216/base
github:gh-pr/3272/base
github:gh-pr/3276/base
github:gh-pr/3279/base
github:gh-pr/3257/base
github:gh-pr/3258/base
github:gh-pr/3271/base
github:codex/skip-no-hit-ray-passes
github:gh-pr/3230/base
github:gh-pr/3266/base
github:gh-pr/3247/base
github:gh-pr/3246/base
github:gh-pr/3244/base
github:claude/sharp-sagan-1jqnp3
github:t3/preserve-fsr-sdk-restart-path
github:t3/propagate-host-failure-hresult
github:t3/launcher-custom-parameters
github:t3/series-x-2160-startup
github:codex/d3d12-uncapped-simulation
github:ci/less-to-run
github:perf/native-compute-shader-forms
github:claude/blissful-franklin-ukp7ag
github:codex/full-precompile-default
github:gh-pr/3166/base
github:gh-pr/3148/base
github:gh-pr/3138/base
github:gh-pr/3106/base
github:gh-pr/3057/base
github:gh-pr/2756/base
github:gh-pr/2812/base
github:gh-pr/3032/base
github:gh-pr/2992/base
github:notes/card-time-and-plant-flicker
github:gh-pr/2986/base
github:gh-pr/3000/base
github:gh-pr/2966/base
github:gh-pr/2924/base
github:gh-pr/726/base
github:gh-pr/2761/base
github:gh-pr/2663/base
github:gh-pr/2861/base
github:gh-pr/2862/base
github:gh-pr/2820/base
github:gh-pr/2811/base
github:gh-pr/2803/base
github:rt-call-trace
github:gh-pr/2802/base
github:gh-pr/2766/base
github:perf/ahead-split
github:gh-pr/2589/base
github:gh-pr/2699/base
github:gh-pr/2696/base
github:docs/readme-runtime-proposal
github:gh-pr/1346/base
github:codex/coord-claim-check-20261124-7e48
No reviewers
Labels
Clear labels
accessibility
Barrier affecting people with disabilities
area: ci
.github/ workflows and settings
area: d3d12
The D3D12 runtime in d3d12/ (Rust: leonida.exe and its crates)
area: docs
Documentation
area: launcher
The launcher (launcher/)
area: runtime (legacy)
The earlier Vulkan runtime in runtime/
area: shader translator
The shader translator (leonida-shader, tools/rdna2spirv) and its tests
area: tools
tools/ and scripts/
area: viewer
The map viewer (viewer/)
bug
Something isn't working
dependencies
Pull requests that update a dependency file
documentation
Improvements or additions to documentation
duplicate
This issue or pull request already exists
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
invalid
This doesn't seem right
missing claim
Needs a claim in #14
needs in-game run
Changes the code a frame runs through: needs the 300 s in-game gate (docs/game_gate.md)
needs rebase
Conflicts with the base branch: rebase it on main
needs-triage
Needs maintainer evaluation before the next triage state
question
Further information is requested
ready-for-agent
Fully specified and ready for an AFK agent
submodules
Pull requests that update submodules code
wontfix
This will not be worked on
No labels
accessibility
area: ci
area: d3d12
area: docs
area: launcher
area: runtime (legacy)
area: shader translator
area: tools
area: viewer
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs in-game run
needs rebase
needs-triage
question
ready-for-agent
submodules
wontfix
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.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!2801
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-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?
@Sergentval on GitHub · 2026-12-01 00:02 UTC · original
Sergentval:d3d12-panel-modes→main· +3069 −28 · 24 files · 7 commits · openClaimed in the coordination issue as: D3D12-PANEL-MODES (#2570)
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
@OreoFR on GitHub · 2026-12-01 00:09 UTC · original
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
@fiestorra on GitHub · 2026-12-01 01:26 UTC · original
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.
@fiestorra on GitHub · 2026-12-01 01:39 UTC · original
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.
@fiestorra on GitHub · 2026-12-01 01:43 UTC · original
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.
@fiestorra on GitHub · 2026-12-01 01:43 UTC · original
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.
@fiestorra on GitHub · 2026-12-01 01:46 UTC · original
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.
@KelboLive on GitHub · 2026-12-01 02:36 UTC · original
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.@KelboLive on GitHub · 2026-12-01 04:24 UTC · original
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.@KelboLive on GitHub · 2026-12-01 05:55 UTC · original · reviewed
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.
@Sergentval on GitHub · 2026-12-01 11:50 UTC · original
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
@Sergentval on GitHub · 2026-12-01 18:46 UTC · original
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
@merzleckeier on GitHub · 2026-12-01 19:12 UTC · original
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).
@MoonEyes on GitHub · 2026-12-02 12:26 UTC · original
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).
@Kal0s-design on GitHub · 2026-12-02 14:18 UTC · original
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).
@MoonEyes on GitHub · 2026-12-02 18:03 UTC · original
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
@EdenBendheim on GitHub · 2026-12-03 08:56 UTC · original
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.