Linux: enable scoped copy and descriptor tracking defaults #2700
No reviewers
Labels
No labels
accessibility
area: ci
area: d3d12
area: docs
area: launcher
area: runtime (legacy)
area: shader translator
area: tools
area: viewer
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs in-game run
needs rebase
needs-triage
question
ready-for-agent
submodules
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!2700
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-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?
@snesan821 on GitHub · 2026-11-30 06:44 UTC · original
snesan821:linux-copy-descriptor-defaults→main· +72 −0 · 2 files · 2 commits · merged 2026-12-01 10:52 UTCClaimed in the coordination issue as: #2570
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.@OreoFR on GitHub · 2026-11-30 06:44 UTC · original
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
@lixonik on GitHub · 2026-11-30 08:04 UTC · original
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.
@fiestorra on GitHub · 2026-11-30 12:06 UTC · original
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.
@aslan2142 on GitHub · 2026-12-01 10:30 UTC · original · approved these changes
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.)
@aslan2142 on GitHub · 2026-12-01 10:52 UTC · original
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.)