860 Commits

Author SHA1 Message Date
ea761afc75 Merge remote-tracking branch 'origin/main' into org/switches-no-conflict 2026-12-03 11:37:33 +01:00
58a3a61324 d3d12_switches: no count lines, one name per line, so two added switches do not conflict
Claim ORG-SWITCHES-NO-CONFLICT (#3312).

Every pull request that adds a LEONIDA_* name regenerates d3d12/docs/switches.md,
and the page opened with "N names; M have a sentence of a comment", which each
addition changes, so two such pull requests conflicted on that line however far
apart their rows were. The "Only in tests" and "Only in comments" sections were
one comma-joined line each, the same trap.

The generator now writes no total (the sentence is replaced by a fixed one) and
lists the test-only and comment-only names one per line. An addition touches
only its own row. Two additions conflict only when they land in the same gap
between two existing rows. --check reads the new list form; a test asserts that
an added name adds exactly one line and that no "N names" line exists.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 11:31:09 +01:00
fb80a4adc0 docs: fix stale agent rules and pages a repository audit found
- AGENTS.md: agents never merge their own pull request, as CONTRIBUTING.md says; the cargo test command no longer
  skips depth_bounds_pipeline_loads_and_filters_draws, which d3d12.yml runs and passes.
- The switches page said no CI job keeps it current; tests/test_d3d12_switches.py runs --check on it in the required
  check job. Fixed in the generator and the page.
- docs/design.md carried "PAL stage descriptors" twice, byte for byte; the second copy is gone.
- port_status.md and port_plan.md describe the Vulkan base and victory/, which no longer exists: a banner says so and
  points to d3d12/, and the index lists them under a historical heading instead of "Start here".

Claim: DOCS-STALE-AGENT-RULES (#3312)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 11:04:55 +01:00
96765c480f launcher, play-nvidia: a new card is no player change; -CardMask survives SAVE AND RESTART; cache tests per platform; Advanced cache dir
merzleckeier's review of 4b64ba9e4:
- Two Clear shader cache tests expected Windows' cache-2 while calling the
  platform default, so they failed on Linux (CI's linux-python-and-viewer).
  They pass windows=True now (clear_shader_cache takes `windows`).
- After an NVIDIA PLAY, choosing the AMD card made -Chosen name Adapter, Dlss,
  FrameGen, NoDlss and SmoothMotion: -Chosen compared for_card's output with
  last_switches, so the card filter looked like the player's edits and the
  F1 merge dropped the saved DLSS, frame generation and Smooth Motion. Now
  -Chosen compares the player's own switches (switch_args of the saved
  settings, -Log for a diagnostic start) and last_switches keeps those too
  (launch_snapshot, still taken with the queued command); the card's part
  goes as -CardMask only.
- play-nvidia.ps1's LEONIDA_MENU_ARGS (the F1 menu's SAVE AND RESTART)
  carries -CardMask, so a masked LEONIDA_FRAME_GEN=2 stays masked on the
  restarted start.
- Clear shader cache clears a LEONIDA_CACHE_DIR typed in the Advanced
  options, the cache PLAY uses on both systems, instead of the default.

Tests: test_a_new_card_is_no_change_of_the_players (NVIDIA PLAY then AMD:
-Chosen is Adapter only, -CardMask the three); the snapshot test now expects
the player's switches; test_an_advanced_cache_dir_is_the_one_cleared;
test_win_launchers runs the generated restart command (-CardMask in it,
LEONIDA_FRAME_GEN masked, the upscale the stretch). Launcher suite 139 OK on
Windows and 139 OK (2 skipped) under Linux (WSL Ubuntu, Python 3.12), where
the old tests fail on the two cache tests as in CI; test_win_launchers 12 OK.
Counter-tests: the old snapshot/chosen and no Advanced lookup fail 3 of 3;
no -CardMask in the restart arguments fails the restart case.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 04:33:10 +01:00
192a1eec6d Merge remote-tracking branch 'origin/main' into HEAD 2026-12-03 04:27:24 +01:00
c8baf9b741 Merge fork/feat/launcher-fgrt-follows-play (FidelityFX fetch, per-card install, FSR 3) into the review fixes
Conflicts: docs/launcher.md keeps the card-mask text with FSR 3's name;
tests/test_leonida_launcher.py keeps both sides' new classes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 04:17:38 +01:00
f1e9718e95 launcher, play scripts: review fixes of #3272 (card mask kept out of the F1 file, -Adapter for auto FG, Linux cache and binds, clear-cache race, unreadable binds kept)
merzleckeier's reviews at 02:35, 02:47 and 02:58 and DeadlyChirp's 02:46 note:
1. The AMD/Intel card filter named NoDlss, NoFrameGen and SmoothMotion in
   -Chosen, so a real PLAY rewrote leonida-settings.txt without the F1
   menu's DLSS, DLSS frame generation and Smooth Motion. The launcher now
   passes -CardMask (card_mask) instead; play-d3d12.ps1 hands it over and
   play-nvidia.ps1 leaves those settings out of this start only, keeping
   them in the menu file (and says so); the menu's FSR stays.
2. play-nvidia.ps1's automatic DLSS frame generation looked at every card:
   with -Adapter it now judges the cards whose name holds it (all when none
   does), so an AMD card chosen beside an RTX 4070 gets none; the card
   mask's NoFrameGen also keeps it off.
3. Clear shader cache on Linux looked under the Windows data folder: it now
   uses play-linux.sh's LEONIDA_CACHE_DIR or ${XDG_DATA_HOME:-~/.local/share}
   /leonida/cache.
4. After the confirmation, clear_cache asks game_running() again, not only
   its own process.
5. Linux PLAY passes the extra variables (the Controls page's binds, the
   advanced options, Advanced winning) in play-linux.sh's environment
   (`env NAME=value sh play-linux.sh ...`); none were passed before.
6. The Controls page keeps entries it cannot read beside its rows
   (split_kbm_binds) and writes them back after them: adding a row no longer
   drops a saved list with an unknown entry. Its note called t() with a
   `text=` value, which crashed the page as soon as it showed one: the
   placeholder is {entries} now, in de/es/fr/pt too.

Tests: test_card_mask_leaves_the_menus_nvidia_values_out_and_in_the_file
(dry runs, a real start with Start-Process stubbed keeping the menu file,
AMD + RTX 4070 with -Adapter each way and with the mask); card_mask and
-CardMask in play_command; LinuxPlayTests; SplitBindsTests with a guard
that no t() call passes text=. Launcher suite OK (1 skip), win launchers
12 OK, docs links, line endings, check_no_game_data. Counter-tests: the
mask ignored, the adapter filter off, the Linux env/cache, split and
card_mask reverted each fail their tests; the guard regex matches the old
source. Real window (isolated APPDATA): the game started during the
confirmation leaves the cache and says close the game first; adding H to
`both:G=Square;vehicle:N=FutureAction` saves G, H and the unknown entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 04:15:54 +01:00
516c9eaabf Merge pull request #3276 from OreoFR/feat/kbm-binds
d3d12 gameinput: LEONIDA_KBM_BINDS remaps keyboard and mouse binds without a rebuild (D3D12-KBM-BINDS)
2026-12-03 03:04:15 +00:00
14b3748832 Merge remote-tracking branch 'fork/feat/launcher-fgrt-follows-play' into feat/launcher-fgrt-follows-play 2026-12-03 04:03:50 +01:00
78a810cea0 launcher: PLAY fetches the files the card needs (DLSS or AMD's FSR 3 DLLs); Tools fetches AMD FidelityFX; "FSR 3"
- d3d12/scripts/get-amd-fidelityfx.ps1 (and Get-AMD-FidelityFX.cmd): AMD's
  two signed DLLs FSR 3 frame generation needs, amd_fidelityfx_loader_dx12.dll
  (39 184 bytes) and amd_fidelityfx_framegeneration_dx12.dll (29 679 376), from
  FidelityFX SDK v2.4.0's Kits/FidelityFX/signedbin on AMD's GitHub (the SDK
  whose structure versions fsr.rs speaks: frame generation 4.0.2, its DX12
  swap chain 4.0.0) into amd-sdk\FidelityFX\bin, the folder play-nvidia.ps1
  reads. Each is kept only with its pinned size and git blob hash and a valid
  Authenticode signature of Advanced Micro Devices, both or neither; AMD's
  licence (docs/license.md) is saved beside them. amd-sdk/ is git-ignored.
- Tools > Fetch AMD FidelityFX files, with a confirmation naming the size.
- needed_files(card): the DLSS fetch on an NVIDIA RTX card without NVIDIA's
  files, the FidelityFX fetch on a card DLSS frame generation does not run on
  (not an RTX 40 or 50, play-nvidia.ps1's own test) without AMD's DLLs; none
  for an unread card or off Windows, none once the files are there. With the
  new setting "Download the files my card needs" (on by default, Picture),
  PLAY runs those fetches first in the Output panel, then the game, also when
  one failed (the script starts without DLSS or FSR 3 then). Stop during a
  fetch ends the start. card_facts now names the judged cards.
- Frame generation's mode reads "FSR 3"; with it chosen and AMD's DLLs
  missing, a note says PLAY downloads them first, or where Tools does.

New texts in de/es/fr/pt; docs/launcher.md says it.

Tests: NeededFilesTests (every card kind with nothing there, nothing once
the files are, a half set fetched again, no card or off Windows, the RTX
40/50 test and the folder are the script's, the note, the setting, the
fetcher's pins and signature check and that its two names and fsr.rs's
versions agree; a real run of the fetcher on files that are not AMD's keeps
nothing, and an unpinned tag is refused). 130 OK, test_win_launchers OK.
Counter-tests: needed_files and the note doing nothing fail 3 of 3; the
fetcher without its checks keeps the fake DLLs and fails. Real window (AMD
card stubbed): "FSR 3" fits, the note shows, the Tools button; PLAY with
stubbed commands runs the fetch then the game after a failed fetch, and
only the game with the setting off. No real download was made.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 04:03:48 +01:00
2ab7c60e8f d3d12 gameinput: a leaving tap the hand-over pause swallowed keeps driving by hand
merzleckeier's review of c179023f9: with vehicle:G=Y;foot:G=RB and no
context, a G tapped inside the 400 ms pause after Caps Lock gave a neutral
pad (the pause holds back keys that change with the table), yet letting it
go switched to the on-foot table: `leaving` was armed from the raw press.
Now `leaving_sent` records that the key counted in a driving pad (its Y
sent); letting it go switches only then, otherwise driving by hand goes on.
Holding it through the pause sends Y and switches on release as before.

Tests: leaving_a_vehicle_by_hand_follows_the_remap gains the swallowed tap
(still driving, leaving cleared) and the held press (Y, then on foot).
cargo test -p leonida-hle 258 passed, 2 ignored; clippy -D warnings clean.
With the release switching unconditionally the test fails.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 03:44:49 +01:00
c179023f9c d3d12 gameinput: kbm binds read F144/Numpad160 without overflow; leaving a vehicle by hand follows the remap
merzleckeier's review of 94950d4a5:
- key_named used `then_some(VK_F1 + n - 1)` and `then_some(VK_NUMPAD0 +
  digit)`, which add before the range check: F144 or Numpad160 overflowed u8
  (a panic with overflow checks) instead of an "unknown key" warning. Now
  `then(|| ...)`.
- With no context measured, Caps Lock's driving table ended on the physical
  F, so `vehicle:F=RB` left driving and gave no RB. It now ends on a key just
  pressed that is the pad's Y in the driving table (F unless remapped;
  Binds::exit_pressed). A key that is Y on foot too switches at once, as F
  did; one that is another input on foot keeps the driving table while held
  (`leaving`), so its Y reaches the title, and the on-foot table comes when
  it is let go. Caps Lock or a measured context drops `leaving`.

Tests: four out-of-range names in bind_entries_read (F144, F255,
Numpad160, Num250); leaving_a_vehicle_by_hand_follows_the_remap
(vehicle:F=RB stays RB and driving; both:G=Y leaves at once with Y; G Y in a
vehicle and RB on foot holds Y until let go, then on-foot W is the stick and
G is RB; Caps Lock while leaving drops it). cargo test -p leonida-hle 258
passed, 2 ignored; clippy -D warnings clean. With the old then_some and the
physical-F rule both tests fail (overflow panic, vehicle:F=RB leaving).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 03:27:23 +01:00
7809f10bf7 play-nvidia, launcher: a VRAM size is an integer or exactly eight bytes; one bad adapter skips only itself
Review of beb149402 (merzleckeier, ecox982745):
- Parity on malformed values: the launcher's card_memory took byte arrays
  of 1 to 8 bytes, the script's decode took 8 or more and cast strings, so
  a 5-byte, 9-byte or string value greyed frame generation on one side and
  not the other. Both now read only an integer (REG_QWORD/REG_DWORD) or
  exactly eight little-endian bytes; anything else is no size.
- A terminating error reading one adapter (Get-ItemProperty, now with
  -ErrorAction Stop inside the per-adapter try) and an error while listing
  the class (-ErrorAction SilentlyContinue, a foreach over what was listed)
  no longer stop the walk before a later adapter's size.

Tests: test_nvidia_frame_generation_with_ray_tracing gains seven cases
(5-byte, 9-byte and string values; an 8 GB integer followed by a 5-byte or
9-byte 24 GB value; an adapter whose read throws before an 8 GB one; a
listing that reports an error before an 8 GB adapter); card_memory's test
gains the 5-byte and 9-byte arrays. tests/test_win_launchers.py 11 OK and
tests/test_leonida_launcher.py OK in Windows PowerShell 5.1; on the
previous script the new cases fail (9-byte and string values, 8 GB + 9-byte
24 GB, the throwing adapter and the listing error).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 03:20:45 +01:00
beb1494023 play-nvidia: an eight-byte qwMemorySize is decoded, not cast (D3D12-VRAM-BYTES)
$vram, the largest HardwareInformation.qwMemorySize of the display class,
cast the value straight to [uint64]. Some drivers write it as eight
little-endian bytes (REG_BINARY); the cast then threw inside the walk's one
try, so the walk stopped there. With the Series X 20 GB rule for frame
generation with ray tracing, an 8 GB card written as bytes kept 2x, and an
integer 8 GB followed by a 24 GB card in bytes left it off, while the
launcher's card_facts (which decodes the bytes) said the opposite
(merzleckeier's review on #3272).

The value is now decoded with [BitConverter]::ToUInt64 when it is a byte
array of eight or more bytes, and each adapter has its own try, so an odd
value skips that adapter only.

Tests: test_nvidia_frame_generation_with_ray_tracing's registry stub takes
several adapters, each an integer or a byte array; four new cases (8 GB and
24 GB as bytes, integer 8 GB + 24 GB bytes, and the reverse order). All 11
tests of tests/test_win_launchers.py pass in Windows PowerShell 5.1; on the
unpatched script the new cases fail exactly as reported (8 GB bytes keeps 2x,
8 GB int + 24 GB bytes leaves it off).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 03:08:05 +01:00
94950d4a57 d3d12 gameinput: LEONIDA_KBM_BINDS, keyboard and mouse binds without a rebuild (D3D12-KBM-BINDS)
`LEONIDA_KBM_BINDS=scope:key=action;...` (scope foot, vehicle or both; key a
letter, digit or name such as Space, LShift, Numpad8, F5, MouseLeft; action a
pad input such as A, Square, RB, LT, DpadUp, LeftY+, or none) changes the
GTA V layout's two tables. An entry replaces every default bind of its key in
its scope; several keys may give one action. The tables are built once
(LazyLock) from the consts plus the entries, and the stand-in pad, `outputs`
and the hand-over rule (`changes`) all read the built tables, so a remapped key
that ends up another input in a vehicle than on foot waits for a fresh press
after a change of table.

Entries that do not read, and the runtime's own keys (F1 settings menu, F3
numbers panel, F4 trainer menu, F8 ped dump, F9 frame capture, Left/Right Alt,
Caps Lock), are skipped with one warning each naming the entry; nothing
panics. Unset, the tables are the consts bind for bind (tested over all 256
keys); LEONIDA_KBM=classic does not read the variable.

Tests: cargo test -p leonida-hle (257 passed, 2 ignored), clippy -p
leonida-hle --all-targets -D warnings clean; a counter-test that keeps the
default binds of a named key fails 3 of the new tests, one that runs the
hand-over on the default tables fails the remapped hand-over test.
docs/gameinput.md documents the syntax; d3d12/docs/switches.md regenerated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 02:21:32 +01:00
36f5ddbd73 Merge remote-tracking branch 'origin/main' into feat/fg-with-rt
# Conflicts:
#	tests/test_win_launchers.py
2026-12-03 01:14:59 +01:00
092a069579 d3d12 play-nvidia: no automatic frame generation with ray tracing (software or hardware)
The automatic 2x of RTX 40/50 cards (with -Resolution or -Lowest, the Series X default) came along with
-HardwareRT once ray tracing stopped removing frame generation. Turning ray tracing on must not turn frame
generation on: with ray tracing it runs only when asked for (-FrameGen, the F1 menu, LEONIDA_FRAME_GEN). The
dry-run test gains three automatic cases (hardware RT, software RT, none); it fails without the condition.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 01:08:21 +01:00
4f344387b3 d3d12 play-nvidia: frame generation with ray tracing on Series X from 20 GB of video memory, not 12
A player's RTX 5080 (16 GB), Series X, hardware RT, DLSS quality, frame generation 2x with LEONIDA_FG_WITH_RT=1,
7 minutes: frames generated, then about 5 minutes in the process passed the card's budget (13.0 of 12.95 GB, up to
14.2), Streamline reported eWarnOutOfVRAM and frames over 100 ms went from 8-15 to 46-53 a minute. A 3090 reached
18.6 GB on the same profile. 20 GB is just above: 16 GB cards keep it on Series S, and on Series X with
LEONIDA_FG_WITH_RT=1. The dry-run test gains a 24 GB case; 16 GB on Series X is now off (fails at 12 GB).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 00:52:50 +01:00
1b8a69bec2 Merge remote-tracking branch 'origin/main' into feat/fg-with-rt 2026-12-03 00:47:31 +01:00
3dc6c58b3a Merge remote-tracking branch 'origin/main' into fix/menu-restart-keeps-more 2026-12-03 00:28:15 +01:00
81efe45669 Merge pull request #3244 from MoonEyes/fix/issue-3193
leonida-lua: the fake image starts on a page, so a scan below it no longer skips the marker (LEONIDA-LUA-SCAN-END-3193)
2026-12-02 23:05:32 +00:00
ef35d683ea Merge pull request #3178 from KelboLive/bug/shader-emitter-correctness
d3d12-shader: one PSV0 name per element, as the validator regenerates it (SHADER-PSV0-NAMES)
2026-12-02 22:41:08 +00:00
16243cd6eb Merge pull request #2965 from aznohonza/gpu/draw-depth-read
d3d12-gpu: prime a draw's tested depth before its picked textures are read
2026-12-02 22:17:49 +00:00
b83ad54339 Merge pull request #3154 from enlight3d/title-range-reserve
d3d12: hold the title's address range below 2^37 (D3D12-TITLE-RANGE-RESERVE)
2026-12-02 22:17:45 +00:00
3e5887f651 play-nvidia: SAVE AND RESTART keeps the start's -More values
The F1 menu's SAVE AND RESTART starts play-nvidia.ps1 again with LEONIDA_MENU_ARGS, which listed the switches but
not -More. The launcher's frame limit, advanced options and crash tracing, and a LEONIDA_FG_WITH_RT=1 given by hand,
were gone after the restart (with ray tracing on, frame generation was then turned off again).

The table now goes into LEONIDA_MENU_ARGS as a PowerShell literal (the menu runs it with -Command), every quote
doubled. On that restart a value the menu saved for the same setting wins over the replayed -More, since it was
chosen after it; a normal start keeps -More over the menu as before.

Test: tests/test_win_launchers.py test_nvidia_menu_restart_replays_more (dry run, then the replayed command);
it fails without either change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 23:13:29 +01:00
a22fa26d64 leonida-lua: the fake image starts on a page, so a scan below it no longer skips the marker (LEONIDA-LUA-SCAN-END-3193)
a_scan_without_a_size_reaches_the_end_of_the_image failed about one run
in twenty. The fake title image was a plain 4096-byte Vec at whatever
address the allocator gave. A scan whose range is not all readable (the
second scan starts 100 bytes below the image) reads by pages, and a page
only partly inside the buffer is unreadable in the fake, so when the
buffer started within 100 bytes after a page boundary the page holding the
marker was skipped. A real image is whole pages, where that cannot happen.

The fake now keeps its 4096 bytes on a page boundary, and a test pins it.

Also takes the .unwrap() off Runtime::new in the dangling-link test, the
same one-line change as #3237, so the crate's tests build on main.

Fixes #3193

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 23:04:46 +01:00
97eefdee4a d3d12 play-nvidia: say the 12 GB threshold is a guess (review of #3230)
The comment now gives the RTX 3090 24 GB run (frames generated on both profiles, at most 14.4 GB used on
Series X), says 12 GB sits between the 8 GB card that ran out and the 16 GB one that did not, with 10-12 GB
cards untested, and quotes this head's own 300 s run without -More. Comment only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 22:31:03 +01:00
f3865cae87 Merge pull request #2878 from matinsanei/fix/leonida-pe-portable-tests
d3d12-pe: use synthetic PE32+ fixtures in portable image tests (D3D12-PE-PORTABLE-IMAGE-TESTS)
2026-12-02 21:15:06 +00:00
bc20b75ba7 Merge pull request #3179 from eipastel/lua-memory-limit-per-mod
leonida-lua: each mod gets a Lua state of its own, so its memory limit is its own (D3D12-LUA-MEMORY-LIMIT-IS-STATE-WIDE)
2026-12-02 21:15:03 +00:00
372bc71cde Merge pull request #3189 from RussianSanta12/fix/d3d12-lua-write-file-dangling-link
d3d12 lua: a link to nothing is not written through (D3D12-LUA-WRITE-FILE-DANGLING-LINK)
2026-12-02 21:14:55 +00:00
eafa1af149 d3d12 play-nvidia: frame generation with ray tracing, except Series X under 12 GB (D3D12-FG-WITH-RT)
Frame generation (DLSS's, FSR 3's and the automatic 2x on RTX 40/50) was left off whenever ray tracing was on
("0.1 frames a second", a measure of the software walk from before this renderer). It now runs with ray tracing,
software or hardware, except on the Series X profile with under 12 GB of video memory, where it is left off with
a message; unknown video memory does not block. When kept, LEONIDA_FG_WITH_RT=1 is set so the runtime's own guard
(fg.rs) starts it; -More LEONIDA_FG_WITH_RT='1' forces it everywhere, '0' keeps it off.

Measured on an RTX 4070 Laptop 8 GB, main 45dc41f95, 2026-12-02, 240 s walks, one run each:
- Series S, -HardwareRT -FrameGen 2: 21 rendered / 43 shown fps once warm, frames generated, no device lost.
- Series S, -RayTracing -FrameGen 2: 10-11 rendered / 21 shown.
- Series X, -HardwareRT -Dlss quality -FrameGen 2: 5 fps, no generated frame, Streamline eWarnOutOfVRAM.
- A player's 16 GB card, Series X, same switches: no out-of-memory warning, frames generated part of the time.

DryRun checked (settings against origin/main): runs without ray tracing are identical; Series S with RT and
-FrameGen 2 gains LEONIDA_FRAME_GEN=2 and LEONIDA_FG_WITH_RT=1; Series X with RT on this 8 GB card leaves it off
with the message; video memory forced to 16, 12 and 0 GB keeps it, 11 GB leaves it off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 22:01:57 +01:00
8a9235d02f Merge pull request #3210 from ProjectLeonida/t3/series-x-2160-startup
Preserve Windows D3D12 launch failure status
2026-12-02 20:36:50 +00:00
8ca73c4c8c Merge pull request #3102 from kurrutako/docs/water-transmission-findings
docs: findings, the water's tile list and transmission by default (from #2617)
2026-12-02 20:36:20 +00:00
917cb9e323 Report failures through the Series X 2160p preset 2026-12-02 14:23:02 -05:00
7fcf8f6b5b Preserve Windows D3D12 runtime exit status
Keep native status in both log modes and report explicit heights above the console output as failures. Verify both launch entry points with a synthetic Windows executable.
2026-12-02 14:13:40 -05:00
ab3bf6ecee Uncap D3D12 rendering and use measured simulation steps 2026-12-02 14:05:38 -05:00
ab38b0136f Merge branch 'main' of https://github.com/ProjectLeonida/mandy into fix/leonida-pe-portable-tests 2026-12-02 22:21:21 +03:30
2f2f697c0a leonida-lua: keep a mod's state only once it has loaded
A mod that fails to load no longer holds its state (and up to 128 MiB) until the
next reload; the handles it left behind go when the failure switches it off.
(Review of #3179.)
2026-12-02 15:28:39 -03:00
b41763227a Merge pull request #2888 from lixonik/docs/constants-once-findings-switches
d3d12-docs: record LEONIDA_CONSTANTS_ONCE measurements in findings.md
2026-12-02 18:08:47 +00:00
f1a5598515 Merge pull request #3120 from zmasi/docs/d3d12-port-nv-docs-8gb-and-winmem
d3d12/docs: add Windows committed-memory, Series X page-file, and 8 GB GPU guide (PORT-NV-DOCS-8GB-AND-WINMEM)
2026-12-02 18:08:38 +00:00
c182fc3929 d3d12 lua: say which link case reproduces the escape (review)
The junction case pins inside()'s refusal; the file link is the one that
escaped before the fix and runs only where links can be made.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 12:42:42 -05:00
48593f5456 d3d12 lua: a link to nothing is not written through (D3D12-LUA-WRITE-FILE-DANGLING-LINK)
`manifest::inside` checked the deepest part of the path that exists, found
with `Path::exists`. That follows links, so a link inside the mod's folder
whose target is missing counted as absent: the walk went on to the folder
holding it, which is inside, and `leonida.write_file` then made the link's
target, which may be out of the mod's folder.

- The walk now stops at the deepest entry `symlink_metadata` finds, so a
  link counts as there even when its target is missing (also as a folder
  part of the path). Canonicalising a link to nothing fails, and that is
  now a refusal that names the path: "`out.txt` cannot be resolved inside
  the mod's folder (...)".
- Test: a file link to a missing file and a junction (Unix: a folder link)
  to a missing folder; neither write goes through and neither target is
  made. Without the fix the file write returns true and makes outside.txt.
- docs/lua-modding.md: a link that leads to nothing is refused too.

Not reachable from Lua today (no API makes links): hardening.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 12:38:59 -05:00
45dc41f95c Merge pull request #3172 from ProjectLeonida/codex/full-precompile-default
Default to full D3D12 shader and pipeline precompilation
2026-12-02 16:55:29 +00:00
057cc94d8a leonida-lua: Runtime::new cannot fail any more; comments and docs say each mod has its own state 2026-12-02 13:48:13 -03:00
2d2ae41b9d leonida-lua: each mod gets a Lua state of its own, so its memory limit is its own (D3D12-LUA-MEMORY-LIMIT-IS-STATE-WIDE)
One Lua state held every mod, so the 128 MiB limit was one budget for all
of them: a mod holding memory made another's ordinary allocation fail, and
collectgarbage("count") reported the other mods' memory too. Each mod now
loads into its own state (one shared time guard, since one call runs at a
time), with the same 128 MiB limit.
2026-12-02 13:43:28 -03:00
6641b9945c d3d12-shader: one PSV0 name per element, as the validator regenerates it (SHADER-PSV0-NAMES)
`psv()` wrote the PSV0 string table with one copy of a semantic name for
all elements that shared it. The DXIL validator rebuilds PSV0 from the
module and compares the parts for container layouts before 1.8, and that
table holds a copy per element: a repeated arbitrary semantic (two
TEXCOORDs, two clip distances) left the later element with an offset the
regenerated table does not contain, so the program was refused with
"Container part 'Pipeline State Validation' does not match expected for
module".

Write one copy per arbitrary element in element order, as DXC does;
system values keep the empty name at offset 0. The regression test parses
the emitted part and fails on the shared offset. On main the rectangle
geometry-stage validator test is red with dxil.dll 1.7.2308; with this
change the full crate suite is 429 passed, 0 failed, 6 ignored (without
and with LEONIDA_DXIL pointing at 1.7.2308), and
`cargo check --workspace --all-targets --locked` passes.

No game data, no GPU.
2026-12-02 11:42:37 -05:00
0413012fac Explain host memory use during full pipeline warm-up 2026-12-02 11:31:59 -05:00
e71aa0ef15 Default to full D3D12 shader and pipeline precompilation 2026-12-02 11:17:09 -05:00
5b1fff821c Merge pull request #3097 from OreoFR/feat/compare-on-sender
d3d12 host: the compare of a submission sent ahead recorded by the sender (D3D12-COMPARE-ON-SENDER)
2026-12-02 16:08:20 +00:00
db911e3e47 Merge pull request #3062 from OreoFR/feat/fg-limit-follows-rate
d3d12 fg: the frame limit follows the rendered rate, LEONIDA_FG_LIMIT_FPS=auto (D3D12-FG-LIMIT-FOLLOWS-RATE)
2026-12-02 16:08:14 +00:00