Commit Graph

18350 Commits

Author SHA1 Message Date
0667503e3f fix discord link and remove redundant 2026-12-01 14:46:35 -05:00
61a47216ce d3d12-loader: test the levers' entry, and a lowest scale alone reaches 1.0 on Series S
Review of 8677729c9 (KelboLive):

- resolution_levers, the loader's only entry to the levers (windows.rs), was not pinned: replacing its apply_levers
  call with nothing still passed. A test now calls it with the environment set under a lock and put back, with a
  hash that starts as the 1.0.2.1 build's and with another one, and with no lever set.
- A lowest scale with neither a pinned scale nor LEONIDA_OWN_UPSCALER (F1's LOWEST SCALE alone) still took the
  lowest as the ceiling. The title's own dynamic resolution rises to max(lowest, 1.0) on Series S whichever way it
  is reached, so a lowest scale now has a ceiling of 1.0 too.

Both shown to fail without the fix: dropping the apply_levers call fails the new entry test; the old ceiling fails the
lowest-alone case. cargo test --locked -p leonida-loader --lib with LEONIDA_GAME_DIR: 88 passed; clippy -D warnings
clean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 16:45:24 -03:00
5586f9b003 d3d12: the DLSS build is asked for once NVIDIA's SDK is here, whatever the switches (D3D12-F1-DLSS-REBUILD)
play-nvidia.ps1 made the layer again with DLSS only when the start's own
switches wanted DLSS ($wantDlss), and it decides that before it reads the
F1 menu's saved settings. A DLSS choice the menu saved behind a replayed
-Resolution (the menu's SAVE AND RESTART) therefore asked for no build: with
a build noted as made without DLSS and NVIDIA's SDK installed afterwards,
every such start fell back from DLSS. get-nvidia-sdks.ps1 says the next
start builds the layer with DLSS; that held only for some switches.

The check now follows the SDK alone: a diag build noted as made without DLSS
is made again when nvsdk_ngx_d.lib is here, unless -NoDlss. It stays the one
check it was; no second one behind the menu.

Two things follow from asking more starts for that build:
- without cargo such a start no longer stops with "No build and no cargo":
  it says DLSS waits for cargo and runs the build that is here (a start with
  no build at all still stops, as before);
- a dry run, which builds nothing, says that a start builds first and prints
  the settings of the start after it; it printed the settings from before
  the build without a word.

Test: tests/test_play_nvidia_menu_choice.py, ten cases of launcher dry runs
against a synthetic folder with a stand-in cargo on the PATH (no game files,
no GPU), and one more run for a note whose exe is gone. On main six of the
ten fail (the five that expect the build and the one without cargo); with
this change all pass.

Not in this change: scripts/game-gate.ps1 refuses to run without a build so
that none is made inside a run. A build noted as made without DLSS, with the
SDK there, is now made again by starts that did not ask for it before (the
gate's default Series X start among them), inside the run. A guard there is
a follow-up: the gate needs PowerShell 7, which the PC this was written on
does not have.

Found by ubiquitarianism (ProjectLeonida/mandy#2570, 1 Dec 2026).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-12-01 21:38:29 +02:00
ab374c7d5e Merge pull request #2924 from OreoFR/ci/standalone-j8
ci: the standard-library test steps run 8 files at a time instead of 4 (CI-STANDALONE-J8)
2026-12-01 20:30:08 +01:00
93ffc48214 Merge pull request #2922 from ProjectLeonida/fix/series-s-f1-dlss
d3d12: honor saved DLSS at stock Series S resolution
2026-12-01 14:14:58 -05:00
4afb713165 tests: rename the address guard unit test so discovery does not import two test_address_guard modules 2026-12-01 14:12:53 -05:00
be4e237e00 tests: the CI registration test reads the standard-library step at -j 8 (CI-STANDALONE-J8)
`test_step_script_reads_the_check_loop` pins the runner line of the step; it
follows the workflow's new value.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 19:58:04 +01:00
8677729c94 d3d12-loader: say where the pool's size sits in its row, and the thousandth above 2/3
Review of de550f7cb (imShangLi):

- The comment called the pool "the third" of the row at 0x6186250, while the patch is 0x18 further on, which reads as
  the fourth. Each row is an 8-byte header followed by its nine sizes from +8 (the copy reads [row + 0x8]), so
  0x6186268 is the third size. The comment says so now.
- The README said "above 2/3"; the code wants more than 2/3 + 0.001, so that Series S' own 2/3 (0.6667) keeps the
  console's budgets. The README says that now.

No code change. cargo test -p leonida-loader --lib hooks: 15 passed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 15:50:09 -03:00
7ab2e6d3f8 Merge remote-tracking branch 'origin/main' into fix/series-s-f1-dlss 2026-12-01 13:47:17 -05:00
0b1f6b5887 d3d12: preserve explicit render scale on F1 restart 2026-12-01 13:47:17 -05:00
298313282a test_boot_ps1_python: test the 3.12 floor and that a hanging candidate leaves no process (BOOT-PS1-PYTHON-ALIAS)
The older-Python stand-in only exited 1, so changing (3, 12) in Test-Python left every test green. A stand-in now
runs Test-Python's own check with sys.version_info set: 3.11.9 is passed over for py -3 and 3.12.0 is taken. The
hanging stand-in sleeps in a Python child with a unique tag on its command line, and the test asserts that no
process holding the tag is left once Resolve-Python returns.

Test-Python's comment now gives the requirement it follows: the repository needs 3.12+ (README.md).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 15:46:47 -03:00
968602e474 ci: the standard-library test steps run 8 files at a time instead of 4 (CI-STANDALONE-J8)
On main's last green run the `check` job took ~12.5 min, 10.5 of them in
"Tests (standard library only, no game data)": 655 files, one Python process
each, 4 at a time on a 4-core runner. The Linux step of
`linux-python-and-viewer` took ~5 min the same way. Eight at a time is tried
to shorten both without asking for more runners; this pull request's own CI
gives the timings to compare.

Agreed to by a second human maintainer (Aslan).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 19:38:39 +01:00
60f7dcd904 Merge pull request #2826 from enlight3d/reaper-bounded-queue
D3D12-REAPER-BOUNDED-QUEUE: bound the reaper's line (LEONIDA_REAPER_LIMIT)
2026-12-01 19:37:13 +01:00
ea6caf88d3 Merge pull request #726 from ProjectLeonida/asset-audio-skip-current
assets: allow skipping audio export
2026-12-01 19:35:43 +01:00
ebb9ecb983 d3d12: honor saved DLSS at stock Series S resolution 2026-12-01 13:30:30 -05:00
cf9b0b6bfb gpu-test-results: the earlier failure was #1518, not the driver
aslan2142 is right. The RTX 4090 record on 621.24 said cs_imgatomic_ext
"not reproduced" the earlier failure, which frames it as a 591.86 -> 621.24
driver difference. The earlier failure at ed94fbef9 was a fixture volume-T# bug
(#1518), fixed on main in 2c9a491d5, so this record is the same result any build
after that fix gives, and says nothing about the driver.

Also from the review: the record names scripts\build_llvm_mc.ps1 as how llvm-mc
got there, and Notes says that only run_gpu_tests.py was run - the ctest suite,
the D3D12 tests and w64_graphics.py were not, so nothing here speaks for them.

Measured: the numbers are unchanged (284/284 translated, 217/275 native, 255/275
with LEONIDA_W64_EMULATE=1, 0 failed in either); only the wording and the two
notes changed.

Written with an AI assistant.
2026-12-01 19:21:53 +01:00
7fbdf85110 Merge pull request #2913 from ProjectLeonida/ci/exclude-legacy-cpp-runtime-tests
ci: exclude deprecated legacy C++ runtime/ from automatic CI runs
2026-12-01 19:00:46 +01:00
dcda41f769 Merge pull request #952 from barkodr/fix/census-tools-wrong-input
gbuffer_census, navmesh_cell_fit, root_spill_census: a wrong input is one ERROR line, not a traceback
2026-12-01 18:58:03 +01:00
fe0fb68460 ASSET-AUDIO-SKIP: allow skipping audio export
Add an opt-in assets-stage switch to skip audio extraction and conversion, preserve existing audio outputs, and account for the lower disk requirement. AI-assisted implementation; focused tests passed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-12-01 12:49:31 -05:00
dfce074a05 ci: exclude deprecated legacy C++ runtime/ from automatic CI runs 2026-12-01 12:43:58 -05:00
51f94c885d gbuffer_census, navmesh_cell_fit, root_spill_census: a wrong input is one ERROR line, not a traceback 2026-12-01 12:40:33 -05:00
27613ab6b8 Merge pull request #249 from ProjectLeonida/old-pr/9983
test: exercise AWC manifest staged cleanup on all hosts
2026-12-01 18:39:18 +01:00
9f0d351cc8 Merge pull request #2880 from alpfilho/d3d12/menu-last-choice-wins
d3d12: the last choice wins between the command line and the F1 menu (D3D12-MENU-LAST-CHOICE-WINS)
2026-12-01 18:38:35 +01:00
597e2d9226 Merge remote-tracking branch 'origin/main' into reaper-bounded-queue
d3d12/docs/switches.md regenerated with tools/d3d12_switches.py.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 18:30:24 +01:00
15396d1113 test: exercise AWC manifest staged cleanup on all hosts 2026-12-01 12:25:51 -05:00
de550f7cbf d3d12-loader: the Series S budgets follow the highest scale the title can reach
Review of 0cbc9e93a (KelboLive):

- The budgets followed the lowest scale, so -Lowest 720 on Series S (LEONIDA_RENDER_SCALE_MIN=0.6667) got none.
  The title's own upscaler stores its minimum at 0x28f1e78 and its maximum at 0x28f1e87 as max(minimum, f()). f() at
  0x1fb4300 is 1.0 on Series S and 2/3 elsewhere. So with that upscaler forced and no pinned scale, Series S may
  render up to 1.0 whatever the lowest. The budgets now follow the ceiling:
  - a pinned scale is its own ceiling;
  - the own upscaler with no pinned scale has a ceiling of 1.0, as with -Lowest or the F1 menu's OWN UPSCALER;
  - with neither, the ceiling is the lowest asked for.
- The call sites are covered now. resolution_levers reads the environment (Levers::from_env), checks the build and
  calls apply_levers. the_levers_give_series_s_its_budgets_for_the_highest_scale_it_can_reach runs apply_levers on
  an image buffer for -Resolution 1080, -Lowest 1080, -Lowest 720, the own upscaler alone, pinned 2/3, a pinned
  scale over a lowest one, and FSR alone. It fails when the budgets are dropped from apply_levers, and with the old
  floor rule.

cargo test -p leonida-loader --lib: 87 passed. cargo clippy -p leonida-loader --all-targets -- -D warnings: clean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 14:21:31 -03:00
d2a564b66a Merge pull request #2865 from azsekazvamdimitar/feat/rtx3090-vram-perf-and-translator
d3d12/vulkan + rdna2spirv: staged VRAM arena, DMA readback batching, parallel shadows, stream-pool fix & wave64 perf (RT-ARENA-DEVICE-LOCAL-STAGED)
2026-12-01 18:17:55 +01:00
3dd1bf4204 Merge pull request #2904 from ProjectLeonida/fix/ambient-green-blue-probes
gpu: drop neon green and blue garbage from the probe resolve on request
2026-12-01 12:14:36 -05:00
7be7711c8e Merge remote-tracking branch 'origin/main' into reaper-bounded-queue
d3d12/docs/switches.md regenerated with tools/d3d12_switches.py.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 18:12:31 +01:00
3d8ea1031b Merge pull request #2874 from kirigayakazima/fix/d3d12-core-empty-env-fallback
d3d12-core: ignore empty user-dir and log env vars
2026-12-01 18:12:30 +01:00
fe612066ac gpu: drop neon green and blue garbage from the probe resolve on request
The light pass already drops magenta from what the title's probe resolve
left (LEONIDA_AMBIENT_MAGENTA, on). LEONIDA_AMBIENT_GREEN=1 drops a green
far above red and blue, LEONIDA_AMBIENT_BLUE=1 a blue far above green and
above red, with the thresholds of lobomfz/VIctory-xmem 5a60834 (from
coastingVI via dfmbrollins/victory-linux-nvidia, GPL-3.0).

Both are off by default: the garbage was seen on Linux with RADV, not yet
on a Windows driver, and a strongly green or blue light that is real would
be dropped too. A new test compiles the part with every drop on and off;
it fails when a define the shader reads is missing.

On an RX 6800 (Windows 11, driver 32.0.21030.2001) with both on, a
save loaded into the world: the light passes were made with the drops
compiled in, and the picture showed nothing wrong over about 4 minutes.
No frame was compared with them off.
2026-12-01 12:02:15 -05:00
0d4cbd589d Merge pull request #2898 from ProjectLeonida/feat/skip-bink
hle: skip the title's Bink movies on request (LEONIDA_SKIP_BINK)
2026-12-01 12:00:33 -05:00
74da6c8a4b conftest: install the piecewise finder before the translator is imported
test_support_installs_the_finder_only_where_the_tokenizer_is_slow is the one
test keeping the CI workflow red on 85ec1d33b, and it is red for a reason that
has nothing to do with the translator:

  AssertionError: <class '_frozen_importlib_external.SourceFileLoader'> is not
                  <class 'support.PiecewiseLoader'>

support.py installs ToolsFinder just before PathFinder and then imports
rdna2spirv through it, but tests/conftest.py imports rdna2spirv first, for its
own fixtures. A finder can only take an import it is in sys.meta_path for, so
under pytest the module is loaded by PathFinder and stays that way; run as
`python tests/test_piecewise_parse.py` there is no conftest and the test passes.
Green one way, red the other, for the same code.

So conftest now puts tests/semantic on the path and imports support first.
support.py imports rdna2spirv itself, so the line after it stays as it is and
becomes the import that already happened.

Measured, main 85ec1d33b, this machine (CPython 3.14, where needed() is true):

  python -m pytest tests/test_piecewise_parse.py     1 failed, 25 passed -> 26 passed
  python tests/test_piecewise_parse.py               OK, still
  the five files ci.yml runs for this area + test_cpu_ref
                                                     81 passed, 34 skipped

Written with an AI assistant.
2026-12-01 18:00:04 +01:00
ace83ae110 game_run_summary: say whose peak the line is, and make the v2 path guard bite
KelboLive's review of #2845: without a systemd scope the peak is the caller
cgroup's lifetime peak, so the one-line summary now says so, which keeps a
comparison table from reading it as the run's own.

The `[ -n "$cg_rel" ]` guard was untested: removing it still passed, because the
fake root had no memory.peak to pick up. The v1 test now has one at the root, so an
empty v2 path reads nothing and dropping the guard fails it (checked: mutation
gives 1 failure).

AI-assisted: yes
2026-12-01 17:56:00 +01:00
0cbc9e93ab d3d12-loader: the Series S budgets for -Lowest too, both or neither, and a test that they land
Review of 29016670a (KelboLive):

- The budgets were applied only for a pinned LEONIDA_RENDER_SCALE. -Lowest 1080 on Series S sets
  LEONIDA_RENDER_SCALE_MIN to 1.0, and the title renders at or above it. The minimum path now applies them too.
- They are written by series_s_budgets through apply_all, so a build where one place differs keeps the console's
  own pair instead of a raised pool alone.
- the_series_s_budgets_are_written_both_or_neither writes them into an image buffer:
  - both are written at 1.0 and at 0.75, and neither at 2/3 or 0.5;
  - neither is written when the heap's place holds other bytes.
  With the helper made to write nothing, it fails.
- The game-step test has its doc comment back. The threshold test is named for both budgets.
- The README says -Lowest is covered.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 13:52:57 -03:00
85ec1d33b1 Merge pull request #2897 from ProjectLeonida/docs/no-direct-push-to-main
docs: prohibit direct pushes to main
2026-12-01 17:49:04 +01:00
8e1d4000a8 d3d12: -More's values in the menu report, -Dlss replaces the lowest scale, a tidier menu file write
Review of 3a3f38325 (aslan2142):

- The values -More sets were not in what the menu was compared with. A replaced value printed "-> (unset)", a value
  equal to the menu's was reported as replaced, and an empty menu value set by -More was not reported. They are
  overlaid now.
- -Dlss now also sets LEONIDA_RENDER_SCALE_MIN and LEONIDA_OUTPUT in $switchSettings, as -Resolution and -Lowest do,
  so a typed DLSS mode replaces a saved lowest scale.
- play-d3d12.ps1's -SmoothMotion is named -SmoothMotion/-NoSmoothMotion in the report, as -SeriesS is.
- The menu file is not read again to tell whether a value left it. After a failed write, only a temporary file this
  start wrote is removed; whatever already stood at that name is left alone.

Tests: 14. With the launcher of 3a3f38325, 4 fail.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 13:48:08 -03:00
f1573499ff Merge pull request #2895 from ProjectLeonida/fix/post-batch-merge-ci-regressions
Fix post-merge CI regressions in wave_diff, x64_recomp, and piecewise_parse
2026-12-01 17:48:08 +01:00
2d769e5f46 hle: skip the title's Bink movies on request (LEONIDA_SKIP_BINK)
LEONIDA_SKIP_BINK=1 skips the movies that play once (logos, the intro);
=all skips the looping ones too (menu backgrounds, which then stay dark).
Unset, nothing changes and no import is bound anew.

The title's Bink DLL still opens every movie. The exports a player loop
calls on an open movie (BinkWait, BinkDoFrame*, BinkNextFrame, BinkGoto,
BinkShouldSkip, BinkClose) are bound to wrappers that put a skipped movie
on its last frame and keep it from reaching the DLL, so the title's own
end-of-movie check closes it. The executable's imports and those of DLLs
the title loads later go through the wrapper; GetProcAddress does not.

The technique is from fxceless/victory-fork (pull request 613, by
C-GDev), as carried by trustno1-coder/VIctory-NVIDIA and
lobomfz/VIctory-xmem 0a4aadf (GPL-3.0); written anew for this loader.

Checked on an RX 6800 (Windows 11, driver 32.0.21030.2001): with =1 all
eight wrapped exports the executable imports from Bink2Scarlett.dll are
bound to the wrappers. Booting with no save and pressing Enter, the first
movie (3840x2160, 450 frames, not looping) was skipped and the title went
on to its setup screen. The unit test fails when the wrappers are not
bound.
2026-12-01 11:48:05 -05:00
29016670a0 d3d12-loader: Series S above 720p gets the other consoles' memory budgets (D3D12-SERIES-S-NATIVE-BUDGETS)
Series S at render scale 1.0 (1080p, `-SeriesS -Resolution 1080`, `play-S-1080p.ps1`) stopped the title at its own
breakpoint as soon as it started. The README listed it as "does not work yet". The title sizes two memory budgets per
console, both for Series S' own 2/3 scale, and at 1.0 each in turn is too small:

- The render-target pool, the third of nine pool sizes in the per-console table in .rdata: 1277 MiB on Series S,
  2199 MiB on the others. Its allocator treats a failed allocation as fatal, and a 1 MiB one failed.
- A heap counted in 64 KiB pages, `mov eax, 0x1290` then `cmovne` with 0x2c60: 297 MiB on Series S, 710 MiB on the
  others. A check compares a 432 MiB resource with it and stops at a breakpoint.

With a pinned render scale above 2/3, resolution_levers now writes the other consoles' sizes into both places. Only
Series S' row and its immediate change; the other consoles already hold such a scale. The retail-bytes test checks
both places and the other consoles' pool size.

RTX 3060, driver 621.40: Series S at 1080p ran five minutes into the world, rendering 1920x1080, at 11-22 fps, with
no crash. Before, it stopped about 8 s in, once at each budget.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 13:39:16 -03:00
a9c4995c5c docs: allow agents to manage PRs while keeping main push-protected
Clarify in docs/agent_collaboration.md, AGENTS.md, and CONTRIBUTING.md
that agents may open, change, merge, and close pull requests on separate
branches, while keeping the strict rule that nobody (human or agent)
ever pushes directly to main.
2026-12-01 11:37:19 -05:00
64ec184069 docs: prohibit direct pushes to main
Document clearly in CONTRIBUTING.md, AGENTS.md, and
docs/agent_collaboration.md that contributors, maintainers, and coding
agents must never push directly to main and must always use a separate
branch and pull request so every change goes through CI and review.
2026-12-01 11:27:57 -05:00
7f8bb90374 Merge pull request #2828 from OreoFR/fix/ahead-split-kept-thread
gpu: the split list ahead's textures half runs on one kept thread (D3D12-AHEAD-SPLIT-KEPT-THREAD)
2026-12-01 17:14:43 +01:00
3a3f383250 d3d12: a typed frame generation replaces the menu's other one; the restart replays -NoFrameGen
Review of cf15c2c6e (merzleckeier, full launcher with the final start mocked):

- A saved LEONIDA_FSR_FRAMEGEN=1 undid a typed -FrameGen 2. The launcher keeps FSR 3's frame generation when both are
  set and drops DLSS's. The two are one choice, so -FrameGen now also sets LEONIDA_FSR_FRAMEGEN and -FsrFrameGen also
  sets LEONIDA_FRAME_GEN in $switchSettings. A typed one replaces the menu's other.
- LEONIDA_MENU_ARGS left -NoFrameGen out, as main does, so SAVE AND RESTART turned frame generation on. It is
  replayed now.

Tests: 12 (two new). With the launcher of cf15c2c6e, the two new ones fail.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 13:09:20 -03:00
c648ec4bdf Merge remote-tracking branch 'origin/main' into fix/ahead-split-kept-thread
# Conflicts:
#	d3d12/docs/switches.md
2026-12-01 17:03:17 +01:00
9b7674d643 Fix post-merge CI regressions in wave_diff, x64_recomp, and piecewise_parse 2026-12-01 10:54:03 -05:00
1496a6bd2d d3d12-hle: avoid PlayStation live glyphs when Xbox pad is connected 2026-12-01 18:37:55 +03:00
49ef42d706 Merge remote-tracking branch 'origin/main' into reaper-bounded-queue
d3d12/docs/switches.md regenerated with tools/d3d12_switches.py.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 16:30:27 +01:00
0ff8a532ff Merge remote-tracking branch 'origin/main' into push/main-1130 2026-12-01 10:24:01 -05:00
d096ddc728 switches.md regenerated: LEONIDA_WINDOWS_BAR_LINE, LEONIDA_WC_SUBRANGE_NO_BACK on by default
AI-assisted (Claude).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 10:23:56 -05:00