Commit Graph

15191 Commits

Author SHA1 Message Date
a785e00109 docs: distinguish experimental runtime results from playable status 2026-11-28 03:56:07 -03:00
535ebd9d71 docs: propose README runtime and launcher clarification
Reapply the documentation proposal from #2562 on a separate branch with a neutral project introduction.
2026-11-28 03:46:31 -03:00
09c1539483 Revert README runtime status and launcher rewrite
This reverts the README-only changes from PR #2562 (merge 6dfca64280) and restores the previous README.
2026-11-28 03:43:26 -03:00
6dfca64280 Merge pull request #2562 from ProjectLeonida/docs/readme-two-runtimes-clarity
docs(README): clarify playable D3D12 vs Vulkan runtime status and launcher flow (DOC-README-TWO-RUNTIMES)
2026-11-28 02:31:04 -03:00
ecabb41205 docs(README): clarify playable D3D12 vs Vulkan runtime status and launcher flow (DOC-README-TWO-RUNTIMES) 2026-11-28 02:22:10 -03:00
8994000b08 Merge pull request #2561 from ProjectLeonida/docs/pt-br-quickstart-update
docs(i18n/pt-BR): sync quickstart to b1619e0a (DOC-PTBR-QUICKSTART-SYNC)
2026-11-28 02:13:20 -03:00
37c6c2aa27 docs(i18n/pt-BR): sync quickstart to b1619e0a (DOC-PTBR-QUICKSTART-SYNC) 2026-11-28 01:59:07 -03:00
b1619e0a30 Merge pull request #2559 from OreoFR/fix/clwb-patch-race
cpu_emulation: CLWB rewrite in place without the race between threads (follow-up of #1472)
2026-11-28 05:43:30 +01:00
5d677b7ba2 cpu_emulation: a CLWB #UD on a site another thread rewrote continues at it (RT-CLWB-PATCH)
Threads that fault on the same CLWB site together lost the race: a #UD handled
after another thread rewrote the site decoded CLFLUSHOPT (or the NOP), did not
know it and returned EXCEPTION_CONTINUE_SEARCH, which ends the title.

- The handler continues at a site that already holds the form written on this
  host (or the NOP's halfway state): the CPU runs it.
- One lock around unprotect, re-check, write and protect again, so two threads
  never interleave on a page; a site found rewritten under it is not written.
- The NOP is written opcode first (66 0F 1F /6 in between is a NOP too).
- The sites counter counts each site once, by the thread that wrote it.

cpu_emulation_test calls the handler with a made-up #UD, so it runs on hosts
with CLWB: first #UD, a second one on the rewritten site, and 16 threads on
2048 fresh execute-read sites. Before the fix 27958 of 32768 concurrent #UDs
were passed on, 4810 rewrites were counted for 2048 sites and pages were left
writable; with it all checks pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 05:28:00 +01:00
63a73515d1 Merge remote-tracking branch 'origin/main' into fix/clwb-patch-race 2026-11-28 05:22:21 +01:00
ef8fbf09f3 Merge pull request #1718 from Tauwni/gpu-results-m3
gpu-test-results: Apple M3 on MoltenVK 1.4.2 (macOS 26.5.1) at 626d1281a (GPU-M3)
2026-11-28 05:21:52 +01:00
0c5cc28e82 Merge pull request #1826 from Ch1mpleo/carry/old-9791
docs/gpu_test_results.md: record NVIDIA GeForce RTX 5060 Ti (Windows 11, 610.88) results (OLD-9791)
2026-11-28 05:21:36 +01:00
6184e43bd1 Merge pull request #1870 from Anzymanz/gpu-rx9070xt-radv
gpu-test-results: RX 9070 XT on RADV (Mesa 26.2.6, CachyOS) at main 5e95fa2 (GPU-RX9070XT-RADV)
2026-11-28 05:21:26 +01:00
a51bffa621 Merge pull request #2172 from ammonium231/gpu-results-rtx3090-win
gpu results: RTX 3090 (Windows, 621.40)
2026-11-28 05:21:16 +01:00
ec44050661 Merge pull request #2353 from budanga/gpu/rx9060xt-win
gpu-test-results: RX 9060 XT (AMD 26.11.2, Windows 11) at 73516a29 (GPU-RX9060XT-WIN)
2026-11-28 05:21:05 +01:00
9b23d15f74 Merge pull request #532 from ethanweave/gpu-results/rtx4050
GPU test result: RTX 4050 Laptop on Windows 11
2026-11-28 05:20:56 +01:00
ec38abea07 Merge pull request #1130 from MalexAson/results/gpu-irisxe-win
gpu-test-results: Intel Iris Xe (Raptor Lake-P, Windows 11, Intel 101.7092) on main 3aa97542 (GPU-IRISXE-WIN)
2026-11-28 05:20:46 +01:00
43491228e7 Merge pull request #1902 from efeekrb/gpu-rtx4060-laptop-win
gpu-test-results: RTX 4060 Laptop (NVIDIA 610.78, Windows 11) full suite at 24a29f8 (GPU-RTX4060-LAPTOP-WIN)
2026-11-28 05:20:36 +01:00
f1e31e0698 Merge pull request #1968 from AkiraKill333/gpu-test-results-windows
Add GPU test results for RTX 3050 6GB on Windows 11 (driver 621.14)
2026-11-28 05:20:21 +01:00
f73693b276 Merge pull request #2068 from KushGene/gpu-rx6700xt-radv
gpu-test-results: RX 6700 XT on RADV (Mesa 26.2.7, Fedora 45) (GPU-RX6700XT-RADV)
2026-11-28 05:20:11 +01:00
c78db9cae7 Merge pull request #2204 from JoeY54/results/pr1608-win11-dual-gpu
gpu-test-results: Radeon 860M and RTX 5060 Laptop, native Windows 11 (#1608)
2026-11-28 05:20:02 +01:00
04506db163 Merge pull request #2207 from sdelectron/gpu-test-results/rtx5080
gpu-test-results: RTX 5080 on Nobara Linux
2026-11-28 05:19:52 +01:00
3f4682948b Merge pull request #2348 from real-rusher/gpu-rtxpro3000-arl-windows
gpu-test-results: RTX PRO 3000 Blackwell Laptop and Arrow Lake iGPU, Windows 10 (GPU-RTXPRO3000-ARL-WIN)
2026-11-28 05:19:48 +01:00
b1f7f3de7c Merge pull request #2558 from RenoThaGutta/codex/rtx4080-validation-report
gpu-test-results: validate RTX 4080 on NVIDIA 621.01 (GPU-RTX4080-62101-02F71CCF)
2026-11-28 05:19:12 +01:00
f77359c5b4 Merge pull request #1565 from Mike7581/rt-compat-dir-runtime-loads
loader: a run-time LoadLibrary takes the LEONIDA_COMPAT_DIR module too (RT-COMPAT-DIR-RUNTIME-LOADS)
2026-11-28 00:48:31 -03:00
477f56cc1a Merge pull request #1564 from Mike7581/rt-crt-quick-exit-tls
process: the game's at_quick_exit handlers and thread-local exit callback are the run's own (RT-CRT-QUICK-EXIT-TLS)
2026-11-28 00:48:27 -03:00
725d223757 Merge pull request #1549 from Mike7581/mvp-gpu-04-stub-pipeline
d3d12: LEONIDA_STUB_PIPELINES builds a real graphics pipeline from built-in stages (MVP-GPU-04)
2026-11-28 00:48:22 -03:00
5651950adb Merge pull request #1517 from Mike7581/docs/runtime-readme-shims
runtime/README: AcpHal, chad, xapu and XCRDAPI have shims; DStorage decodes BCPack (DOC-RUNTIME-README-SHIMS)
2026-11-28 00:48:18 -03:00
92f4941f85 gpu-test-results: validate RTX 4080 on NVIDIA 621.01 (GPU-RTX4080-62101-02F71CCF)
Record independent synthetic GPU validation at baseline 02f71ccf and with existing PRs #1518 and #2261. Includes before/after counts, focused controls, exact source heads, and coverage limits. One report file only; no performance benchmark or game data.
2026-11-27 21:36:51 -06:00
9547582ffd Merge remote-tracking branch 'origin/main' into gpu-results-m3 2026-11-28 03:59:20 +01:00
02f71ccfe7 Remove CA line from README
Removed the CA line from the README.
2026-11-27 21:29:25 -05:00
1a441d336f Update README.md 2026-11-27 20:51:48 -05:00
431ceba4f4 README: which commit the D3D12 measurements are of, and what main itself measured
The 12 to 13 frames a second were measured on the working branch, with a fix for waits on the card that is not on
main yet. The status now says so, and gives what main measured at the same place that day (about 10, median frame
about 102 ms), so that the figure on main is not one main cannot reproduce.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-27 19:21:38 -05:00
1cd00843d8 README: the status says first what plays: the D3D12 runtime, in the world, at a low frame rate
The status section and the platforms table opened with "Nothing is playable yet", which is true of the recompiled
runtime with the Vulkan layer and not of the Direct3D 12 runtime in d3d12/, where a save loads into the open world
and the game is played from there with the HUD, the map, the weapon wheel and the pause menu (measured 2026-11-27:
12 to 13 frames a second on a Ryzen 5 7600X and an RTX 4060 Ti, Series X profile, 2560x1440). The two runtimes are
now told apart at the top, and the measurements say what is played with.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-27 19:20:12 -05:00
161f4e0680 README: the clone address is this repository's; what the D3D12 runtime does on the maintainer's PC
The download step still named the repository's old address (ubiquitarianism/leonida), which trackers list as a
copy. The status section said nothing of the second runtime: it now has this project's own measurements of
2026-11-27 (Ryzen 5 7600X, RTX 4060 Ti 16 GB, Series X profile, 2560x1440: a save loads into the world, 12 to 13
frames a second at the save point, what is known to be wrong, what was not measured).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-27 19:20:12 -05:00
d442851972 Merge remote-tracking branch 'mandy/main' into merge/mandy-main 2026-11-27 17:58:49 -05:00
00131bb85e main keeps its own runtime, tools and tests; the branch's variants stay on port/d3d12-nvidia
After the merge the tree held this branch's older states of files main maintains. Run against main's code,
tests/test_acphal_abi.py and 11 of the 15 translator tests that differed failed, and the C++ runtime would have
been built from two generations of its sources. So that the merge cannot break what main builds and tests:

- runtime/ is main's, file for file (68 files only this branch had are not carried over);
- every file under tools/, tests/ and docs/ that both sides have is main's (80 files);
- ten translator tests only this branch has, which test rules main's translator does not have, and their
  fixtures are left out.

What main gains: d3d12/ (the Rust D3D12 runtime), its launchers and helpers (Launcher.bat, scripts/play*.ps1,
play-linux.sh, port_ctl.py, smooth-motion.ps1, fetch_vkd3d_proton.py, sync_victory.py), mods/example_lua, eleven
notes under docs/, seven tools and the tests that pass with main's code, the README's sections and credits, and
the "Runtime traps" section of AGENTS.md. Everything left out here is on the branch port/d3d12-nvidia.

Checked: compileall; make_game.py --help; check_no_game_data.py over every file this adds to main; the
line-ending, docs-encoding, CI-registration and docs tests; each test file that differs from main, on its own.
Not run: the whole translator suite, the C++ build, cargo over d3d12/ after the merge (d3d12/ is byte for byte the
branch's), CI.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-27 17:58:38 -05:00
587bb6f5ac Merge pull request #2447 from DadaCap/w64-one-lane-fold
wave64_emulate_opt: fold a region at most one lane of the wave runs (SHADER-W64-ONE-LANE-FOLD)
2026-11-27 23:51:05 +01:00
eac96d744c Merge branch 'port/d3d12-nvidia' into merge/mandy-main 2026-11-27 17:50:38 -05:00
b87abdef57 Merge mandy's main into port/d3d12-nvidia
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>
2026-11-27 17:50:37 -05:00
3e4d890c56 Merge pull request #2435 from quartz-heron-58/mesh-serial-waves
rdna2spirv: --mesh-serial-waves, an emulated mesh program's waves one after the other (SHADER-W64-MESH-SERIAL-WAVES)
2026-11-27 23:50:27 +01:00
ee215edf9f Merge branch 'port/aki' into port/d3d12-nvidia
What was taken from aki-gta6/aki-runtime (Aki-Developer, GPL-3.0): the frame line's reasons for dropped draws,
descriptor tables' slots given back as soon as the card has run a flight, four small faults (a pipeline build that
panics, a stale texture read-back, a fence of a removed device, tables of split submissions), the two-plane
composer's NaN and 10-bit output, a pipeline's skip-list answer kept, and in the translator the pixel colours held
to the console's HDR range and LEONIDA_PAIRED_LANES=exact.

Conflicts: draw.rs takes host::table_slots at its three places; host.rs keeps both sides, and table_slots ends in
wait_for_slots (8cc5193ec) instead of settling at once, so LEONIDA_DYNAMIC_WAIT=1 and its counts still apply.
TablesHeld's maps take the state's hasher.

Checked: cargo check --profile diag -p leonida --features diagnostics,mimalloc. Not run in the game yet.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-27 17:13:24 -05:00
1411b6ca38 Shader translator: pixel colours held to the console's HDR range; LEONIDA_PAIRED_LANES=exact tries the paired form before anything approximate
Every translator change taken from aki-runtime is in this one commit: the
translator's source is part of the shader cache key, so every shader is
translated again once after it (the launcher's precompile does it at the
next start: minutes).

1. Pixel colour outputs held to [-65024, 65024] (emit/lower.rs clamp_hdr;
   LEONIDA_HDR_CLAMP=0: written as they are, as before). The title renders
   light into R9G9B9E5 targets, which clamp at 65408 on the console; the
   host stand-in is a 16-bit float target, where a value past 65504 is
   stored as infinity, and the title's tonemap makes black of it (the black
   sun, black glitter on water and bright sky, in aki-runtime's runs).
   LEONIDA_NAN_SCRUB already held an infinity the program computed; a
   finite value too large for the target was still stored as one. A NaN
   becomes the maximum, unless LEONIDA_NAN_SCRUB made it 0 first (the
   launcher's setting). On by default, as there. Only colour targets, not
   depth; the view's format is not known to the translation, so a 32-bit
   float colour target is held too.
   From aki-gta6/aki-runtime 01f6f31.

2. LEONIDA_PAIRED_LANES=exact (emit/mod.rs): once the forms that are exact
   without a group barrier have refused a console wave64 compute program,
   the paired form is tried, before the exact forms that cost barriers and
   before each host half-wave is given results of its own ("local waves
   (APPROXIMATE)"). aki-runtime fe9c736 does this by default (about 30 of
   the title's programs take the paired form there on a 32-lane card);
   here the paired form is asked only where the wave-wide form would be,
   so those programs run approximately. The new test shows one: a console
   wave's OR inside a lane branch is by default an OR of each half.
   Opt-in, not the default: this tree's paired form of the water programs
   still draws blocks, it takes 32-bit float sums in the host's order
   where theirs refuses them unless told the guest mode, and none of it has
   run in the game. Not counted over the title's shaders here.

Already here from their paired work: a reduction's unseen partial sums
stand as zero (59e298a: paired.rs unseen_after, from Vice-Tay 5e588e8), the
rules of what the form takes (spilled programs, groups that fill their
waves, the LDS operations, the group rendezvous), the FP64 constant sums.
Not taken: their replay of FP32 reductions in the console's order
(paired_fp32.rs; needs AKI_WAVE_PAIRS_FP32 there and their notes say the
water's blocks are the same with it).

Files: leonida-shader/src/emit/lower.rs, mod.rs, paired_tests.rs,
wave64_tests.rs (a fixture made visible to paired_tests).
Tests: emit::barycentric_tests::a_pixel_colour_output_is_held_to_the_consoles_hdr_range,
emit::paired_tests::the_paired_form_before_the_approximate_ones_when_asked,
the_switch_reads_its_modes. The translator's suite on the card was not run
(the game was running), apart from the 14 tests of barycentric_tests.

From aki-gta6/aki-runtime 01f6f31 and fe9c736 (Aki-Developer), GPL-3.0.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-27 17:09:21 -05:00
bbbdf1f383 README: the list of what was taken from aki-runtime
The credit line names each thing ported from aki-gta6/aki-runtime (Aki-Developer, GPL-3.0); the commits carry the
hashes.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-27 17:09:19 -05:00
84e728faff Merge branch 'port/mandy-prs' into port/d3d12-nvidia 2026-11-27 17:06:33 -05:00
d56ce02d21 NVIDIA launcher: the title's UI and fullscreen resolution follow LEONIDA_OUTPUT
With the output at 2560x1440 the title's settings.xml still said 0x0 for its UI (as the console: 3840x2160)
and the weapon wheel and menus came out half again too big. The launcher writes the output size into
uiResolution and resolutionFullscreen before the start (the first file is kept as settings.xml.original).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-27 17:03:48 -05:00
4688b03da3 A pipeline keeps its skip-list answer (LEONIDA_SKIP_KEPT=0: looked up at every draw, as before)
Every draw, dispatch and indirect execution asks whether the skip list (LEONIDA_SKIP_PIPELINES; the launcher puts the
seven water programs on it) leaves its pipeline out, on the threads that record lists, and each ask hashed the hash
string of every shader of the pipeline and looked it up. The list is read once and a pipeline's shaders do not
change, so the pipeline keeps the answer in a byte (pipeline.rs kept_answer): about 9,500 draws a frame ask with
one load each. Diagnostics builds only, as the skip list is (they are the builds played).

Not taken from the same commit: its tune.rs (numeric switches of the copy path read again from a file while the
title runs). Leonida's switches made with toggled! are flipped while it runs through LEONIDA_AB, and the F1 menu
holds the rest.

Files: pipeline.rs. Test: pipeline::kept_tests::an_answer_is_asked_for_once_and_kept. Not run in the game yet, and
its share of a frame is not measured.

From aki-gta6/aki-runtime f8cdc2d (Aki-Developer), GPL-3.0.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-27 17:03:15 -05:00
36ac0f4631 Two planes are composed into 10 bits a channel while Streamline presents (LEONIDA_PRESENT_10BIT=0: 8, as before)
DLSS frame generation makes its frames from the swap chain's picture. The two-plane presentation (Series S: the
scene and the interface) was composed into R8G8B8A8, and generated frames of an 8-bit picture came out in bands
(sky, skin) in aki-runtime's runs of 2026-11-27; composed into R10G10B10A2 the bands were gone there. Here the same
while frame generation's Streamline is started (fg::active). If the swap chain refuses the format once, 8 bits are
composed from then on, with a warning.

Not taken: their conversion of a single presented plane into 10 bits (bdcb503's ps_one). A single plane is copied
in the title's own format here (swap_format), which is 10 bits or more where the title has them, and an 8-bit
plane gains no levels by being copied into 10.

Files: host.rs (planes_format, present_tenbit, two places in present_planes). Test:
host::relay_tests::two_planes_are_composed_into_10_bits_under_streamline_only (the choice; the composing itself needs a
card with Streamline). Not run in the game yet.

From aki-gta6/aki-runtime 2f43f8b and bdcb503 (Aki-Developer), GPL-3.0.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-27 17:01:42 -05:00
eb96d2570f NVIDIA launcher: the lighter title settings are opt-in; the profiler picks threads by their start too
Measured like for like at the save (three minutes of the idle camera each, Series X, 2026-11-27): 92.5 ms a
frame and 6,353 draws with the console's settings.xml, 90.9-101.7 ms and 6,636-7,079 draws with aki-runtime's
lighter set, and 338-350 draws a frame dropped for want of a pipeline against 191. The earlier figure in
8576e3d5c (7,700-9,500 draws to 3,100-4,800) compared a night drive over a bridge with the save and was wrong.
LEONIDA_TITLE_GRAPHICS='performance' writes the set; the default leaves the file as the title wrote it.

LEONIDA_PROFILE_ONLY also matches a thread's start (module+rva), for the title's own threads, which have no name.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-27 16:58:28 -05:00
a8d2f48e37 Two-plane composer: a NaN no longer comes out black (LEONIDA_COMPOSE_NAN=0: saturate, as before)
saturate() makes a NaN 0: black specks and a black sun where the upscaler or frame generation handed one over (sun
glints on water). The composer's pixel program clamps through a test on the bits instead (NaN and +infinity 1, negative
and -infinity 0), which the compiler cannot fold away as it may x != x. Only the two-plane presentation composes
(Series S); with the sharpening on, a NaN in the scene already came out as its neighbours' darkest, so this is for the
interface plane, its alpha, and LEONIDA_SHARPEN=0.

Files: compose.rs. Test: compose::source_tests (the program compiles both ways and the two differ; no card needed).
Not run in the game yet.

From aki-gta6/aki-runtime 33c21b9 (Aki-Developer), GPL-3.0.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-27 16:55:07 -05:00