describe_exit labeled every code >= 0xC0000000 "the process crashed", but a
process can exit with any 32-bit value on purpose, so the range alone doesn't
show a crash. Only the NTSTATUS values in NTSTATUS_CRASHES (access violation,
illegal instruction, out of memory, stack overflow, heap corruption, fail
fast) get the crash label now. Ctrl+C (0xC000013A) is still named but not
called a crash, and any other value is just "exit code 0x...".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A failed module was printed as "==== FAILED: <name>" and its output, never its
exit code. A module whose interpreter crashes prints nothing, so it left a bare
header with nothing under it, and the run gave no clue why it failed.
The header now carries the exit code: "exit code 1" for a test failure, the
signal for a POSIX kill ("killed by SIGSEGV (-11)"), and the hexadecimal
NTSTATUS with its meaning for a Windows crash ("exit code 0xC0000005, access
violation (the process crashed)"). A module that printed nothing also gets a
"(no output: the process ended before printing anything)" line.
Only the FAILED print in main() changes; run_module is untouched.
Tests (tests/test_run_semantic_tests.py): the header of a plain failure, a
module that really crashes (SIGSEGV on POSIX, exit code 0xC0000005 on
Windows) and describe_exit itself.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings the D3D12 runtime branch (d3d12/, its launcher scripts and notes, and the pull requests reviewed and applied
on it) together with mandy's main.
Conflicts (67 files, none under d3d12/): docs/, make_game.py, runtime/, scripts/build_runtime.ps1, tests/ and
tools/. Every one takes main's side: main is where that code is maintained, and this branch's copies were older
states of the same files or the same pull requests in another form. tests/test_fspx_unpack.py is main's too, as it
tests main's tools/fspx_unpack.py. Nothing under d3d12/ is changed by the merge.
Checked before pushing: python -m compileall over make_game.py, tools and tests; make_game.py --help;
scripts/check_no_game_data.py over the files this adds to main; tests/test_text_write_line_endings.py. The
translator suite, the C++ runtime build and CI have not run on the result.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Verified the Windows check with Python 3.12: 509 standalone files passed with two workers. The seven changed or runner-related files passed on updated main. The .NET 8 build and diagnostics and the native BCPack checks passed with the prerequisite fixes, including #1771. CPU-only, AI-assisted testing.
The seed was kept when LEONIDA_PIPELINE_CACHE_DIR named the precompiled folder under another spelling (a
junction, or the \\.\ device prefix), although the runtime's std::filesystem checks see one folder and turn
the journal off. Ask Windows for each folder's final path (GetFinalPathNameByHandle, from the deepest
existing parent), which sees through junctions, symbolic links, substituted and mapped drives, 8.3 names and
the \\?\ and \\.\ prefixes; the spelled paths remain the fallback when the helper is not available.
Reported by TheGeogeo's agent (repro on #2481); the approach was suggested by OreoFR's agent. The test file
gains the \\.\ and junction cases.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scripts\play-d3d12.ps1 and d3d12\scripts\play-nvidia.ps1:
-Dlss quality|balanced|performance|ultra DLSS makes the output from 2/3,
0.6, 1/2 or 1/3 of its lines (Series X: 1440, 1296, 1080, 720)
-FrameGen 2..6 DLSS frame generation
-Aspect 21:9|32:9|W:H|auto, -PresentScale fit|stretch the window's shape
-DryRun the settings a start would run with, and nothing started
With none of them a start sets what it set before (Series X: 1440 lines and
the title's own upscaler).
On Series X the launcher puts the pieces together after the F1 menu's saved
choices are read: DLSS or the stretch there means LEONIDA_FSR_UPSCALER=1 and no
LEONIDA_OWN_UPSCALER, with render scale 2/3 unless one is set; frame generation
there turns DLSS on (or is left off without DLSS's files), since its depth and
motion vectors come from that upscale. A menu choice of DLSS without the files
falls back to the title's own upscaler on Series X.
F1 menu: RENDER SCALE names the DLSS modes, UPSCALER's last value is the
game's own on either console, and WINDOW SHAPE and PICTURE IN ANOTHER SHAPE
(live) are new.
The script's own $dlss is now $dlssOn: PowerShell does not tell it from the
-Dlss parameter. Checked with -DryRun over the parameter and menu
combinations; not run in the game.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
leonida_sm.exe started by default ended 2.4 s in with 0x80000003 from the title's main loop; the
next start, of leonida.exe, ran. One start each: not looked into yet, so it is not the default.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The user's call (2026-11-27): generated frames to play with while the rendered rate is under 30.
The driver's profile for leonida_sm.exe was on already; the launcher now starts that copy unless
-NoSmoothMotion is given (measurements are made with it). The rendered rate is what the window
title and the log give.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
boot.ps1 points the runtime at <OutDir>\pipeline-cache, so a boot never read the journal that
gta6rt --precompile-pipelines writes beside gta6rt.exe and compiled those pipelines again. When
pipeline_cache.d exists there, neither the shell nor -SetEnv/KEY= set LEONIDA_PIPELINE_JOURNAL_SEED_DIR,
and the boot's own journal is a different folder (the runtime turns the journal off for a seed that
overlaps its writable journal), pass it as the read-only seed and list it in the [boot] env lines.
tests/test_windows_boot_journal_seed.py runs boot.ps1 -DryRun against a temporary runtime folder
(Windows only; nothing is launched, no game files).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cs_pk_mul_lo_const runs 32 lanes that each store 16 bytes, 128 words, but
run_gpu_tests.py and check.py ran it without VKC_OUT_WORDS, so
vk_compute_test gave it the default 64 and lanes 16-31 wrote past the
buffer through its device address (GPU-AV:
VUID-RuntimeSpirv-PhysicalStorageBuffer64-11819). Both runners now pass
VKC_OUT_WORDS=128 (check.PK_MUL_LO_ENV), and the fixture's Run line
says so.
run_gpu_tests.py's dump rows (the bounds group, cs_heap_init,
cs_user_sgprs) showed the printed words whenever there were any. A run
that printed the right words and then exited non-zero (validation
errors) was a FAIL that showed only the expected words. dump_result now
reports "exit N: <output>" for a non-zero exit.
Found by kevincommits in the coordination issue (#1608).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ms_w64x_wave_loops: each wave loops while a wave-wide count is not 0, 5 iterations in wave 0 and 9 in
wave 1, so under --wave64-emulate the waves reach different numbers of workgroup barriers. Written after
stalls were reported with the serial form on an RTX 2070 SUPER (issue 1608). On an RTX 4080 (NVIDIA
621.24) it draws 4096/4096 pixels exact side by side and in series; that does not explain the stalls.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
tests/test_mesh_serial_waves.py: the module shape of a program that
qualifies (64 invocations, the pass loop, the index from the built-in,
the exchange's own place, per-pass copies of the exports, one
OpSetMeshOutputsEXT), that every initialised Function variable is set
again per pass, and that ms_wave_info_s3 (LDS), a 32-thread program,
native wave64 and --mesh-compute are unchanged by the flag.
LEONIDA_MESH_SERIAL_WAVES=1 is read by scripts/run_gpu_tests.py, like the
other translation switches, and no longer by rdna2spirv.py itself.
docs/design.md and docs/testing.md say what the flag does and how it is
tested; conftest gives ms_w64x_wave_votes its 128-vertex PSV0.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
ms_w64x_wave_votes: two waves take different branches, each with its own
ballot count (and a v_readfirstlane in the second), and the triangle's
vertices come from threads 0 and 1 of the first wave and thread 64 of the
second, so ms_tri's picture needs both waves to have run their own branch
with their own votes. It passes in the side-by-side form and with
--mesh-serial-waves on an RTX 4080 (NVIDIA 621.24).
A program with a store or an atomic to memory keeps the side-by-side
form, as one with LDS does: its waves could pass each other something.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Launcher (d3d12/scripts/play-nvidia.ps1, passed through by scripts/play-d3d12.ps1;
-NoPrecompile skips it): before the title starts, `leonida shaders` translates
every shader of the title's shader archive into the cache with the settings of
that start, and `leonida warm --used` makes the host pipelines earlier runs
drew with, in processes of their own. Runs write the title's pipelines down for
it (LEONIDA_PIPELINE_BOOK=1). Until now the first load of the world after a
change of the translator ran at 0.2 fps for a minute and came up half drawn
while 2,000 shaders were translated and their pipelines made. Measured here
(Ryzen 5 7600X, the machine busy with other builds): 25,663 shaders in 109 s,
226 of them with no translation (195 containers without a program, 26 wave64
programs without a 32-lane form, 5 others); 1,891 pipelines in about 150 s. A
second start finds them in the cache. The commands' log is kept quiet for the
step instead of redirected: Windows PowerShell 5.1 turns a native command's
redirected error stream into errors.
ambient.rs: LEONIDA_REFLECT_MOST is off unless set. On the renderer merged at
00698e1e8 the guard made the whole picture posterized and grey, sky and skin in
a few flat tones (run n2: all 411 recorded frames; with it off, run n3: none of
431). The program it follows is not only the reflections' there.
Cargo.toml: profile `play` (the diag build with thin LTO and one code
generation unit), to be measured against diag.
README: the table of Leonida's fixes follows the merged renderer (DLSS in place
of -Resolution native, LEONIDA_SHARPEN gone with the compose pass it lived in),
and a section on the precompile.
AI-assisted.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Upstream's four commits past 6a31e43 (5b36758, 9e7ab9d, 6395727, b190242;
GPL-3.0), brought in as a three-way merge: upstream's trees before and after
written under Leonida's names (crates leonida-*, LEONIDA_* settings) and the
difference merged onto Leonida's own changes. What comes with it, by its
authors:
- the renderer of codec-d/cool_fox f4b48ad (CGBJ) with trustno1-coder's NVIDIA
fixes on top (residency.rs, stretch.rs, the title's upscale dispatch);
- DLSS for the title's upscale, from avatarmanz/VIctory-7900XTX pull request
203 (feature dlss, LEONIDA_UPSCALE=dlss): the game renders its own 720p and
DLSS takes it to 1080p on the Series S profile;
- DLSS frame generation through NVIDIA Streamline (streamline.rs, fg.rs), an
F1 settings menu (host/menu.rs), LEONIDA_FPS_CAP, real ray tracing as an
option (LEONIDA_BVH_BUILDER=1: the structure builder runs on NVIDIA).
NVIDIA's own files (DLSS, Streamline) are not part of the repository:
d3d12/Get-NVIDIA-DLSS.cmd fetches them from NVIDIA's GitHub into
d3d12/nvidia-sdk/ (git-ignored).
Where both sides had changed the same lines:
- compose.rs is upstream's (planes drawn by a pixel shader into the back
buffer); Leonida's LEONIDA_SHARPEN lived in the compute pass it replaces
and is not in this commit (DLSS has its own sharpness setting).
- draw.rs keeps Leonida's slow-beat texture re-check (300 frames by default);
upstream's switch of the same name is dropped.
- ambient.rs keeps LEONIDA_AMBIENT_MOST and the reflection guard.
- play-nvidia.ps1 is upstream's with Leonida's defaults put back while rays
are off: strict indirect batches (INDIRECT_BATCH=1), the light stand-in
(AMBIENT=0.8, AMBIENT_MOST=2), ray walks ended at the root and the
ray-resolve skip list. With upstream's defaults (stand-in off, no skip
list) shade was black and the sky white in the world, and the card worked
33-50 ms a frame (run n1).
- scripts/play-d3d12.ps1 follows the new launcher: DLSS by default, a shader
cache of its own (cache-2), -NoDlss, -RayTracing, -Capture, -Log.
Builds with and without the dlss feature (cargo build --profile diag
-p leonida --features diagnostics[,dlss]). In the world on an RTX 4060 Ti 16 GB
(driver as installed) and a Ryzen 5 7600X: DLSS starts (1280x720 to
1920x1080), about 14 fps where it was 13.4. The picture is not right yet: a
posterized look in run n2 is being traced. AI-assisted.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The driver shows twice the frames the game renders on RTX 40/50 cards. The
script writes one per-application setting in the driver's profile store
through NVAPI (query, on, off); the setting's ID was found by
lepotane/VIctory-leonida (GPL-3.0).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Measured on an RTX 4060 Ti, Series S profile, the user's save: 11.8 fps without
-Quality (8.3 with it); skin and bodies stayed right in every burst frame.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- play-d3d12.ps1 / play-nvidia.ps1: -Resolution native renders at the title's
own 1920x1080 on Series S with neither title patch. A pinned render scale of
1 with the own upscaler forced stopped the title in its init (frame 0, twice).
- compose.rs: LEONIDA_SHARPEN (0.4) sharpens the game plane before the
interface goes over it, kept inside each pixel's neighbourhood (no halos).
- watch.rs: LEONIDA_PAGE_WRITES defaults to bits 1, 2 and 8: textures picked by
index that were uploaded before DirectStorage or a plain read filled them are
uploaded again (fxceless/victory-fork e4245f3: black faces and skin).
- draw.rs: LEONIDA_HEAP_RECHECK_EVERY (300 frames) keeps looking at uploaded
textures picked by index after the fixed schedule (fxceless, after RyanCase94).
- lower.rs: v_mac_legacy_f32 / v_mad_legacy_f32 fused with flushed sources as
RDNA 2 runs them (fxceless f6a09d3); new GPU test passes on hardware and WARP.
- ambient.rs: a reflection guard after CS_UpdateHistory (LEONIDA_REFLECT_MOST,
3) caps reflections at a multiple of the room's light and pulls colour spikes
to grey; the view's place from lepotane/VIctory-leonida.
Translator arithmetic and differential tests: 52 passed, 0 failed (RTX 4060 Ti).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
What changed:
- victory/ is now d3d12/;
- its crates are leonida-* (leonida_* code paths);
- the program is leonida.exe;
- settings are LEONIDA_*, and the older VICTORY_* names still work through apps/leonida/src/leonida.rs;
- the config file is leonida.toml;
- log names and user-facing text say Leonida.
What did not change: lines that credit upstream projects or people, URLs, copyright notices and the
GPL-3.0 LICENSE. d3d12/README.md opens with a Leonida section that says the runtime grew from
Marvisak/VIctory through trustno1-coder/VIctory-NVIDIA. The rest of that README is labelled as
trustno1-coder's.
The launchers (scripts/play-d3d12.ps1, scripts/play-linux.sh), docs/linux.md and
scripts/sync_victory.py (prefix d3d12) follow the move. Future upstream merges will need a
mapping from upstream's names onto these.
Builds with `cargo build --profile diag -p leonida --features diagnostics`. The settings alias
tests pass.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
victory/ builds as leonida.exe ([[bin]] in apps/victory; the package keeps VIctory's name so upstream merges and cargo -p victory still work), the window caption reads Leonida, and the launchers (victory/scripts/play-nvidia.ps1 and play.ps1, scripts/play-d3d12.ps1, scripts/play-linux.sh) start leonida.exe; the Smooth Motion copy is leonida_sm.exe. VICTORY_* settings are unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A wrapper over victory/scripts/play-nvidia.ps1: it builds victory/ (diag) when missing, keeps caches and saves under %LOCALAPPDATA%\Leonida\d3d12, and passes -SeriesX, -Quality, -Resolution, -Adapter and -More through. The Vulkan renderer stays scripts/play.ps1.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On Linux the D3D12 runtime (victory/) runs under Wine. Its Direct3D 12 now comes in the package, so
players download nothing else for D3D12.
- scripts/fetch_vkd3d_proton.py puts VKD3D-Proton 3.1's unmodified 64-bit d3d12.dll and
d3d12core.dll in the package. It also adds the LGPL-2.1 text and notice from the v3.1 tag and a
note on where the source is. Every download is checked against a pinned SHA-256. Standard
library only; Python 3.14 for compression.zstd.
- scripts/play-linux.sh installs the bundled DLLs into Leonida's own Wine prefix (no other prefix is
touched) and sets WINEDLLOVERRIDES=d3d12,d3d12core=n. It runs the runtime with the measured
NVIDIA defaults of play-nvidia.ps1.
- docs/linux.md describes the package and what is still untested: the launcher is syntax-checked
only; it has not run on a Linux machine yet.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The script, added in #2350 after this PR was opened, also defaulted --llvm-mc
to os.environ.get("LLVM_MC", "llvm-mc") and checked that name with
shutil.which, so with only Ubuntu's llvm-21 it skipped (exit 77). It now asks
mc_command.mc_command() like run_gpu_tests.py, and the guard test added here
passes on main again.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RAL8MMXUuNpQAVa1iiyAMP
run_gpu_tests.py and bench_wave64.py defaulted --llvm-mc to
os.environ.get("LLVM_MC", "llvm-mc"), so mc_command() never reached
versioned_llvm_mc(). With only Ubuntu's llvm-21 installed (llvm-mc-21 and
/usr/lib/llvm-21/bin/llvm-mc, no plain llvm-mc) the suite stopped with the
message that says that install is found without further setup. Leave the
default to mc_command(), and add a test that no tool pins the plain name.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RAL8MMXUuNpQAVa1iiyAMP
- LEONIDA_ASPECT (21:9, 32:9, 43:18, any W:H or ratio from 1 to 4, or auto) widens the display mode
the runtime reports to the title, at the same height, and widens the title's window.
- LEONIDA_PRESENT_SCALE=fit|stretch: fit keeps the frame's shape, centred with black bars. It is
the default when LEONIDA_ASPECT is set; stretch, the old behaviour, is the default otherwise.
- The aspect math is in src/aspect_fit.h, with aspect_fit_test.
- docs/ultrawide.md describes how resolution flows from window to title to present, and what
needs the game running: whether the title renders wider at all, its FOV and its HUD.
- play.ps1 gets -Aspect and -PresentScale.
Built; aspect_fit_test passes. The bars have not been checked on screen.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>