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>
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>
Review of the first version: a value that differs from the last start's command line was taken for the user's new
choice. That lost an explicit flag on the first start after an upgrade, never let the same flag typed again win, and
dropped a menu value the command line never mentioned when leonida-launch.txt lacked the key. The menu file was also
rewritten before the history, so a failed history write had already lost a saved choice.
Now the rule follows what the user typed:
- A switch typed for this start wins over the menu's saved value of each setting it makes. The menu file drops that
value, so F1 shows the command line's. scripts\play-d3d12.ps1 passes the switches typed there as -Typed, so its
Series X default and -Lowest 1080 leave the menu's choice standing. A start by hand counts its own switches, and
-More wins like a typed switch.
- Every other setting keeps the menu's value.
- The menu's SAVE AND RESTART adds -MenuRestart to the switches it replays (LEONIDA_MENU_ARGS), so there the menu's
values, saved after those switches, win.
leonida-launch.txt is gone. The menu file is written to a temporary file and moved over the old one, and only when a
value leaves it. If that fails, the start runs with the command line's values and the file stays whole.
Tests: 10 cases, among them the same switch typed again, an untyped default, a setting no switch makes, the restart,
a start by hand, -More and a menu file that cannot be written.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Alt+Enter went to DXGI's own exclusive fullscreen, for which nothing here makes the buffers
again: the picture froze and the screen stayed black. The presenter now turns DXGI's Alt+Enter
off (MakeWindowAssociation with DXGI_MWA_NO_ALT_ENTER, on the swap chain's own factory), and
the title window's procedure in lifecycle.rs handles the key itself:
- Alt+Enter takes the title's window without its frame over the whole of its monitor, and the
next one gives back its frame and its place. A held key's repeats do nothing, and the
character it makes (a beep) does not reach the title.
- Going back gives back only the frame and edge styles, so a window made borderless before it
was first shown stays shown.
- LEONIDA_FULLSCREEN=1 (the launchers' -Fullscreen, or FULLSCREEN (NO BORDER) in the F1 menu)
makes the window borderless from the start.
The swap chain is not made again: its picture is scaled to the window as before
(LEONIDA_PRESENT_SCALE). Two tests send the keys to a window of their own.
The idea is VIctory's (trustno1-coder/VIctory-NVIDIA has a borderless fullscreen); the code is
written for leonida-hle.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tools/pc_prompt_glyphs.py draws its own key caps, arrow keys and mouse in
code when --glyphs is not given (no pictures, Pillow or font), with the keys
of the runtime's on-foot table, each inside the outline of the Xbox glyph it
replaces and covering no more of the canvas (measured on the user's movie,
numbers only). tools/prompt_glyph_movies.py builds pc_ and ps_prompt_glyphs.gfx
over the title's movie (standalone if data.rpf cannot be read) into
d3d12/target, where leonida.exe looks; play-nvidia.ps1 runs it before a start
and make_game.py in its runtime stage. A movie the player made is never
touched or shadowed; its own are stamped and rebuilt only when inputs change.
DLSS frame generation runs on RTX 40 and 50 cards only. LEONIDA_FSR_FRAMEGEN=1 (the
launchers' -FsrFrameGen, or the F1 menu) presents through AMD FidelityFX's frame
interpolation swap chain instead: one generated frame between two of the title's, on RTX 20
and 30 cards and on any other D3D12 card.
- fsr.rs (new): loads amd_fidelityfx_loader_dx12.dll and amd_fidelityfx_framegeneration_dx12.dll
from LEONIDA_FIDELITYFX_DIR (d3d12\amd-sdk\FidelityFX\bin by default) once WinVerifyTrust
finds both signed, makes the swap chain, and before each present dispatches the prepare
step with the depth, motion vectors, render size, jitter and camera range fg.rs collects for
DLSS. The title's colour without the interface goes in when the frame is one composed plane.
Not made while Streamline's frame generation is active.
- fg.rs: the inputs are collected while either frame generation is on (collecting()), and
inputs_for_present() hands them to fsr.rs.
- host.rs: the swap chain comes from fsr.rs when it is on, and it is told before ResizeBuffers.
- The F1 menu has FSR 3 FRAME GEN 2X; it can be turned off and on while the game runs.
- play-nvidia.ps1 / play-d3d12.ps1: -FsrFrameGen and -FidelityFxDir; FSR frame generation is
off with ray tracing, and LEONIDA_TEXTURE_ROOM_PERCENT defaults to 80 with it, since it holds
1.5 to 2 GB of video memory.
Ported and adapted from trustno1-coder/VIctory-NVIDIA crates/victory-gpu/src/streamline/fsr.rs
(29d8dbf, GPL-3.0); credited in d3d12/README.md and the module's notes. AMD's DLLs are not in the
repository: the user puts them in the folder.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
LEONIDA_RENDER_SCALE_MIN (the loader's hooks.rs) sets only the lowest scale of the
title's own upscaler (the immediate at rva 0x28f1e7e) and leaves the scale above it to
the title's dynamic resolution; a valid LEONIDA_RENDER_SCALE still holds one scale.
The launchers take it as -Lowest <height>; scripts\play-d3d12.ps1 now starts Series X
with -Lowest 1080 (a 2560x1440 output, 1080 to 1440 lines rendered) instead of
-Resolution 1440, which still holds 1440.
Same save, RTX 4060 Ti, frame generation off, two series (2026-11-29): median frame
57.0 and 59.6 ms against 66.0 and 67.9 held at 1440; the title's choice sat at its
1080 floor there. A recorded tour at the floor: no device removal, no new pipeline
refusals; the frames the scan flagged are camera turns into the sun.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The title blurs by the movement of one frame. At this port's 12-14 frames a second its smears are twice as long as at
the console's 30, and its tile-based passes paste blocks of an older picture on camera turns: the ghosting and blocky
glitches the user reported. The launcher now adds the blur's first pass, the downsample (CS_MotionBlurDownSample*,
four variants), to LEONIDA_SKIP_PIPELINES, so the later passes find no movement and blur nothing; -MotionBlur (also on
scripts/play-d3d12.ps1) keeps it.
Measured at the waterside save with camera turns recorded (2026-11-28): with the blur, framescan flags a smear at the
end of every turn and trees streak in blocks (runs mb1, hz1); leaving out its first pass for the whole run (mbo1,
mbo2), no smear in any turn and no stale blocks. Leaving out a later pass instead is wrong: without
PS_MotionBlurLowRes the composite pastes stale tiles of an older view, without PS_MotionBlurProcessNeighborhood old
movement stays in its tiles (in-run A/B, mb1). As voidopcode/vilocity a0aa988 (GPL-3.0) found, clean in 670 frames.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The project status put the recompiled runtime first and the playable one second, with the measurements of 2026-11-27;
it now says which runtime is playable first, with the four standing starts of 2026-11-28 (series e5a: median frame
72 to 81 ms, RTX 4060 Ti 16 GB, driver 616.64), and that the 30 rendered frames a second are not reached. The status
table's rows say which runtime they are about. d3d12/README.md gets a short section on where it stands and the row
for the dark interiors. scripts/play-d3d12.ps1 takes -NoFrameGen (to d3d12/scripts/play-nvidia.ps1), which the
README names; checked with -DryRun both ways.
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>
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>