Eight compute programs the translator gives an approximate form on 32-lane
hosts (each half-wave its own results) go in LEONIDA_PAIRED_FOR beside the
launcher's three: the four opaque temporal resolves, CS_GenerateShadowMasks
and its hair variant, and the two light-cluster passes. On two recorded
tours of one build from one save, approximate against paired, the player's
cap came out black as if in shadow in sunlight with the approximate forms
and lit with the paired ones; indoors both were alike. Only the named
programs are translated again.
AI-assisted (Claude). Tested on an RTX 4060 Ti, driver 616.64.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The bake's synchronous upload was the one submission waited for in play: 0.2 a
frame, 20 to 60 ms each on a list thread. With LEONIDA_BAKE_AHEAD=1 the uploads
go as a flight of their own, a thread of ours shows the slots once the card has
run them, and the list with the bake's draw waits at a fence in the card's
queue (Host::execute_gated, HostList::wait_gate) that opens then. No submission
made the card wait at it on a tour, the tour's 546 frames had no fault, and two
moving A/Bs (33 pairs each) showed the frame the same, so it stays off.
A GPU test checks the order (and fails with TEST_NO_GATE=1).
Lists run synchronously are counted by caller (diagnostics). The frame
generation cap stays at 28: six starts gave rendered frames of 72 to 76 ms
whatever the cap, with the most even pacing at 28.
AI-assisted (Claude). Tested on an RTX 4060 Ti, driver 616.64.
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 paired form (a host thread runs two console lanes, no group barriers) takes that program from 2.9 ms to 0.03 in
the timing runs, and leaving it out in turns took 2.3 ms off the frame. It waited for a comparison with projected
decals in view. At the waterside save the decals in view are the player's (grime on the arms and the shirt): left
out by turns in one still view they go (run ds). In a start with the paired form they are there as in a start
without it, nothing blocky, and the standard moves of each start show the same 6 one-frame blips (runs pf0, pf1).
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>
Inside Jason's house, driven in by hand and standing, the bound on and off by turns of 3 s in one run (lv1-live): with
it off the room is full of white specks (ceiling, walls, the air), with it on there are none and nothing else in the
picture changes. On the balcony, three runs the same way (al1-aab1..3), the picture is the same either way. The
READMEs list it with the other fixes of the day.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Without rays every glossy texel holds the sky of its missed ray: indoors, eyes glowed white and wooden floors had an
oily white sheen with dark streaks (Jason's house). The guard against it (ambient.rs, LEONIDA_REFLECT_MOST) never ran
on this renderer, whatever it was set to: no line of it in any log. The title dispatches CS_UpdateHistory indirectly,
and the guard was hooked on direct dispatches only. It now follows indirect dispatches too (that role alone; the
other light passes keep to their direct dispatches), and logs once which way the program came.
Measured in the game, Series X 1440p, waterside save, the guard at 0.5 on and off by turns of 3 s in one run
(LEONIDA_AB, runs rf2-rab1 and rf2-rab2): inside the house the floor is wood and the eyes plain with it, sheen and glow
without; outdoors on the balcony water and sky look the same either way. play-nvidia.ps1 sets 0.5 (maren-halv's value,
as the A/B switch already used). The READMEs say so.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Waterside save, Series X, 1440p, RTX 4060 Ti, in turns of 4 s against 1:
standing (133 phases, a level for each view) medians -2.15 ms (+-0.39), means
-2.07 (+-0.44), of 60 to 82 ms; 2 in the same run -3.77 (+-0.38). Walking and
turning (92 pairs) means -1.64 (+-1.55), medians -0.60 (+-1.38), p90s -0.74
(+-2.64), of 85. No indirect record ran empty for want of a list's budget in any
run. 900 to 1,000 batch passes a frame against 1,150. 1,116 recorded frames of
the standard moves at the waterside with 4: no sea fault found (the scans found
none with 2 either: they say 4 is no worse than 1, not that they would see it).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The limit counts the made frames too: 28 shown is 14 rendered, 71.4 ms apart
(15 gave rendered frames 133.3 ms apart, 14 gave 142.9: fg.rs's comment now
says so). Same save, Series X, 1080 lines, RTX 4060 Ti, standing, phases of 10
s (2026-11-28): rendered frames 70.6 ms mean, 68.8 median, 76.6 p90 without a
limit; 72.5, 71.4, 76.7 with 28; 78.3, 76.9, 82.5 with 26. The mean spread of a
phase's p90 over its median 7.8 -> 5.3 ms with 28.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
play-nvidia.ps1 set LEONIDA_CARD_BUFFERS_MB=1536 on every card, which overrides the runtime's own sizing by the
card's budget (shadow.rs default_card_limits_mb: 512 MiB at 12 GiB and under). It also put up to 3 GB of title
memory windows in CPU-mapped VRAM on every PC under 48 GB of RAM. Both were measured on large cards. On a 4 GB card
they add up to more than its whole budget: 5.5 GB in use of 3.2 GB, the rest paged out by the system.
The launcher now reads the card's memory from its driver key (HardwareInformation.qwMemorySize; AdapterRAM stops at
4 GB). Under 6 GB it leaves LEONIDA_CARD_BUFFERS_MB unset and gives the windows no VRAM, and says so. -More and
-WindowsBarMB still win.
MEASURED, GTX 1050 Ti 4 GB, Windows 10, the same scenes with 512 / 0 against 1536 / 3072: frames steadier
(2-3 -> 3-4 fps) and more textures and characters drawn in. Eyes on the same scenes, not a capture. -DryRun shows
neither variable on that card and the -More value when given.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With -Resolution the title upscales by itself and frame generation takes its
depth and motion vectors from the G-buffer pass (fg.rs). Series X, -Resolution
1080, RTX 4060 Ti (2026-11-28): Streamline reports 2 frames shown per frame
rendered once the window has the focus, the window title 15 fps rendered and 29
shown; at 1440 lines 13 rendered. Only where the Streamline files are (they are
not in the repository) and the card's name says RTX 40 or 50; Smooth Motion is
left off while it runs, as with -FrameGen.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A store of the title's that faults on a guarded block is done through our
own view of the page and the block stays read-only, instead of the block
being opened by one change of protection and guarded again by another
(titlewrite.rs; a store that is not understood, a block's fifth and code
that fills blocks open the block as before). It was off unless asked for.
Switched in turns of 4 s inside one run (LEONIDA_AB; RTX 4060 Ti, Ryzen 5
7600X, Series X profile, every start from the waterside save), the frame
with it against without:
- standing at 1440 lines (a level for each view of the idle camera, 102
phases): -0.56 ms (+-0.30; means -0.90 +-0.33), of 72;
- standing at 1080 lines (88 phases), where the processor is more of the
frame: -2.36 ms (+-0.32; means -2.15 +-0.32), of 66;
- walking and turning at 1440 lines (pairs of phases, three runs): -1.92 ms
(+-0.94, 21 pairs), -0.90 (+-1.63, 89 pairs), -1.64 (+-1.45, 44 pairs),
together -1.7 (+-0.7), of 83 to 87.
Nothing says a store was lost: 1.4 to 1.7 million stores a run were done
beside the guards, 56,000 to 75,000 were not understood and 30,000 to 47,000
blocks had too many (those open the block as before), and no run has a
"title memory not written". Every frame of the standard moves saved without
and with it (553 and 571 frames): the scan flags 2 and 6, and the six are a
fast turn past a white house and the sky, with nothing missing or black in
the frames or their neighbours. Only that one place and time of day was
looked at. The game was in the world 54 minutes with the switch turning (on
half of the time) and 7 with it on throughout (the saved moves, and a last
standing run with the launcher as it is now: 2.06 million stores, no fault,
mean 73.1 ms a frame over four minutes where the first run of the night had
76.6), without a fault.
-More @{LEONIDA_STORE_BESIDE='0'}: every faulting store opens its block.
KyleS98/VIctory-Neo measured its equivalent at 32.60 -> 31.17 ms a frame.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The launcher set LEONIDA_CARD_AWAKE=1: a compute loop that keeps the card's
clocks up while it stands idle between submissions (host\awake.rs). Switched
in turns of 4 s inside one run (LEONIDA_AB; RTX 4060 Ti, Ryzen 5 7600X,
Series X profile, every start from the waterside save), the frame with the
loop against without:
- standing at 1440 lines (a level for each view of the idle camera, 102
phases): +2.14 ms (+-0.30; means +2.07 +-0.33), of 72;
- standing at 1080 lines (88 phases): +0.37 ms (+-0.32; means +0.61 +-0.32),
of 66;
- walking and turning at 1440 lines (pairs of phases next to each other):
+0.68 ms (+-1.16, 89 pairs) and +1.78 (+-1.84, 44 pairs), of 83 to 87.
The card is 86 to 99 % busy in all four: there is no idle card to keep awake
on this PC, and the loop takes its share of a busy one. It is a gain
standing at 1440 lines; walking, the spread does not show one (it shows no
loss either).
What is given up: where the card does stand idle for half of a frame, the
driver lowers its clocks and the next submission starts slow (awake.rs: a
captured frame of 30 ms took 38 to 40 with waits between its submissions).
That is a faster card behind this processor, not this one.
-More @{LEONIDA_CARD_AWAKE='1'} keeps it awake as before.
KyleS98/VIctory-Neo 38b768c turned its own off for the same reason (30.7 ->
31.7 fps, the card 86 % busy with the loop and 76 % without, RTX 3090 Ti).
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
LEONIDA_ALIAS_DIRECT=1 and LEONIDA_PAIRED_FOR=be6ce5d849d51127,922e1d0ee1e19a85
(CS_ShadowRenderTiledCascadesCB and ...AlphaCB). RTX 4060 Ti, Series X
profile, 1440p, standing at the waterside save:
- the copies behind aliased views 3.6 -> 1.9 ms of a timing run's frame;
switched in turns of 4 s the frame is 2.6 ms shorter (+-0.9, of 78);
- the two shadow programs' lines of a timing run 2.5 -> 1.2 to 1.6 ms
together (two runs each way); left out in turns of 3.5 s they are 2.9 ms of
the frame in the form the chain gives them (+-0.6) and 1.3 ms paired (+-0.5).
Every frame of the standard moves saved each way (513 without, 547 and 526
with) shows the same picture, in daylight with the shadows in view; the
frames the scan flags are a roof beam passing the camera, and two darker
frames the run without either has too.
Not set: the paired form for the decals' tile classification
1f1fbd86759b3da2 (2.9 ms -> 0.03 in timing runs), as no saved frame has a
projected decal in it to compare.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Walking and turning from one save, 4 minutes each way (RTX 4060 Ti, Series X
profile, 1440p): mean 111.6 -> 94.4 ms a frame, median 105.1 -> 91.7, p90
139.3 -> 113.9; title memory held for mapping changes 43.2 -> 8.9 ms a frame.
2 MiB measured the same.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
285,000 regions asked of Windows one by one took a thread 1.06 s every 30 s,
beside the title's own mapping calls.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Windows 10's own Direct3D 12 stops at shader model 6.5 and refuses the
heap-directly-indexed root signatures every translated pipeline uses, so on
Windows 10 leonida.exe made no host pipeline at all.
leonida.exe now exports D3D12SDKVersion and D3D12SDKPath (.\D3D12\), so
Windows loads Microsoft's newer runtime from a D3D12 folder beside it.
D3D12SDKVersion is set first thing in main to the version of the
D3D12Core.dll that is there (a mismatch makes Windows refuse Direct3D 12,
0x887E0003), or to Windows' own runtime's without one, so nothing changes on
Windows 11. d3d12.dll is delay-loaded so that Windows reads the version main
set. Get-D3D12.cmd (scripts\get-d3d12.ps1) fetches Agility SDK 1.614.1 from
nuget.org with pinned SHA-256s and a Microsoft signature check, and
play-nvidia.ps1 stops with that hint on Windows 10 without the folder.
Ported from trustno1-coder/VIctory-NVIDIA (GPL-3.0-or-later), commits
10862a6, e69e39c, f3534e6 and 0f0ada1 there.
Tested on Windows 10 Pro 22H2 (19045), RTX 3090, driver 610.88, Ryzen 7
9800X3D: `leonida warm --used --again --limit 30` made 30 of 30 host
pipelines with D3D12\D3D12Core.dll (1.620) beside the exe, and 30 of 30 had
no host pipeline without it. New tests: agility::tests (version and export
parsing, Windows' own runtime: it exports D3D12SDKVersion 2 on Windows 10
22H2) and tests/agility.rs (the exe exports both symbols; d3d12.dll is
delay-loaded, not imported).
Written with AI assistance (Claude).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
What was wrong: cef91163b made the launcher drop "the whole
CS_TransmissionVolumetrics family", seven hashes from findings.md, where
they were grouped because they trip on the same thing (a lane's early
return around LDS minima and maxima). By the entry points in their
containers (one run's known-shaders.bin, 2026-11-27) two of the seven are
not the water's:
2889c21328c69e58 CS_GenerateShadowMasks_SampleHairScreenSpace
888af37a584acf98 CS_GenerateShadowMasksHairOnly_SampleHairScreenSpace
They make the sun's shadow mask where hair is sampled on screen (8 x 8
groups). With their dispatches dropped, what they would have written
keeps whatever mask was there. edsuuu/VI-BR-PORT b120167 describes what
that looks like when another program of this pass is left out: the
shadow-mask tiles with hair kept stale, lit values. Whether this is the
region with a stair-stepped edge around a character at the deck's glass
door (see-through railing and legs, a displaced copy of railing over the
floor) is not known: it is the first thing to look at, and it needs no
build: -More @{LEONIDA_SKIP_PIPELINES='6f225b641c5b0708,5dc3b25986622949,926c46bab3b86bd6,6871d6e4b3ac9a10,a10179ab7eda0dc3'}
on the launcher as it was does the same.
What changes: the launcher drops the five programs that are the water's.
The two shadow-mask programs run again, in the paired form they had
before cef91163b (the reason for the drop was the water's blocks; nothing
is noted against these two). LEONIDA_HAIR_SHADOW_MASKS=0 in the
window's environment drops them as before. docs/findings.md names the
seven in the commit after this one.
Tests: the launcher parses; -DryRun prints LEONIDA_SKIP_PIPELINES with
five hashes by default and seven with LEONIDA_HAIR_SHADOW_MASKS=0. Not run
in the game. AI-assisted.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The two writers of the title's settings.xml (its UI and fullscreen resolution for LEONIDA_OUTPUT, and the opt-in
lighter graphics set) looked for the data folder in LEONIDA_DATA_DIR alone. With the folder named by leonida.toml,
as on this PC since 2026-11-27, neither ran: a start asked for the lighter set and got the console's, and the UI
size would have gone back to 3840x2160 after the title's next clean exit. The folder is the variable's, else
data_dir of leonida.toml beside the layer.
Checked: the launcher parses, and the expression gives the folder for this PC's file.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The submitting thread stands 35 to 65 ms of a 110 ms frame waiting for flights at the save, for three copies of
0xd0, 0x120 and 0x230 bytes a frame at their place in a list that a fill reads back on the CPU. The rule that takes
such a copy for the title's own (LEONIDA_PLACED_TITLE, LEONIDA_FILL_TITLE) asks whether a shader's write went into
the bytes lately, and the record of that was by 4 KiB page: a real write of 0x58 bytes 16 bytes away said yes.
- watch: LandedCells, the cells of each page that a landing stored into, for this span of 512 frames and the one
before; landing_cells, landing_cells_whole, landed_lately_exact. Two tests.
- land: each page a piece puts notes the cells in which the card's bytes are new, less (for small changes) those
title memory holds already.
- host: LEONIDA_LANDED_EXACT=1 makes the two rules ask by cells. Off by default: with the switch turned every
20 s the frame was no shorter (median 110.2 ms with it, 103.1 without, 33 phases, measured while pipelines
compiled and three builds ran beside the game), and the wait's line names the destination as written lately in
both halves. The line now says why: "a shader's write went into its destination, which no flight declares,
lately" for 1,042 of 1,098 of them. A copy that waited is put into title memory by its landing and noted like
a shader's write, so a destination once noted stays noted; that is what is left to take apart.
- launcher: after the pipeline precompile, a warning if a driver cache file the precompile wrote is at 4 GB (what
is compiled is then not kept, and the game compiles again while it runs: twice on 2026-11-27).
Checked: cargo check (diag, diagnostics+mimalloc); cargo test -p leonida-gpu cells_ (2 pass); one run in the game.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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>