Linux: enable scoped copy and descriptor tracking defaults #2700
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2700"
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 snesan821 on 2026-11-30T06:44:05Z.
Claimed in the coordination issue as: https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7270942341
What and why
Set
LEONIDA_COPY_SCOPED=1andLEONIDA_PORT_DESCRIPTORS=1inscripts/play-linux.shwhen unset, matching the existing Windows launcher defaults. Explicit0remains an opt-out for either setting. No runtime code or other defaults change.Related: #2577 also edits this launcher. Its current launcher change merged cleanly with this patch in a local three-way check, and the regression tests passed against the combined script.
Tested
sh -n scripts/play-linux.sh.python3 -I tests/test_play_linux_defaults.py: the defaults test fails on unpatched main and both tests pass with this patch. The mock receives the correct environment without running Wine or game code.GPUs tested: n/a (shell and mocked process tests only).
AI-assisted: yes.
Checklist
main.Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-30T06:44:55Z.
Verified by OreoFR on macOS 27.2.1, Apple M5, Python 3.12.16
-I, mainbbd45f5cc, PR head856028dd4. MEASURED:tests/test_play_linux_defaults.py): Ran 2, FAILED (failures=1),test_unset_flags_default_to_enabled.merge --no-ff): Ran 2, OK.One thing to check against the description ("matching the existing Windows launcher defaults"):
d3d12/scripts/play-nvidia.ps1sets three of these on main,LEONIDA_QUICK_FIND_WINDOWS = '1'(line 231),LEONIDA_PORT_DESCRIPTORS = '1'(237) andLEONIDA_COPY_SCOPED = '1'(244). This PR adds the last two toplay-linux.shbut notLEONIDA_QUICK_FIND_WINDOWS. If that is on purpose (e.g. it was only measured on Windows), saying so in the comment line would help; otherwise it is missing.Not covered: any run under Linux/Proton.
AI-assisted: Claude Code
Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-11-30T08:04:30Z.
Independent local Ubuntu-on-WSL2 check of
856028dd495b61a60220b01a3e0c6e59a5b4d09eone1fe82f6381d51679493cb5c0ae9953e2b66565a. Ryzen 9 5950X, WSL2 kernel 6.18.58.1,/bin/sh, Python 3.10.12. Wine was replaced with a shell stub. All files and paths were synthetic.unset/unsetand failed. After applying the launcher change, both checked-in tests passed.sh -n scripts/play-linux.shand the no-game-data check also passed.0overrides. All 14 cases preserved the intended values and passed the expected runtime, title placeholder and console arguments to the stub.9a737660b95ac5999dad6ddd775efda834f5ba95. That covers the combined launcher path through its explicit Wine override. Rendering, real Wine/Proton and performance remain outside this test.AI-assisted.
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-30T12:06:04Z.
Verified as far as this machine allows: the change applies and its tests are the right shape, but they skip here, so I cannot give you a control.
What I did:
Why they skip:
tests/test_play_linux_defaults.py:16isand this is a Windows host, so the two cases that check
scripts/play-linux.sh's defaults never run. A skip counted as a pass would be the "does not bite" result I have mistakenly published twice today (stale binary, stale manifest), so I am not going to report one here.What a Linux host would show, and what I would ask: with the change, the two cases assert the scoped-copy and descriptor-tracking defaults on
play-linux.sh; revertingscripts/play-linux.shand keeping the test should make them fail. That is the control, and it needs a POSIX shell - thelinux-python-and-viewerjob is the one that runs it.What I could check without one: the change touches two files, a shell script and its test, and no runtime source - so the blast radius is a launch script's defaults, not the shim layer. The test file's name matches the script it checks, which is the pairing a reviewer wants to see.
Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T10:30:21Z.
Review: APPROVED
Verified against current
main: bothLEONIDA_COPY_SCOPED(d3d12/crates/leonida-gpu/src/host.rs) andLEONIDA_PORT_DESCRIPTORS(d3d12/apps/leonida/src/run.rs, with safe fallback to the changed-page scan if patching fails) exist and are GPU-vendor agnostic.tests/test_play_linux_defaults.pyis clean-room stdlib-only and passed inlinux-python-and-viewer.scripts/play-linux.sh:69(# Match the Windows launcher defaults;) is slightly broader than the two flags set here (e.g.LEONIDA_QUICK_FIND_WINDOWSis not set).semantic-testsfailed with an unrelated failure (UNSTABLE); please re-run CI to green before merging.(AI-assisted review.)
Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T10:52:18Z.
Verified the
semantic-testsfailure on this run was an unrelated base-branch 1-ULP failure intests/semantic/test_interp_computed_ij_fallback.py(already green on newermain), while all checks coveringscripts/play-linux.shandtests/test_play_linux_defaults.py(linux-python-and-viewer,no-game-data,change-scope,check,windows,linux-gpu-tools) passed. Squash-merging now.(AI-assisted review.)