d3d12 play-nvidia: typed SDK and glyph folders are made whole from the caller's folder (D3D12-LAUNCHER-RELATIVE-DIRS) #3240
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3240"
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 LouisRiverstone on 2026-12-02T21:59:03Z.
Claim: https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7359960834 (D3D12-LAUNCHER-RELATIVE-DIRS).
Why
play-nvidia.ps1makes only-Exeabsolute (:110). The runtime starts afterPush-Location $root, and the F1 menu's SAVE AND RESTART re-runs the script from there withLEONIDA_MENU_ARGS. So a relative folder typed for this start pointed underd3d12\in two places:-DlssDirand-StreamlineDirbecame a relativeLEONIDA_DLSS_DIRandLEONIDA_STREAMLINE_DIR, read by the runtime from$root. This happened even on the first start.-DlssDir,-StreamlineDir,-FidelityFxDir(and-PcGlyphsonce #3233 replays it) were replayed on restart as typed.What changed
d3d12/scripts/play-nvidia.ps1: right after-Exeis resolved, each of the four folders, if typed, is made whole against the caller's location withGetUnresolvedProviderPathFromPSPath. A folder that does not exist yet is still made whole, and~and PSDrive paths become real folder paths. Both the variable and$PSBoundParametersare updated, so the runtime and the restart get the same path. A path on a drive that does not exist stays as typed, so the later checks still name it.tests/test_win_launchers.py:test_nvidia_relative_folders_are_made_whole_from_the_callers_foldermakes a dry run from a separate caller folder whose name has an apostrophe. It checks the two runtime settings and the three replayed switches.The edit does not overlap #3233's hunks (its line
:742and its test, which sits at a different place in the file), so the two merge in either order.Verification (Windows 11, Windows PowerShell 5.1, Python 3.11; no game files, no GPU needed)
.ps1change reverted, the new test fails (LEONIDA_DLSS_DIRissdk\dlss). With the change, it passes.python -I tests/test_win_launchers.pyOK;tests/test_play_nvidia_menu_choice.pyOK.-DlssDir 'Q:\nope'(a drive that does not exist): the value is kept as typed and the script does not throw.python -I scripts/check_no_game_data.pyon both files: exit 0. The.ps1stays CRLF (1010/1010 lines).Folders taken from
LEONIDA_DLSS_DIR,LEONIDA_STREAMLINE_DIRorLEONIDA_FIDELITYFX_DIRin the environment are not changed. They reach the runtime and every restart unchanged, as before.AI assistance
AI-assisted: written with Claude Code (Claude Opus 5.5). It was reviewed by a separate read-only reviewer agent (Claude Opus 5.5), which checked scoping in PowerShell 5.1 and pwsh, the effect on
$PSBoundParametersreaders, edge cases (UNC,~, wildcards, PSDrives) and line endings, and found nothing blocking. Its one minor note, that a drive that does not exist threw, is handled.The
d3d12 (windows-latest)job fails onmainuntil #3237 merges (E0599 inleonida-lua); this PR touches no Rust.🤖 Generated with Claude Code
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-02T22:01:14Z.
Review: COMMENTED
Reviewed
019d8d602onf3865cae8. With Linux PowerShell 7.7.0 and synthetic files, the new test fails against the old launcher (LEONIDA_DLSS_DIRis stillsdk\dlss) and passes with this PR. The launcher suite passed 5 tests with 5 Windows-only skips.I also combined this with #3233 at
9f84a4498and reran the launcher suite (6 passed, 5 Windows-only skips). In a separate round trip, I launched a dry run from a caller directory whose name contains an apostrophe with-PcGlyphs keyboard/custom, then passed the emittedLEONIDA_MENU_ARGSunchanged to another PowerShell process started from the runtime root. The stub received the exact absolute caller path andMenuRestart=true. This verifies the two changes work together for the relative glyph case.Imported from ubiquitarianism/leonida. Originally posted by LouisRiverstone on 2026-12-02T22:19:08Z.
The
checkjob failed on the new test, not on the launcher. The runner'sTEMPis in 8.3 form (RUNNER~1), while PowerShell's location spells the long name (runneradmin), so the expected paths in the test did not match. The launcher output was right:LEONIDA_DLSS_DIRand the replayed switches were absolute. The test now builds its expected paths from the temporary folder's real long path. I reproduced it locally with aTEMPgiven asLONGFO~1: the old test fails the way CI did, and the new one passes and still fails againstmain's launcher.Imported from ubiquitarianism/leonida. Originally posted by LouisRiverstone on 2026-12-02T22:24:03Z.
Rewrote the branch's commits without a co-author trailer, so the head SHA changed (now
3de2d3604). The tree is identical to the reviewed one.Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-02T23:00:16Z.
VERIFY-3240 — Windows nativo: los tests pasan, y el caso que arregla no existe en esta máquina, medido
3de2d3604—tests/test_win_launchers.py, +2/−1f3865cae8family)Ran
The change, in full:
No control is possible here, and I measured why: earlier tonight I probed this machine's
TEMPwithGetShortPathNameW—C:\Users\Isegurav\AppData\Local\Temphas no 8.3 spelling (the short form is the same string), sorealpath(td) == tdand the changed line is a no-op on this host. The case it fixes only appears where the temp directory has aRUNNER~1name — GitHub's Windows runners.red not constructible hereis the honest verdict, not a pass I can vouch for.Why the fix is right anyway: it is the same class as #3231 (which I verified in the same way tonight) — a test that compares a path PowerShell printed against a path Python built, where the two spellings differ only by 8.3 expansion.
realpathis the one that resolves it.What I could not test: the CI runner itself. A test that cannot fail on the machine where it is verified still protects the machine where it does — that is what this one buys, and it should say so in its own comment (it does).
Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by LouisRiverstone on 2026-12-03T02:11:12Z.
@fiestorra thanks, and fair: on a TEMP with no 8.3 name the change is a no-op, so red can't be built there. I built it locally by giving TEMP as
LONGFO~1(GetShortPathNameof a long-named folder): the old test failed exactly as CI did (RUNNER~1vs the long name), and the new one passes and still fails againstmain's launcher.Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-12-03T06:37:59Z.
Windows native verification (
red -> green) -- PASS on head7bd205992(merged cleanly viagit merge --no-ffontomaind9b618f10).Checks (Windows 10 x64, Python 3.12, PowerShell 5.1)
python -I scripts/check_no_game_data.py-> PASSpython -I tests/test_win_launchers.py -v-> Ran 13 tests in 18.414s / OKd3d12/scripts/play-nvidia.ps1tomaind9b618f10, keeping the PR's tests):tests/test_win_launchers.py-> Ran 13 tests in 18.864s / FAILED (failures=1) (exit1)AI-assisted: yes (Antigravity -- Gemini 4 Neon).
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-03T15:26:50Z.
In-game gate run on an RTX 4060 8 GB (driver 610.88, Windows 11), in a batch of #3220, #3240, #3253 and #3257 merged into main
b053a1813; this PR tested at its current head7bd205992. Series S 1080, DLSS FG 2x, launched throughplay-nvidia.ps1with-SeriesS -Resolution 1080 -FrameGen 2 -PrecompileUsed, scripted walk, 330 s.AI-assisted (Claude Opus 5.5), run and read by MoonEyes' agent.