Commit Graph

15 Commits

Author SHA1 Message Date
d9ac7f6f0c Merge remote-tracking branch 'origin/main' into feat/launcher-update
# Conflicts:
#	tools/leonida_launcher.py
2026-12-02 08:07:23 +01:00
229d352ee3 Merge pull request #3058 from OreoFR/carry/hwrt-2972
d3d12: hardware ray tracing on DXR 1.1 (LEONIDA_HW_RT, off: a trial) - carry of #2972
2026-12-02 06:54:01 +00:00
094be1f323 launcher: show an update beside PLAY, not only in the status bar
The first window test showed the bar line at the very bottom, easy to
miss, and its text pointed at a button "above" that was beside it. An
update now shows as a framed "Update available: N new commits" with its
Update button next to PLAY. The bar keeps the other notes (zip copy, no
git, a failed check).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 07:44:39 +01:00
52e2eae670 launcher: check for updates at start and update in one click (LAUNCHER-UPDATE)
At start the launcher runs git fetch in its folder. When the clone is
behind its upstream, the Play page says how many new commits there are
and shows an Update button. Update runs this file's own --update mode:
git pull --ff-only, then a rebuild of the runtime when d3d12/ changed,
with the output streamed like the other tools.

A copy downloaded as a zip has no .git; the launcher says that updating
needs a git clone. A Settings box turns the check off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 07:38:08 +01:00
c43f309985 launcher: Precompile every pipeline ticks Prepare shaders (LAUNCHER-PRECOMPILE-ALL-NEEDS-PREPARE)
switch_args passes -PrecompileAll only with the shader preparation on, so the
new box did nothing when Prepare shaders before starting was off. A player hit
this right after #2986. Ticking the first box now ticks the second, and turning
the preparation off clears the first. A note line under the options says so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 07:25:20 +01:00
daf7242f2e Merge remote-tracking branch 'origin/main' into carry/hwrt-2972
# Conflicts:
#	d3d12/scripts/play-nvidia.ps1
#	scripts/play-d3d12.ps1
2026-12-02 06:57:33 +01:00
c6f253705d Launcher: option to precompile every known pipeline (-PrecompileAll)
The precompile makes only the pipelines earlier runs drew with (warm --used).
-PrecompileAll (launcher: "Precompile every pipeline", off by default) makes
every pipeline the title has created, as foxhound's launcher does: fewer
stalls in places not drawn in yet, at the cost of an hour or more and
gigabytes the first time. Kept across the F1 menu's restart.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 17:30:37 -05:00
3fdfbaa46f d3d12: hardware ray tracing on DXR 1.1 (LEONIDA_HW_RT, off: a trial)
In place of -RayTracing (the title's structure builder and software traversal as translated
shaders): the title's XboxBvhBuilder calls become host DXR 1.1 bottom and top levels, and the
traversal loops of its trace programs become inline ray queries.

Ported from trustno1-coder/VIctory-NVIDIA (its #3706; from Leslie-d-a/VIctory-NVIDIA-HWRT 61e389e0
and 5f55bca8, original by dakisback2 ecc49d5b and 72f8316a), GPL-3.0, and fitted to this tree:

- leonida-shader: emit/rayquery.rs wired into lower.rs (the plan, the handles, TLAS root SRVs
  t230..t241, the analyses that leave the lifted loops out). A program in the paired form is not
  lifted. With LEONIDA_HW_RT=1 the node test of a loop left unlifted misses every node
  (emit/intersect.rs bvh_miss): the console structures are never written then.
- leonida-gpu: hwrt.rs (and dxr.rs for its records); list::external with a LEONIDA_THIN op for the
  structure work at its place in a title list; the TLAS views in the descriptor heaps;
  Deferred::held; the ray queries in the shader cache's entries; counters in the frame log.
- leonida-hle: modules/xboxbvh.rs replaces the exports of the title's XboxBvhBuilder.dll when on.
- With it on the light stand-in stands aside and the passes left out without structures run.
  Shader writes are not all copied back as VIctory-NVIDIA does (LEONIDA_HW_RT_COPY_BACK=1 asks for
  it): here that stretched and flickered textures and cost 30 to 45 ms a frame.
- F1: HARDWARE RAY TRACING (TRIAL); play scripts: -HardwareRT (frame generation left off with it,
  as with -RayTracing); launcher: a checkbox. Docs: fork-ray-tracing.md, README.md, switches.md.

One PC (RTX 4070 12 GB, driver 621.40, Series X profile, no frame generation): 22 to 25 frames a
second against 6 with -RayTracing; the run ended after six minutes with the card's memory full.

Co-authored-by: dakisback2 <90546900+dakisback2@users.noreply.github.com>
Co-authored-by: Leslie-d-a <70692092+Leslie-d-a@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-12-01 23:04:12 +01:00
45df09b843 chore: remove 13 dead one-off scripts, fix /home/nolan test paths, drop unused imports (CHORE-TIER2A-PYTHON-CLEANUP) 2026-11-30 04:00:53 -05:00
a927ab9237 Merge remote-tracking branch 'origin/main' into merge/upstream-1128 2026-11-28 13:30:45 -05:00
635bab171f tools/scripts: the eight remaining __main__ blocks set errors=replace on stdout
test_tool_stdout_encoding fails on main: leonida_launcher, ps_prompt_glyphs,
victory_saves, volume_stats, world_hotspots, fetch_vkd3d_proton, port_ctl and
sync_victory still print paths a Windows ANSI code page cannot encode, and die
with UnicodeEncodeError when stdout is redirected under python -I. Add the
same one-line guard the other programs already have (exe_sha.py, #605).

Tested: test_tool_stdout_encoding (4 tests), test_tool_startup,
test_victory_saves, compileall, run_semantic_tests (6397 tests, 0 failed).
AI-assisted: yes (Qwen Code).
2026-11-28 03:49:04 +03:00
d56a01a505 launcher: the key art behind PLAY, fetched once and kept outside the repository
The picture behind PLAY is the one chosen in Settings (Launcher, Background picture), else the newest background.webp,
.png or .jpg in the launcher's settings folder (%APPDATA%\Leonida), else the newest capture, else the drawn art. When
there is none, launcher/serve.py fetches the game's key art from rockstargames.com once at start (2560 wide) and
keeps it there as background.<the type that came back>; --no-art leaves it. The request names a plain browser and
nothing about the user or the project; what comes back is kept only if its bytes are a PNG, JPEG or WebP. The picture
is never part of the repository.

Over a picture the page sets it a little lower, so heads clear the words top right, fills the band above with the
picture's own top row, and moves the cards to the bottom so the faces stay clear. /media/background needs the run's
cookie and serves only a picture by its bytes.

Tested: python -I tests/test_launcher_serve.py (10 tests: picture kinds, which background, the fetch against a local
server, token, Host, Origin, cookie, preview starting nothing) and tests/test_leonida_launcher.py (15), the
no-game-data check, and the page in a browser with the server in --no-run mode: the art was fetched (2560x1440 WebP)
and shown, Settings names the file in use.

AI-assisted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 17:52:09 -05:00
b43ad11673 launcher: an HTML page laid out like a publisher's game launcher, with a local server behind it
launcher/index.html is the window: a slim black rail of square tiles with a selection bar (four setups of the one
game), art over the whole window, the sections as uppercase words top right, the logo with one large light PLAY
button and a small menu button, and a row of black cards (what is still to do, the newest captures, the latest
changes). Mods, Saves, Captures, Tools, Settings and About are a dark sheet over the art. The logo is the
repository's assets/logo.svg; the art is drawn by the page. Nothing is loaded from the network.

launcher/serve.py serves it on 127.0.0.1 only and does what the page asks through the functions of
tools/leonida_launcher.py: settings, the mod switches, the save list and back-ups, captures, PLAY and Stop, the
tools. Requests need the Host of this machine, the run's token (a header for /api, a cookie for pictures and the
event stream), and name things by folder, index or name, never by path. --no-run looks only: PLAY and the tools
say what they would run and start nothing.

tools/leonida_launcher.py: the settings and the command line know the newer switches of scripts/play-d3d12.ps1
(-SeriesS, -Dlss, -FrameGen, -Aspect, -PresentScale, -Adapter), each checked before it is kept.

Tested: python -I tests/test_leonida_launcher.py (15 tests), check_no_game_data on the new files, and the page in
a browser against the server in --no-run mode (every page, the menu, PLAY printing its command). PLAY, Stop and the
tools were not run for real: another session had the game running. Launcher.bat still opens the Tkinter window.

AI-assisted.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-27 17:39:47 -05:00
4ef8a2fc9b tools: Saves page in the launcher (list, back up, restore, duplicate, delete, blob export and import, byte viewer)
tools/leonida_saves.py (standard library, no Tkinter) reads the D3D12 runtime's save layout from xgamesave.rs:
<data>/data/7952987A/saves/<user>/<config>/<Name>~<FNV-1a 64>/v<N>/{0,1,manifest}. The launcher's Saves page lists
containers and blobs (size, time, newest readable version) and offers ZIP backups in <data>/save-backups, restore
(after an automatic backup of the current state), duplicate under a new name (new folder hash and manifest), delete
(moved to save-backups/deleted, not erased), single-blob export and import (backup first, written as a new v<N+1>
the runtime's way), and a read-only hex and strings viewer. All of it is refused while the game runs.

No value editing: the story saves are packed (entropy 8.00, compressed or encrypted; not decoded), the plain ones
carry an ASAV checksum of unknown algorithm. The page and docs/launcher.md say so.

Checked: tests/test_leonida_saves.py (15 tests, fake trees), tests/test_leonida_launcher.py, compileall, the window
built and every page shown once by a script; layout and hashes confirmed read-only against a real data folder (all
four containers' folder names match the FNV rule). Buttons not clicked. AI-assisted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 00:11:50 -05:00
10d0a2d94f tools: Leonida Launcher, a Tkinter window to play, set options, manage mods and run tools
Launcher.bat (Windows) or python3 tools/leonida_launcher.py opens a dark launcher with a navigation column, a hero area
with a PLAY button, a status line and pages: Play (runs scripts/play-d3d12.ps1 or scripts/play-linux.sh, output in a
log box, state line, Stop with confirmation ending the process tree, never two runs at once), Settings (game folder
with a check for game_scarlett_master.exe, data folder, the switches read from play-d3d12.ps1), Mods (mods/*/mod.json
enabled flags written via leonida_mods), Tools (DLSS fetch after a confirmation, runtime rebuild, logs and screenshots
folders) and About. Settings live in %APPDATA%\Leonida\launcher.json (~/.config/leonida on Linux). Its own design and
wording, no game assets; the hero picture is the newest screenshot found at run time, else a gradient. The pure parts
have no Tkinter and are tested in tests/test_leonida_launcher.py.

Checked: python -I tests/test_leonida_launcher.py (13 tests), python -m compileall -q tools,
scripts/check_no_game_data.py. The window itself was not opened or clicked through. AI-assisted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 23:59:48 -05:00