d3d12: a run logs the LEONIDA_ settings it starts with (D3D12-RUN-SETTINGS-LINE) #2775
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2775"
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 TheGeogeo on 2026-11-30T18:09:17Z.
Claimed in the coordination issue as: D3D12-RUN-SETTINGS-LINE (https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7287307317)
What and why
Testers asked for this: after an A/B, one of them could not show from the run's log that the switch under test was on. The play script clears and sets
LEONIDA_*variables, the F1 settings file adds more, and oldVICTORY_*names still map toLEONIDA_*. A run's log so far did not say what it ran with.leonida runnow logs one line at start, under its own targetsettings:LEONIDA_*variable present, sorted, asNAME=value.._,:+=*-shows only its length. That covers folders (which name the user), files and command lines, so a log that gets posted carries no path.VICTORY_*name says so (apply_settings_namesnow returns the names it set).LEONIDA_LOG=warn,settings=infokeeps the line on its own.It says what a run was started with, not that the code read each setting. The function is pure (
leonida::settings_line) and is called once in theRunarm. The log call goes throughleonida_hle::runtime::log_settings, because the app crate has notracingdependency, and adding one would changeCargo.lock, which is part of the translator's cache key.Tested
On Windows 11, from
d3d12\:Three new unit tests in
leonida::tests:LEONIDA_*, in order, and reads "no LEONIDA_ settings" when there are none;VICTORY_*origin is named.On
mainthey do not build, becausesettings_linedoes not exist there.cargo test -p leonida --locked --bin leonida leonida::: 6 passed.The real binary:
leonida.exe runon a missing exe, with four settings including a folder and an oldVICTORY_*name, printed the line above before failing to read the exe.cargo clippy -p leonida -p leonida-hle --all-targets --locked: nothing in the changed lines.git diff --checkandcheck_no_game_data.pyare clean.git merge-tree: merges cleanly with #2643 and, onmain.rs, with #2658. #2658's other conflict,leonida-loader/src/lib.rs, it already has withmain.GPUs tested: n/a (no GPU code; checked on Windows 11 Pro 10.0.26300).
AI-assisted: yes
Checklist
mainand merges cleanly.docs/design.md, with how it was confirmed. (Not applicable: no translator change.)Imported from ubiquitarianism/leonida. Originally posted by KelboLive on 2026-11-30T18:14:47Z.
Independent check on Windows (not the author), at
4d18c0d3b.cargo test --locked -p leonida-gpu -p leonida-hle --lib: 579 gpu tests + 222 hle tests, 0 failed (1 doctest; 52 ignored).descriptor::tests::records_copied_as_bytes...flake; rerun alone is clean.Environment: Ryzen 9 7950X3D, Windows 11 Pro 10.0.26200.9711, NVIDIA RTX 4070 Ti SUPER (driver 621.01), Rust 1.98.1 pinned.
AI-assisted: yes (opencode).
Imported from ubiquitarianism/leonida. Originally posted by TheGeogeo on 2026-11-30T18:32:20Z.
Added an integration test that fails on
mainby assertion, not only by not building (head58db554c7).apps/leonida/tests/settings_line.rsruns the builtleonida runon a title that does not exist. The run gets two settings, one of them a folder, and the test reads the log:mainit fails withno settings line;<hidden, 23 chars>, and the user name never reaches the log.cargo test -p leonida --locked --test settings_line --bin leonida: 43 passed. clippy: nothing in the new test.Imported from ubiquitarianism/leonida. Originally posted by enlight3d on 2026-11-30T20:54:54Z.
RUN (independent run on Windows, #2775 head
58db554c7, merged locally into main8f41d7d01withgit merge --no-ff, no conflicts. The head still merges cleanly into maind8ca18240. CI on the head: all checks pass.)Commands, in
d3d12/, target x86_64-pc-windows-msvc, toolchain 1.98.1, all with--locked, at low priority:cargo test -p leonida --no-fail-fast(the app): main 43 passed / 0 failed; merge 47 / 0. The 3 new unit tests and the new integration testa_run_logs_the_settings_it_starts_withpass.cargo test -p leonida-hle --no-fail-fast: 223 / 0 / 2 on main and on the merge.cargo clippy -p leonida -p leonida-hle --all-targets(without-D warnings, which already fails on main in leonida-shader and leonida-lua), on main and on the merge: no warning in the four files the PR touches.tests/settings_line.rsadded,cargo test -p leonida --test settings_linefails with "no settings line". The realleonida runon a missing title writes no such line on main.the_settings_line_hides_folders_and_filesand the integration test both fail. The folders and the user name then appear in the line, which is what the tests guard.the_settings_line_cuts_long_values_and_names_older_namesfails.In-game check on the RTX 3090 (leonida.exe built from
58db554c7,scripts/play-d3d12.ps1 -SeriesS -NoDlss -NoFrameGenwith four settings passed through-More, one of them the keys file path; 180 s, world reached at 83 s, no device loss): the settings line is written once at start, lists 65 LEONIDA_* variables sorted by name, including the four passed through-Moreand the ones the launcher sets. The keys file path is masked (only its length shown), folder variables are masked too, and no path or user name appears anywhere in the line.No runtime/ C++ or Python in this PR, so no link or import check applies.
Machine: Windows 11 Pro 26300, i9-13900K, 64 GB, RTX 3090 24 GB, NVIDIA 621.40.
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-30T23:13:25Z.
RUN - VERIFY-2775-RTX4060 - by MoonEyes (another person than the author) on head
58db554c7, with #2775 (58db554c7), #2777 (aec6998a9) and #2779 (4c36dba7c) merged together intomain407f71a23(clean).Machine: RTX 4060 8 GB, Windows 11, diag profile, features diagnostics,mimalloc, Series S,
-FrameGen 2(frame generation files absent, so off), BAR window off, texture budget 1024 MB.In-game, standing in the prologue cell, 480 s asked each: 2 runs, 0 device lost, 0 panics, 0 exceptions, alive at the time limit. About 500 s in the world each. Frame rate median 18.7 (first start: shaders retranslated and pipelines made, 955 s) and 18.6 (warm, 167 s). p5 11.0 and 11.6. The lowest lines are the load and the window's end.
Tests on
maineec86d0fa+ the three (Windows): leonida 47, leonida-hle 223, leonida-gpu 582, leonida-shader 403, 0 failed.#2775 in the run: the settings line is written once at the start, folders shown only as
<hidden, N chars>.Limits: one card, the character standing still, a session that did not reach the open world. Values only, no game data.
AI-assisted (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-30T23:13:46Z.
Merging. Head
58db554c7merges cleanly withmain9dffbe721and does not force a rebase of #2566. CI green on this head. Red/green by enlight3d (and KelboLive, OreoFR where they posted) on it; in-game run on the RTX 4060 posted above (2 runs, 0 device lost, about 500 s in the world); leonida, leonida-hle, leonida-gpu and leonida-shader tests pass on main + the three. Merged by MoonEyes.AI-assisted (Claude Code).