d3d12: with LEONIDA_PANEL=fps, simple or cycle, F3 cycles an information panel (D3D12-PANEL-MODES) #2801
Code
Clone this repository
Checkout
From your project repository, check out a new branch and test the changes.
git fetch -u origin "github-pr/2801:github-pr/2801" git switch "github-pr/2801"
Open
leonida/mandy
Sergentval wants to merge 5 commits from
github-pr/2801 into main
pull from: github-pr/2801
merge into: leonida:main
leonida:main
leonida:github-pr/3295
leonida:beta
leonida:docs/changelog-3483-3500
leonida:github-pr/3294
leonida:github-pr/2975
leonida:github-pr/2815
leonida:feat/gate-driver-start
leonida:feat/skip-pipelines-release
leonida:perf/lazy-compare
leonida:perf/mwaitx-wait
leonida:test/prio-ceiling-main
leonida:fix/ab-cpu-stdout
leonida:fix/gate-old-crashes
leonida:diag/ab-cpu
leonida:test/main-0312
leonida:github-pr/3291
leonida:diag/indirect-clamp-census
leonida:feat/barrier-enhanced
leonida:perf/texture-frame-ceiling
leonida:perf/dstorage-threads
leonida:fix/console-queue-dma-tables
leonida:fix/port-descriptors-record-parts
leonida:fix/frame-waits-fence
leonida:fix/console-sampler-words
leonida:fix/graphics-userdata-spill
leonida:fix/xg-reserved-layout-rotation
leonida:fix/barrier-console-flags
leonida:fix/switches-wait-test-child
leonida:test/list-value-waits
leonida:test/lot-gxdk-0412
leonida:fix/bvh-compacted-size
leonida:docs/i18n-quickstarts
leonida:feat/native-pipeline-slots
leonida:fix/clippy-leonida-gpu
leonida:fix/list-value-producers
leonida:fix/descriptor-page-straddle
leonida:fix/xmem-low-window
leonida:fix/ffx-jitter-never-zero
leonida:fix/run-stdout-closed
leonida:github-pr/2892
leonida:github-pr/2896
leonida:feat/warm-save-every
leonida:github-pr/2980
leonida:github-pr/2994
leonida:github-pr/3005
leonida:github-pr/3010
leonida:github-pr/3136
leonida:github-pr/3303
leonida:github-pr/3220
leonida:github-pr/3143
leonida:github-pr/3330
leonida:github-pr/3226
leonida:github-pr/3187
leonida:carry/3395
leonida:github-pr/2946
leonida:github-pr/2947
leonida:github-pr/2945
leonida:github-pr/2983
leonida:github-pr/3001
leonida:github-pr/3372
leonida:github-pr/3128
leonida:github-pr/3296
leonida:github-pr/2588
leonida:github-pr/3119
leonida:github-pr/3378
leonida:fix/crash-diagnostics
leonida:feat/dlss-mip-bias
leonida:fix/retired-out-of-order
leonida:fix/dxr-postbuild-barrier
leonida:fix/amd-relay-default
leonida:fix/removed-report-wait
leonida:feat/heap-twin
leonida:feat/vram-margin
leonida:github-pr/2472
leonida:github-pr/3123
leonida:github-pr/3088
leonida:assets/annonce-v1
leonida:github-pr/2794
leonida:github-pr/3300
leonida:github-pr/3304
leonida:github-pr/3308
leonida:github-pr/3367
leonida:github-pr/3369
leonida:fix/launcher-dlss-diagnostics
leonida:github-pr/3269
leonida:github-pr/2957
leonida:github-pr/3205
leonida:fix/crash-zero-guard
leonida:github-pr/3185
leonida:github-pr/3099
leonida:github-pr/3104
leonida:github-pr/3348
leonida:github-pr/3379
leonida:github-pr/3377
leonida:perf/darner-title-priority-ceiling
leonida:github-pr/3376
leonida:gh-readonly-queue/main/pr-3311-b5c45b663dbc5a9c3532bb3f307e5f81b32faefa
leonida:gh-readonly-queue/main/pr-3088-af22e7847ff5808f72d1a1881c24be2fafd20b54
leonida:gh-readonly-queue/main/pr-3123-7f3fa026a94c6646e89244f28e1ce22290361867
leonida:github-pr/3373
leonida:github-pr/3368
leonida:github-pr/3198
leonida:gh-readonly-queue/main/pr-3354-637baa0b77ba47222e7280b17c1a59c6a1781d57
leonida:gh-readonly-queue/main/pr-3365-d7a0e0196a43834813014b4bd3aa5502a8263b14
leonida:gh-readonly-queue/main/pr-3361-5dfe8bbd05ed12fb2f2e1718d9af77a7c5f46fd8
leonida:gh-readonly-queue/main/pr-3366-8da9148204e9d12c585efa9ac2b7cc1ab08c7682
leonida:github-pr/3346
leonida:github-pr/3375
leonida:github-pr/2958
leonida:github-pr/3151
leonida:github-pr/3307
leonida:github-pr/3278
leonida:github-pr/3374
leonida:fix/runtime-test-conservative-fixtures
leonida:github-pr/3366
leonida:ci/shard-semantic-linux
leonida:github-pr/3354
leonida:docs/fg-limit-fps-switch
leonida:github-pr/3365
leonida:fix/read-file-hard-link
leonida:github-pr/3364
leonida:fix/book-slot-heap-never-read
leonida:github-pr/3361
leonida:github-pr/3263
leonida:github-pr/3360
leonida:github-pr/3353
leonida:github-pr/3331
leonida:fix/alias-later-queued-submissions
leonida:github-pr/3352
leonida:github-pr/3228
leonida:github-pr/3349
leonida:claude/gallant-sagan-aamatr
leonida:github-pr/3200
leonida:github-pr/3132
leonida:github-pr/3323
leonida:github-pr/3332
leonida:github-pr/3340
leonida:github-pr/3311
leonida:github-pr/3334
leonida:github-pr/3297
leonida:github-pr/3256
leonida:github-pr/2567
leonida:github-pr/2851
leonida:d3d12/agility-sdk-621
leonida:github-pr/3164
leonida:github-pr/3114
leonida:github-pr/3050
leonida:github-pr/3113
leonida:github-pr/3326
leonida:github-pr/3144
leonida:github-pr/2642
leonida:github-pr/3072
leonida:github-pr/2789
leonida:github-pr/2643
leonida:github-pr/3009
leonida:github-pr/3035
leonida:github-pr/3031
leonida:github-pr/2686
leonida:github-pr/2834
leonida:github-pr/3321
leonida:github-pr/3325
leonida:github-pr/3290
leonida:github-pr/3324
leonida:github-pr/3130
leonida:claude/fervent-curie-m19lnr
leonida:github-pr/3309
leonida:github-pr/3305
leonida:github-pr/3306
leonida:github-pr/3302
leonida:github-pr/3301
leonida:github-pr/3345
leonida:github-pr/3211
leonida:github-pr/3027
leonida:github-pr/3286
leonida:github-pr/3235
leonida:github-pr/3265
leonida:github-pr/3275
leonida:codex/skip-no-hit-ray-passes
leonida:github-pr/2823
leonida:github-pr/2911
leonida:github-pr/3262
leonida:github-pr/3125
leonida:github-pr/3206
leonida:github-pr/3250
leonida:github-pr/3238
leonida:github-pr/3188
leonida:github-pr/2952
leonida:github-pr/3217
leonida:github-pr/3168
leonida:t3/preserve-fsr-sdk-restart-path
leonida:t3/propagate-host-failure-hresult
leonida:github-pr/3209
leonida:t3/launcher-custom-parameters
leonida:github-pr/3207
leonida:github-pr/3183
leonida:github-pr/3160
leonida:github-pr/3201
leonida:ci/less-to-run
leonida:github-pr/2930
leonida:github-pr/2797
leonida:github-pr/2999
leonida:perf/native-compute-shader-forms
leonida:github-pr/3191
leonida:github-pr/3011
leonida:github-pr/3019
leonida:github-pr/2996
leonida:gh-readonly-queue/main/pr-2789-45dc41f95c1cd0dcc29c2c50582e0e9af8a77259
leonida:claude/blissful-franklin-ukp7ag
leonida:github-pr/3141
leonida:github-pr/3156
leonida:github-pr/3150
leonida:github-pr/3153
leonida:github-pr/3163
leonida:github-pr/3142
leonida:github-pr/3139
leonida:github-pr/2841
leonida:github-pr/3069
leonida:github-pr/3098
leonida:github-pr/3107
leonida:github-pr/3071
leonida:github-pr/2774
leonida:github-pr/2889
leonida:github-pr/3075
leonida:github-pr/2661
leonida:github-pr/3064
leonida:github-pr/3054
leonida:github-pr/3049
leonida:github-pr/2855
leonida:github-pr/2943
leonida:github-pr/3016
leonida:github-pr/2887
leonida:github-pr/3006
leonida:github-pr/3003
leonida:github-pr/2993
leonida:notes/card-time-and-plant-flicker
leonida:github-pr/2989
leonida:feat/vulkan-rs
leonida:github-pr/2985
leonida:github-pr/2951
leonida:github-pr/2982
leonida:github-pr/752
leonida:github-pr/792
leonida:github-pr/2877
leonida:github-pr/2654
leonida:github-pr/2893
leonida:github-pr/2948
leonida:github-pr/2944
leonida:github-pr/2919
leonida:github-pr/2915
leonida:archive/ci/less-to-run/20261202T1121Z
leonida:github-pr/2800
leonida:github-pr/2822
leonida:github-pr/2833
leonida:github-pr/2840
leonida:github-pr/2831
leonida:github-pr/2832
leonida:github-pr/2890
leonida:github-pr/2891
leonida:github-pr/2664
leonida:github-pr/2807
leonida:rt-call-trace
leonida:github-pr/2755
leonida:perf/ahead-split
leonida:github-pr/2587
leonida:github-pr/2698
leonida:github-pr/2609
leonida:github-pr/3219
leonida:docs/readme-runtime-proposal
leonida:github-pr/2017
leonida:github-pr/1741
leonida:github-pr/1667
leonida:codex/coord-claim-check-20261124-7e48
No reviewers
Assignees
Clear assignees
No assignees
Labels
Clear labels
bug
Something isn't working
dependencies
Pull requests that update a dependency file
documentation
Improvements or additions to documentation
enhancement
New feature or request
missing claim
Needs a claim in #14
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
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
Projects
Clear projects
No items
No project
Milestone
Clear milestone
No items
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Reference
leonida/mandy!2801
Loading…
Reference in a new issue
No description provided.
Delete branch "github-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?
This pull request has changes conflicting with the target branch.
Merge manually to resolve the conflicts.
Reviewers 0 approvals
Details
This pull request has changes conflicting with the target branch.
Merge manually to resolve the conflicts.
d3d12/crates/leonida-gpu/src/list.rsView command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.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
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
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.
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.
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.
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.
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.
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.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.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
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
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).
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).
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).
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
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.