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>
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>
The title keeps its graphics settings in storage\settings\settings.xml and writes its console defaults
back whenever it exits by itself: ray-traced dynamic shadows, two samples of screen-space occlusion,
motion blur, full detail and grass distances. The launcher now writes the lighter set aki-runtime uses
(Aki-Developer: Apply-LowVramSettings.ps1 and docs/session-2026-11-26.md of aki-gta6/aki-runtime, GPL-3.0)
and keeps the first file as settings.xml.original. On the Series X profile the same road went from
7,700-9,500 draws a frame to 3,100-4,800 and the submitting thread's preparing from 40-45 ms to 25-34
(2026-11-27). -More @{LEONIDA_TITLE_GRAPHICS='keep'} leaves the file alone.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The frame is not the card's: with every scissor empty it took as long (97.8 ms against 97.3), with
every mesh draw of no group 85.7, with every dispatch left out 77.0 (LEONIDA_AB over the three
LEONIDA_EXP_* switches, 9,300 draws a frame, 2026-11-27). A profile of the submitting thread alone
(LEONIDA_PROFILE_ONLY, new: 17,711 rounds in 35 s where the 28 busiest threads gave 125) had a quarter
of its running time in the system heap. Built with the mimalloc feature the same view takes 78 ms a
frame against 93-98, so scripts/build-nvidia.ps1 builds with it.
LEONIDA_PLACED_TITLE=1 (off by default): a copy at its place in a list into bytes that flights have
declared but no shader wrote lately is taken by title memory at submission, so the fill that reads it in
the same submission does not wait for every flight to land (44-48 ms once a frame at the save, named in
the frame line now); a landing leaves alone what title memory holds already (LEONIDA_LAND_SAME), so that
such a copy is not noted as a shader's write to its page. The wait went from 1.00 to 0.08-0.36 a frame;
the frame's length did not change measurably with the system heap in the way.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
What was measured on the RTX 4060 Ti (driver 616.64) without the game: the fault reproduced with
its exact places, how the driver gives out places in its table of static samplers, that its own
cache on disk keeps pipelines by those places (where the five minutes of every start went), what
pipeline/places.rs does about it and what it costs, and what is not shown yet (the title's own
three starts). The launcher's note on the tonemap's samplers names the new file. AI-assisted.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
3,023 of the title's 12,101 pixel programs ask for the depth test before they run; with the late
test their writes through unordered views land for pixels the test then rejects, and
PS_AlphaVelocityDepthResolve writes that into the scene's depth and motion vectors (emit/mod.rs).
The candidate for the squares at a glass door's foot, the band beside it and smears behind
transparent surfaces. One start with it (2026-11-27, Series X): the picture as before at the dock,
11-13 frames a second; the door's view itself is not compared yet. '0' in -More: the late test.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
With a 1440p output and render scale 1.0 the title binds another variant of the water's
transmission program (5dc3b25986622949) than the one the launcher dropped (6f225b641c5b0708).
Its paired-lane form is as wrong as the other's: a band of blocks over the lower fifth of the
picture (captured frame 4623, 2026-11-27). All seven of the family (d3d12/docs/findings.md) are
dropped until the paired form is right; LEONIDA_WATER_TRANSMISSION=1 runs them as before.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Series X upscales by its own passes, which hand nothing over, so -FrameGen there forced the
title's FidelityFX path (LEONIDA_FSR_UPSCALER) for the upscale's depth and motion vectors. That
path lights nothing: the G-buffer is complete and both scene colour targets stay black (target
dump of 2026-11-27, frame 2065), with the HUD over a black world, by a stretch and by DLSS alike.
Frame generation now takes the depth and the velocity target of the pass that fills the G-buffer
(set_targets: four or more targets, one of them R16G16_FLOAT, with a depth target of the same
size), which are what the FidelityFX upscale is given on the other path (its probe: 2560x1440
formats 19 and 34, vectors in pixels, depth from 10000 to 0.15). No jitter is known there and
none is told. An upscale's own numbers win once one has come. LEONIDA_FG_GBUFFER=0: as before.
The launcher keeps the title's own upscaler for -FrameGen alone on Series X; -Dlss there still
takes the FidelityFX path and says that it is not lit yet.
In the game (Series X, LEONIDA_OUTPUT=2560x1440, render scale 1.0): "tagged=true status=0
presented=2 per=2", the window's title 12 fps (frame gen 23 fps), the picture lit.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
What was wrong: the launcher set LEONIDA_STATIC_SAMPLERS_LINEAR=1, which makes
every immediate sampler of the title's shaders linear. The title point-samples
on purpose: counted over the 26,503 programs of a work folder's disassembly,
21,876 sample instructions (gathers apart) in 1,468 program names use a point
immediate sampler. Among them the depth-aware upsamples: the pass that puts the
960x540 ray-marched fog on the 2560x1440 picture (CS_ApplyCombinedDeferred, in
five of the ten frame listings kept of runs p3, c1, s1, v1 and x2) fetches the
four low-resolution texels around a pixel one by one, depth first, and keeps
those within a quarter of the pixel's depth;
CS_TAA2_Resolve has ten point taps; PS_FogComposite*, PS_BlitTransparent*,
PS_GaussianDepthAware* more. Filtered, each tap is a mix across the silhouette:
the expected cause of the light rim around trees, wires and signs in fog.
The setting was for the posterized colour grading, which was the NVIDIA
driver's: a pipeline restored from the pipeline library with the sampler places
of the run that stored it (trustno1-coder/VIctory-NVIDIA 7fa0e95;
Spaghetih/victory-sley-fork 63714f3). Such pipelines skip the library since
f0606a744, nineteen minutes after the setting became the launcher's.
What changes: the value may be a list of program names or shader hashes
(pipeline/host.rs LinearScope); 1 is every program as before, unset or 0 none.
The launcher sets PS_Composite: the tonemap keeps its second guard, every
other program filters as its code says.
Tests: cargo test --profile diag -p leonida-gpu --features diagnostics --lib
linear_static (2 tests); cargo check --profile diag -p leonida --features
diagnostics. Not run on the game: the rim with the launcher as it is against
-More @{LEONIDA_STATIC_SAMPLERS_LINEAR='1'}, and the sky's gradient with '0',
are still to be looked at. AI-assisted.
Co-Authored-By: Claude Fable 5.2 <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>
Within the hour it ran by default in its paired-lane form, the lower third of the screen near
water came out dark behind a hard horizontal edge with blocky fringes (the user's screenshot).
The form is cheap now (under 0.3 ms); its picture is not right yet. LEONIDA_WATER_TRANSMISSION=1
runs it.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
LEONIDA_WC_NO_BACK: standing at the save, A/B of 20 s phases, three of each of 8 combinations
with LEONIDA_STEP_GATHER and LEONIDA_BARRIER_MERGE: median 91.0 -> 80.2-82.5 ms a frame (the
other two: 91.1 and 90.7, no gain here, left off). Pieces landed a frame 1,416 -> 341, copying
back 30-40 -> 10-12 ms. The standard moves captured with it on: 338 frames, one flagged.
The water's CS_TransmissionVolumetrics program 6f225b641c5b0708 in the paired-lane form: 76-80 ms
a frame as wave-wide, now not among the 40 costliest commands of the timing run (under 0.3 ms).
Its dispatches are no longer dropped (LEONIDA_WATER_TRANSMISSION=0 drops them). Not yet compared
on open water.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Each wait emptied the pipeline, about 75 ms, every few frames. A/B over moves, 7 phases of
30 s each way: mean 116.8 -> 104.9 ms, median 112.3 -> 102.3, p90 158 -> 130; waits behind
placed copies 266 -> 5. The standard moves captured with it on: 227 frames, none with a
one-frame dip or spike, lighting as before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
6f225b641c5b0708 (CS_TransmissionVolumetrics) translates since the wave-wide form, with 115
group barriers in its outer loop; a GPU timing run at the save measured one indirect dispatch of
it at 76-80 ms a frame on an RTX 4060 Ti, the next heaviest command 3 ms. Runs x31-x33 looked
right without it (its pipeline was not made yet there). LEONIDA_WATER_TRANSMISSION=1 runs it.
findings.md: what the form costs and what would make it cheap.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
What: without -RayTracing the launcher skipped the 1,000 CS_RaytracingResolve and 34
traced-shadow shaders (rt_off_hashes.txt through LEONIDA_SKIP_PIPELINES) and left
LEONIDA_RT_RESOLVE / LEONIDA_ACTIVATE_RAYS off. Now they run, with LEONIDA_BVH_MISS still
on; LEONIDA_SKIP_RT_RESOLVE=1 brings the skip list back.
Why: with them skipped, the outputs they write stayed stale: magenta blocks and
stair-stepped bars by the flower pots and the deck at the save, a magenta tint on the
blinds behind the glass door (the "blocky glitches"). klbf-lab 64ff6a0 (from YukiRyuu
362f600b) measured the same fix: purple pixels 15-69 per mille -> 0-1.
How checked: Series X profile, 1440p internal, the standard moves with every frame
recorded: magenta 0.00 per mille in all 316 frames (every turn showed the bars in the
runs before), brightness 114 (as before), frames 60-91 ms; the first run compiles the
~1,000 extra pipelines (seconds a frame while they build), later runs precompile them.
AI-assisted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Measured on the Series X profile, static scene at the save, 1440p internal: 120.7 -> 94.7
ms a frame median, the card's time 64.1 -> 33.9 ms (preparing 34.3 -> 48.1 ms); an
earlier pair of runs went the same way (135.9 -> 89.4 ms, less settled). With the frame
GPU-bound, shaders read buffers under 1 MiB over the bus from the PC's memory before.
Frames recorded while moving show no new fault (the magenta blocks at the glass door
seen in them are there without it too).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The picture since the renderer merge came out in flat colour bands, too
saturated, like an old camera. Traced pass by pass with target dumps: the
1920x1080 scene after DLSS is smooth, and the bands appear in the tonemap,
PS_CompositeNMB (6318f669e4f17d65), which reads 33^3 colour-grading tables at
fma(0.06925, log2(x + 0.003), 0.5928). A read-back of those tables
(LEONIDA_DUMP_VOLUMES) shows exact identity tables, all 35,937 entries distinct:
the content is right. Read without filtering they give 33 levels over 14.4
stops, about five bands per doubling of brightness, which is what the frames
measured.
With LEONIDA_STATIC_SAMPLERS_LINEAR=1 (every point filter among the samplers
the title's shaders carry becomes linear; comparison and anisotropic ones keep
theirs) the same sky region has 28,000-32,000 distinct colours where runs p3,
p4 and c1 had 700-1,400, and the whole recorded walk looks right (run s1). The
launcher now sets it. Which shader's sampler decodes to a point filter is not
found yet: the tonemap's own 3D lookups decode to a linear one.
AI-assisted.
Co-Authored-By: Claude Opus 5.5 <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>
- play-nvidia.ps1: LEONIDA_INDIRECT_BATCH=1. With 2, a batch opened before the
title's culling and tessellation dispatches clamped their arguments before
they were written: the sea's surface and its tiled resolve went missing for a
frame (sand seabed or black stepped blocks), 6 times in 271 recorded frames;
with 1, none in 441 frames moving around.
- lower.rs / mod.rs: a last-resort lowering for console wave64 programs whose
lane-branch regions read and write LDS (LEONIDA_WAVE_LDS_LOOSE, on), after
lepotane/VIctory-leonida b619f92; refused host pipelines went 8 -> 3.
- capture.rs: LEONIDA_CAPTURE_ALL=1 saves every presented frame.
- pipeline: refused pipelines are logged with the program names in their
containers.
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>