WIP: [pr-feature][startup] Settings picked from this PC: hardware auto-detect, darner rig, F1 AUTO-DETECT row, per-start switches (DARNER_AUTO_SWITCHES, on by default, =0 turns it off) #25
Loading…
Reference in a new issue
No description provided.
Delete branch "Jesper-A/Darner:launcher-core"
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?
Contributor role (optional)
What it changes
Base: the branch (4 commits) is on
de8d42006, themaincommit it was cut from.mainis now4a92569fb. Not rebased (we rebase only if you ask, or before this leaves WIP). A text-only trial merge (git merge-tree --write-tree --name-only trustno1/main launcher-core) conflicts incrates/darner-hle/src/lib.rsonly (two lines added next to otherpub uselines);README.md,apps/darner/src/main.rs,apps/darner/src/play.rs,crates/darner-gpu/src/host.rsandhost/menu.rsmerge cleanly.Two decisions are yours, and they come first.
DARNER_AUTO_SWITCHESis ON by default in this PR. Your usual convention is new behaviour off by default. For this one our user chose on (2026-12-03), because the two rules arescripts/play-rig.ps1's own and a player who runs the game throughdarner playgets them without a script.DARNER_AUTO_SWITCHES=0(indarner-settings.txtor with--set) turns it off. If you want it off by default, say so and I will flip it: a small change inplay.rs'sauto_switchescheck (it would read=1instead of=0), its opt-out test, the README row and the findings entry.darner launcherwanted at all? AGENTS.md asks PRs to drop "personal launchers". So: do you want a built-in launcher window in the repo? If not, that work stays out. This PR adds no window and no launcher command. It adds the part underneath: a hardware detector, tiers, and a settings writer, used bydarner rigand by F1. We are building a window on top of this branch, in the look of the "Preparing shaders" window (GDI, the same colours), as a later PR that will depend on this one. The detector,darner rigand the F1 row are useful without it.What it adds
crates/darner-gpu/src/rig.rs,detect): the card the game will run on, its own memory and Windows' video memory budget (DXGI); the Windows build and GPU scheduling (HAGS) from the registry; RAM, commit limit and free commit; the monitor's size and refresh rate (a display query); and Resizable BAR from Vulkan's memory heaps (darner rigonly; not read inside the game, because the Vulkan loader would load overlay layers into the process).only_f1_rows, requires it).darner rig(apps/darner/src/rig.rs, Windows only):darner riglists what it found, the picks and why. It writes nothing.darner rig --writewrites the picks intodarner-settings.txtonce: only rows you have not set, and nothing when auto-detect already wrote there.darner rig --applyis "run auto-detect again": every pick replaces the file's value, yours included, and each change is shown as old -> new.--home <dir>picks the Darner folder (defaultDARNER_HOME, else%LOCALAPPDATA%\darner).--writeand the F1 row save a marker (DARNER_MENU_AUTO) of what was written. After that every row is the player's: nothing re-applies the picks at later starts, manual changes are kept, and the marker lets a screen tell a value that is still auto from one the player changed. Run auto-detect again shows old -> new, so a replaced value of yours is visible.--apply, saves at once, then shows UNDO first, each change old -> new (amber: your own value was replaced), a one-line summary, and BACK last. UNDO puts the old settings back until you leave the list or close F1. Most changes apply at the next start (SAVE AND RESTART NOW). It runs only when you pick it.DARNER_AUTO_SWITCHES,darner playonly). At every startdarner playsets two engine switches from the PC, copyingscripts/play-rig.ps1's two rules with its thresholds:DARNER_TEXTURE_ROOM_PERCENT: with frame generation at 2x or more on a card of about 14 GB or more, 84 to 90 (a 16 GB card: 84); otherwise it sets nothing.DARNER_PIPELINE_WORKERS: 2 under 26 GB of commit free, 4 under 32 GB.darner-settings.txt(an empty value too) or with--setis kept, and the start says so.darner riglists what it would pick under "per start (not saved)".DARNER_AUTO_SWITCHES=0leaves both to the layer's own defaults. It is read from the settings file or--set; like any otherDARNER_*variable in the environment it is cleared.DARNER_AUTO_SWITCHES, adocs/findings.mdentry, and unit tests (rig26, menu 43,darnerbin 111, see below). The detector's decisions are plain functions of aHardwarevalue, so they are tested with made-up PCs.Files:
crates/darner-gpu/src/rig.rs(new),crates/darner-gpu/src/settings.rs(new: F1's rows, presets and file for other callers),crates/darner-gpu/src/host/menu.rs,apps/darner/src/rig.rs(new),apps/darner/src/play.rs,apps/darner/src/main.rs, pluslib.rsre-exports indarner-gpuanddarner-hle, one line inhost.rs,README.md,docs/findings.md.How well the tiers are backed
Only tier 1 rests on our own measured runs (an RTX 2070 SUPER 8 GB, ReBAR off). Tier 3 and the two per-start rules rest on
scripts/play-rig.ps1, which was built on one RTX 4080 16 GB (two runs). Tier 0, 2 and 4 are estimates from fps numbers players posted on the Fluxer server in December 2026 (their claims; no logs read), and tier 4 is a guess. No AMD or Intel tier is backed by a number. The module comment inrig.rssays the same, row by row.Not covered: nothing here was run in the game. F1's AUTO-DETECT screens were only rendered offline, not looked at in a running game. Whether the tier picks give a better start than the old defaults, on any card, is untested.
Spec dependence. Likely general: the detector reads Windows and Vulkan facts and should read the same on any PC; the settings writer and the per-start rules are plain file and map logic. May depend on our specs: every tier pick and cut-off. Only tier 1 is backed by our RTX 2070 SUPER; tiers 2 to 4 and the per-start rules rest on others' numbers (one RTX 4080 and player reports). Untested elsewhere: every other card, AMD and Intel (no DLSS path), laptops, 16 GB RAM PCs, tier 3 and 4 picks in game, multi-monitor setups, and
darner rigon Windows builds other than ours (26320).No upstream issue covers this, so there is no
FixesorRefsline.How it was tested
cb4bc0df7. The head is64f44ca35, which only adds a README fix on top (theDARNER_AUTO_SWITCHESrow said 80 when the PC does not qualify; the code sets nothing then). Both are onde8d42006;mainis now4a92569fb. The rows below were run on4f705d810(before the last two commits) or on the head; each says which.4f705d810: menu tests 42 passed, 0 failed;rigtests 24 passed, 0 failed; clippy clean;cargo xtask policyok.cargo test --workspacenot run.cb4bc0df7was committed (the per-start change): clippy clean fordarneranddarner-gpu, all targets;rigtests 26 passed, 0 failed; menu tests 43 passed, 0 failed;darnerbin tests 111 passed, 0 failed. The exact clippy flags of these runs were not recorded.053631dc3(F1 list fixes) was not gated on its own; the head run above covers the tree after it.cargo clippy --workspace --all-targets --locked -- -D warnings, the same with--all-features, andcargo test --workspace --locked.cargo xtask policywas not re-run on the head. Results will be added here. There is no CI upstream; none of this is a CI result.--apply, UNDO, the per-start lines,DARNER_AUTO_SWITCHES=0); any card but the RTX 2070 SUPER, and for that card only as unit-test data; the workspace test and the upstream clippy commands; Windows builds other than ours.Checklist
main. (Not ticked: the per-start switches (cb4bc0df7) are a second change; say so and I will split them into their own PR. The branch is onde8d42006, not on the currentmain; a trial merge conflicts indarner-hle/src/lib.rs, see Base.)docs/asset-policy.md. (Text only; no game data.cargo xtask policywas ok on4f705d810, not re-run on the head.)Checked for overlap
rig. On 2026-12-03 I searched this host's issues and pull requests (open and closed, titles and bodies) for launcher, auto-detect, "auto detect", rig, hardware, tier and preset: nothing covers a detector or a settings writer. Related, but different changes: issue #22 (F1 picture size resets to 1080p after save) is about howscripts/play-nvidia.ps1applies saved settings, not about picking them; issue #19 (central manager for video memory) and issue #1 (frame generation leaves textures starved on a 6 GB laptop) are about memory limits, which the tiers only read. Open pull requests that change files this one changes: #3 (umcakatabla) changeshost/menu.rs, the only other author there; #21 (xrobau) changesREADME.mdandscripts/play-nvidia.ps1, #24 (xrobau)README.md. The rest are ours (#5-#18): #8, #9, #12 and #16 changehost/menu.rs; #9, #12 and #16 alsoapps/darner/src/play.rsanddarner-hle/src/lib.rs; #6, #7, #8, #9, #12, #14, #15, #16, #17, #18 add todocs/findings.mdorREADME.md. Expect small merge conflicts in the F1 menu table,play.rs, thelib.rsre-exports and the two docs files. The trial merge above already shows one real conflict. Earlier CodeFloe pull requests of ours touched the same area and were not migrated: #276 (a launcher window) and #365 (an F1 menu redraw). They are not re-filed; the window now follows this PR.This change was made with AI assistance (Claude Code).