- tests: -PrecompileAll is among the switches checked against play-d3d12.ps1,
and it is passed only with the precompile on.
- README.md, docs/launcher.md, d3d12/README.md: the switch.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review of 8677729c9 (KelboLive):
- resolution_levers, the loader's only entry to the levers (windows.rs), was not pinned: replacing its apply_levers
call with nothing still passed. A test now calls it with the environment set under a lock and put back, with a
hash that starts as the 1.0.2.1 build's and with another one, and with no lever set.
- A lowest scale with neither a pinned scale nor LEONIDA_OWN_UPSCALER (F1's LOWEST SCALE alone) still took the
lowest as the ceiling. The title's own dynamic resolution rises to max(lowest, 1.0) on Series S whichever way it
is reached, so a lowest scale now has a ceiling of 1.0 too.
Both shown to fail without the fix: dropping the apply_levers call fails the new entry test; the old ceiling fails the
lowest-alone case. cargo test --locked -p leonida-loader --lib with LEONIDA_GAME_DIR: 88 passed; clippy -D warnings
clean.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review of de550f7cb (imShangLi):
- The comment called the pool "the third" of the row at 0x6186250, while the patch is 0x18 further on, which reads as
the fourth. Each row is an 8-byte header followed by its nine sizes from +8 (the copy reads [row + 0x8]), so
0x6186268 is the third size. The comment says so now.
- The README said "above 2/3"; the code wants more than 2/3 + 0.001, so that Series S' own 2/3 (0.6667) keeps the
console's budgets. The README says that now.
No code change. cargo test -p leonida-loader --lib hooks: 15 passed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review of 0cbc9e93a (KelboLive):
- The budgets followed the lowest scale, so -Lowest 720 on Series S (LEONIDA_RENDER_SCALE_MIN=0.6667) got none.
The title's own upscaler stores its minimum at 0x28f1e78 and its maximum at 0x28f1e87 as max(minimum, f()). f() at
0x1fb4300 is 1.0 on Series S and 2/3 elsewhere. So with that upscaler forced and no pinned scale, Series S may
render up to 1.0 whatever the lowest. The budgets now follow the ceiling:
- a pinned scale is its own ceiling;
- the own upscaler with no pinned scale has a ceiling of 1.0, as with -Lowest or the F1 menu's OWN UPSCALER;
- with neither, the ceiling is the lowest asked for.
- The call sites are covered now. resolution_levers reads the environment (Levers::from_env), checks the build and
calls apply_levers. the_levers_give_series_s_its_budgets_for_the_highest_scale_it_can_reach runs apply_levers on
an image buffer for -Resolution 1080, -Lowest 1080, -Lowest 720, the own upscaler alone, pinned 2/3, a pinned
scale over a lowest one, and FSR alone. It fails when the budgets are dropped from apply_levers, and with the old
floor rule.
cargo test -p leonida-loader --lib: 87 passed. cargo clippy -p leonida-loader --all-targets -- -D warnings: clean.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review of 29016670a (KelboLive):
- The budgets were applied only for a pinned LEONIDA_RENDER_SCALE. -Lowest 1080 on Series S sets
LEONIDA_RENDER_SCALE_MIN to 1.0, and the title renders at or above it. The minimum path now applies them too.
- They are written by series_s_budgets through apply_all, so a build where one place differs keeps the console's
own pair instead of a raised pool alone.
- the_series_s_budgets_are_written_both_or_neither writes them into an image buffer:
- both are written at 1.0 and at 0.75, and neither at 2/3 or 0.5;
- neither is written when the heap's place holds other bytes.
With the helper made to write nothing, it fails.
- The game-step test has its doc comment back. The threshold test is named for both budgets.
- The README says -Lowest is covered.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Series S at render scale 1.0 (1080p, `-SeriesS -Resolution 1080`, `play-S-1080p.ps1`) stopped the title at its own
breakpoint as soon as it started. The README listed it as "does not work yet". The title sizes two memory budgets per
console, both for Series S' own 2/3 scale, and at 1.0 each in turn is too small:
- The render-target pool, the third of nine pool sizes in the per-console table in .rdata: 1277 MiB on Series S,
2199 MiB on the others. Its allocator treats a failed allocation as fatal, and a 1 MiB one failed.
- A heap counted in 64 KiB pages, `mov eax, 0x1290` then `cmovne` with 0x2c60: 297 MiB on Series S, 710 MiB on the
others. A check compares a 432 MiB resource with it and stops at a breakpoint.
With a pinned render scale above 2/3, resolution_levers now writes the other consoles' sizes into both places. Only
Series S' row and its immediate change; the other consoles already hold such a scale. The retail-bytes test checks
both places and the other consoles' pool size.
RTX 3060, driver 621.40: Series S at 1080p ran five minutes into the world, rendering 1920x1080, at 11-22 fps, with
no crash. Before, it stopped about 8 s in, once at each budget.
Co-Authored-By: Claude Opus 5.5 <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>
play-nvidia.ps1 applied leonida-settings.txt (what F1 saved) over the command line at every start. An empty value
there removed what the command line set, so a later -Resolution, -Dlss or -SeriesS was lost without a word.
Now leonida-launch.txt (git-ignored) keeps what the last start's command line made:
- A setting this command line makes otherwise than that start's did wins. The menu file drops its value, so F1
shows and saves the new one.
- A setting it makes as before keeps the menu's value, the newer choice.
- Each start says which values came from the menu and which the command line replaced.
- A dry run writes neither file.
The F1 menu gets the native render scale (1, which -Resolution makes at the output's height) and the dynamic
resolution's lowest scale (LEONIDA_RENDER_SCALE_MIN, from -Lowest).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The loader's watchdog patches (from leonida-perf, after ZigZagBoi1/ScarlettPort) were opt-in
(`LEONIDA_NO_WATCHDOG` set); they now apply unless `LEONIDA_NO_WATCHDOG=0`. Each is still checked
against the 1.0.2.1 build's hash and the bytes it replaces. The title ends its process by a write to
address 0 when its main thread has not advanced for 30 one-second ticks, which a long load or the
driver compiling can reach on a PC.
Default on as trustno1-coder/VIctory-NVIDIA aee4c45a (through KyleS98/VIctory-Neo b686df1, GPL-3.0)
quiets the title's watchdog by default; those set the watchdog's own quit flag twice a second, the
patches here skip its fault instead.
AI-assisted (Claude). Tested on RTX 4060 Ti 16 GB, driver 616.64: the loader's
the_watchdog_is_quieted_unless_told_not_to test.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scripts\play-X-1080-1440p.ps1 starts Series X with -Lowest 1080: the title's own dynamic resolution picks the
height between 1080 and 1440 lines (output 1440p), about 13% shorter frames than play-X-1440p.ps1 on an
RTX 4060 Ti (57.0 and 59.6 ms against 66.0 and 67.9).
Findings: the one-frame dark cells of the recorded turns (d220, d226) are a dark wall crossing a cell between two
bright views in a fast turn, not a renderer fault; and frame generation's motion vectors on Series X are in the
units the title gives its own FidelityFX upscale (pixels, scale [1, 1], depth inverted, near 10,000, far 0.15).
AI-assisted (Claude). Tested on an RTX 4060 Ti (driver 616.64), Ryzen 5 7600X: the launcher parses; the findings
come from recorded runs d155, d174, d175, d194, d220 and d226.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The three ports of 998fcbcac and 936843f59 in the table of what was fixed, with their switches, tests and the
forks they came from (voidopcode/vilocity 3eda937; kylepelham/El1xr 9372c47f; trustno1-coder/VIctory-NVIDIA PR #65
and El1xr's sim_target.rs).
AI-assisted (Claude).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ported from voidopcode/vilocity's batch of 2026-11-30 (each checked against Leonida's own code first):
- v_cvt_{i32,u32,flr_i32,rpi_i32}_f32 clamp their operand before the DXIL conversion, NaN to 0 and past
the range to its top, as RDNA 2 does (LEONIDA_CVT_SATURATE, on); s_lshl{1..4}_add_u32 set SCC to the
carry of the 64-bit sum (LEONIDA_LSHL_ADD_SCC, on). ReTerryDavis/ReVIctory a892756, 9c99926, through
vilocity eaa934e.
- v_div_fixup_f32 resolves 0/y and x/inf before a NaN quotient's infinity (LEONIDA_DIV_FIXUP_ZERO_FIRST,
on). cool_fox 2b2b00fa, VIctory-NVIDIA feb90ade, through vilocity 83bcc2a. (Its s_min/s_max SCC half
was in Leonida already.)
- BCPack BC7: control bits 4:3 rotate channels in modes 4 and 5 only. fxceless/victory-fork 06702fe8,
through vilocity 4365d81. (Its dictionary half was in Leonida since trustno1 f9de61c5.)
- A constant buffer view made with no description is a null view, and a draw's table nulls that slot.
makmatvey, Marvisak/VIctory#2449, VIctory-NVIDIA 8d2d77c4, through vilocity 12cf6fb.
- XMemFreeDefault's 32-bit path tells the GPU side before it releases the reservation. ZigZagBoi1/
ScarlettPort 745d6f3, through vilocity ed024d5.
Findings: LEONIDA_WC_PARTS_NO_BACK measured and dropped (0.0 MB ever in such parts, d128);
LEONIDA_TEXTURE_HASH_BACKOFF measured by turns (frame -1.2 ms, submitting thread -2.75 ms, d118).
Tests: float_to_integer_conversions_saturate, scalar_shift_adds_set_scc_to_their_carry,
division_fixup_puts_zeros_before_a_nan_quotient (the whole valu suite, 44 passed, on an RTX 4060 Ti,
driver 616.64, and on WARP); bc7_rotation_is_only_of_modes_4_and_5; a_null_constant_view_replaces_the_
view_there_before (to run with the next build).
AI-assisted (Claude). Tested on an RTX 4060 Ti 16 GB, driver 616.64, Ryzen 5 7600X.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Indirect mesh dispatch records run as [X, 1, 1], as the console reads them (X alone). The terrain's tessellation
writes (X, 0, 0), which D3D12 drops: the near ground was in depth but missing from the G-buffer, black with white
specks on dirt and sand edges up close. The single clamp (indirect.rs), the batched one (indirect/batch.rs) and the
bench's (indirect/bench.rs); unfilled slots (X past 65,535) still run empty. From VIctory-NVIDIA 216bca9
(invismann), through voidopcode/vilocity 41bccf0 (GPL-3.0-or-later). Tests on WARP:
warp_window_leaves_unfilled_slots_empty_and_uncharged feeds (519, 0, 0); warp_batch_clamps_as_the_clamp_of_one_does
checks [X, 1, 1] for every mesh record; both pass.
- Launcher: the model emitters CS_Emit_Dynamic_Model_Skinned, _AttachMesh and CS_Emit_Dynamic_Model (particles from
a character's body) take the paired form (LEONIDA_PAIRED_FOR); translated alone none translates for 32-lane host
waves and all three do paired. After voidopcode/vilocity 324fe01, 4244b51.
- Launcher: the files of NVIDIA's shader cache a precompile writes are noted; if one is gone at the next start (the
cache emptied by hand, or a full one moved aside) the pipelines are made again instead of being compiled in the
game (runs d76, d96: up to 480 ms a frame waiting for pipelines).
- The line: "frames waited from the title's present to ours" each second (after vilocity c04fdd7): the latency the
line adds between the title and the screen.
- findings: the frame rate measured against the PC's own load (a restart brought back background programs: 17.3 ->
12.8 frames a second for one build); LEONIDA_WRITE_SITES measured on/off/off/on: faults -1,000 a frame, the frame
unchanged, left unset.
AI-assisted (Claude). Tested on an RTX 4060 Ti, driver 616.64, Ryzen 5 7600X, Windows 11 (Series X profile, 1440p).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Translator: with LEONIDA_NAN_SCRUB=1 the floats an image store writes keep an infinity, as on the console, and
only NaN becomes 0 there (LEONIDA_NAN_SCRUB_STORE_INF=0: held at 65504 as before). The water's plain transmission
volumetrics store an infinity for "no surface along this ray"; held at 65504 it was a surface 65 km off (a black
disc toward the sun). After voidopcode/vilocity 767369a (GPL-3.0). Colours a pixel program writes are held as
before. Test the_nan_scrub_keeps_the_integer_bits_an_image_store_writes (card and WARP) updated; it passes.
- Loader: dir64_relocations reads whole entries of a block only and no page whose entry's place passes 4 GiB
(after edsuuu/VI-BR-PORT df2b835d7); test a_malformed_relocation_block_gives_nothing.
- Textures: LEONIDA_TEXTURE_HASH_BACKOFF (off unless asked; by turns under LEONIDA_AB): a guarded texture whose last
4 looks behind the guard found it as it was takes one of every 16 of its turns (after kylepelham/El1xr d9fc89a4,
GPL-3.0). A frame hashed 38 to 40 MB of such textures and found 0.0 changes the guard had not seen (run d69).
Test a_quiet_texture_takes_one_turn_in_n.
- Diagnostics: a recorded frame's present time (frames-times.txt in the capture folder) and a log line when the
scripted keys change, for the time from a key to the first frame that shows it.
- findings: the busiest faulting stores are the kind LEONIDA_WRITE_SITES rewrites; its notes are keyed by the
executable's hash.
Four recorded tours with this build (runs d76, d77, d87, d96): no one-frame dark floor, no white flash; the plain
tour on a cleared driver cache (d96) has no one-frame glitch at all.
AI-assisted (Claude). Tested on an RTX 4060 Ti, driver 616.64, Ryzen 5 7600X, Windows 11 (Series X profile, 1440p).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Shader translator: an atomic subtract on group-shared memory (ds_sub_u32, or an add of 0 - x) is a
compare-exchange loop, in the plain and the paired lowering, as NVIDIA's compiler refused it (driver 621.40, the
rain particles' pipeline never made), from voidopcode/vilocity 5c8149f. Tests
lds_subtracts_return_the_old_value_and_subtract (the card) and lds_subtracts_are_atomic_across_waves (the card and
WARP) pass on an RTX 4060 Ti; a retranslation and warm-up (run d63) refused no pipeline.
- play-nvidia.ps1 names the two particle programs dropped in every run (5e3dd99e0f067aee, 57f1b81de55c2842) in
LEONIDA_PAIRED_FOR: translated alone with their reasons said, the paired form takes both (60 and 71 branches
taken wave-wide). Not yet seen in a tour.
- A view of a table read in place that the list brought up to date stays so while the list's epoch stands
(LEONIDA_ENTRY_ONCE, VIctory-lap 1d52e85; on): by turns of 4 s standing the frame's median -1.59 +-0.39,
-0.70 +-0.31 and -0.55 +-0.27 ms in three clean runs (d56, d62); a tour with it on (d60) flagged nothing new.
- The empty host lists a title list gets at its submission come reset and closed from the thread that recycles run
lists, not closed by the line's thread (LEONIDA_CLOSED_AHEAD, on; 3.6 % of the line's samples, profile
submit-d61): 77 % of them so in run d63.
- Off unless asked for, measured or to be: per-thread caches of table entries' views and placed views' shapes
(LEONIDA_VIEW_CACHE) and of placed textures found empty (LEONIDA_ALIAS_QUICK), VIctory-lap 242d0c6; tables made
afresh known by what they hold (LEONIDA_CONTENT_TABLES, the idea of crossducking/RAZDA4A-XEN's wave 15; two runs
said opposite things); a list keeping its dynamic slots' resources once (LEONIDA_KEEP_BY_LIST, VIctory-lap
1641cb6). Each counts itself on the frame lines.
- findings: what the submitting thread and the list threads do (profiles), the walls in run d54, the four switches'
runs.
AI-assisted (Claude). Tested on an RTX 4060 Ti, driver 616.64, Ryzen 5 7600X, Windows 11 (Series X profile, 1440p).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The note is info, not a warning: the launcher sets the cap by default on
PCs under 48 GB, so it shows on every one without resizable BAR.
- It names the real condition (GPU upload heaps: resizable BAR, and a
Windows and driver that offer them), as the doc comments do.
- mapped_windows asks for support only when a cap is set, so its "off" case
is the one the code takes, and the test checks that support is not asked.
- The launcher's history comment and the README say "unless the card has
under 6 GB" (an unknown size counts as large).
- The paired form takes a group of several console waves where every s_barrier is one each wave
passes once whichever way it goes (emit::barriers_on_every_way: the block dominates every end
and is in no loop); its LDS accesses are then fenced instead of waiting for the group, and it
lowers ds_read2st64/ds_write2st64, the atomics with the old value back and ds_cmpst_rtn_b32.
CS_DefragHeap_ComputeRelocations (02384a60fda6f2d0), dropped every frame before, now runs.
- A program named in LEONIDA_PAIRED_FOR takes the paired form before its own translation, so
the launcher's names reach the five programs that move the heap's blocks (they copy
overlapping 1 KB blocks, and in 32-lane halves one half stored over what the other had not
read yet: white blotches there). The launcher names all six.
- LEONIDA_DUMP_SIZE=<w>x<h>[,..]: only targets of those sizes are saved with
LEONIDA_DUMP_TARGETS (a frame renders some 380 targets, 61 at the screen's size; saving all
took 11 s a frame).
- docs/findings.md: what a timeline of three frames shows (the card idle 22 ms a frame behind
DirectStorage, texture refreshes and the submitting thread; 76 ms a frame of waits for the
guards' lock).
After voidopcode/vilocity add4873 (GPL-3.0-or-later).
AI-assisted (Claude). Tested on an RTX 4060 Ti, driver 616.64: the paired-form tests (18,
those that run on the card included) and a new one for groups of several waves; a warm-up
start and a recorded tour (runs d46, d47): the relocations and the mover in use translated
and bound, only the two particle programs refused, no removed device.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Picture:
- Cutscene faces with only their eyes and teeth since the LDS bounds: the 25 face programs
(the face network's operations, the normals rebuilt from blend shapes) keep their LDS
accesses unbounded, by name and in the cache's key (LEONIDA_LDS_BOUNDS_EXEMPT; trustno1-coder
9eb44fa6, Victorywillbeours222). Six of them run in the waterside tour.
- Copies and resolves into textures the title fills go back into title memory once their list
has run, only the subresources written and of them the 4 KiB pages that change
(LEONIDA_COPY_BACK, on; voidopcode/vilocity ee93826): a view the title places over that
memory was made from bytes the copy never reached (faces in blocks of colour, clothes in
another texture's). 9,216 copies (52 MB) in a run of 8 minutes; by turns the frame's median
-0.33 +-0.50 and +0.34 +-0.25 ms.
- A list's prelude leaves out its upload of a texture another list wrote on the host GPU and
submitted first (LEONIDA_UPLOAD_GUARD; trustno1-coder e530c003, aventureroestelar-source),
noted only while the texture is still the title's.
- A texture asked for as reserved (levels on demand) is no longer cut from the pool, where it
was never reserved and was made whole again (aki-gta6/aki-runtime ad214cd, KeethSmith).
- The launcher names all 33 programs the chain gave an approximate form in LEONIDA_PAIRED_FOR
(timing runs d39: 1.98 ms of card a frame against 2.31 for the eleven before; tours d37, d38
with nothing broken), and keeps device-removed data to the faulting address (d35: the card
83 % busy against 89 % with breadcrumbs, the frames alike).
Shader translator (one re-translation): global stores count as UAV writes for early depth
(trustno1 788fe236); a sum of high halves is not taken for a wave reduction (Bebrik229); SDWA
sign-extended selects; mesh loops leave at their own exit at the limit instead of a `ret`
(LEONIDA_MESH_LOOP_EXITS, trustno1 6bbb6bca); readers indexed once per lowering (trustno1
7cc0d153, 101Leafy); raw FSSM records (XDAT 0x0c) read (fuzeofficial, via MiniVI 96e788c7).
Submitting thread, by turns of 4 s standing (runs d41, d43):
- Two lock passes, off by default (`=1` on): slot writes past the heap's lock of placed views
(LEONIDA_SPANS_QUICK; Belobug a284ca7 via readmet3xt 96dfd9bb8, trustno1 #1937) and the
texture queue's lock spared by marks (LEONIDA_QUEUE_MARKS; readmet3xt-lab b377071). Here no
one waited for those locks: the submitting thread +0.12 to +0.30 ms a frame with them.
`crate::asked!` is `toggled!` off by default.
- 8 parts joined against 2 (LEONIDA_JOIN_PARTS_AB): with 8 the frame -3.09 +-0.51 and -3.03
+-0.26 ms, so the launcher's 8 stays. The write-watch asking joined across 8 MiB against
256 KiB (LEONIDA_ASK_GAP_KB, _AB): with 8 MiB the card -1.08 +-0.50 and -1.14 +-0.22 ms busy.
AI-assisted (Claude). Tested on an RTX 4060 Ti, driver 616.64: the named unit tests of each
port (shader 12, gpu 11, texback and resource 36), a warm-up start (the same three programs
refused as before, no device removed), the turns above and recorded tours.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
Title memory windows can only go to card memory the CPU maps when the card
has GPU upload heaps (resizable BAR, and a system and driver that offer it).
Without them the launcher still set 3072 on PCs under 48 GB of RAM and printed
"up to 3 GB", and every window asked the card's budget (two
QueryVideoMemoryInfo calls) before finding out the heap was not there.
window_mapped_for now checks for that memory first and logs once that the cap
does nothing. The launcher's line says the cap needs resizable BAR, and its
header and the README give the real default (under 48 GB of RAM, a card of
6 GB or more) instead of "under 24 GB".
- LEONIDA_PICKED_WRITES now 1 by default (0 off): buffers shaders write
through views they pick from the heap are declared, so no refresh puts
title memory's older bytes over them (aki-gta6/aki-runtime 975f161 turned
its own on for skinned characters' torn and flashing triangles). In turns
of 4 s standing it cost nothing to see (frame median -0.02 +-0.75 ms, card
+0.06 +-0.45, submitting thread +0.08 +-0.47) and found 60 of 575 buffers
so written; a recorded tour of 598 frames had no fault. LEONIDA_AB can
turn it now.
- LEONIDA_PARTIAL_WRITTEN (on): a partly mapped texture is read again the
frame after the guards see a write to it, not up to 30 frames later (blocks
of noise on a close-up's shirt there). Moving, in turns of 4 s: frame
median -0.45 +-1.58 ms, card -0.47 +-0.44. After trustno1-coder/
VIctory-NVIDIA dbba4ad7 (101Leafy).
- LEONIDA_PAINTED_EVERY (8 frames): a texture picked by index that a look
found changed with nothing told of it is looked at on that beat for good,
and at its memory under any slot. After trustno1-coder/VIctory-NVIDIA
cbf5d68d and 76db3ec3 (Chris James).
- Whether a copy is asked about ahead is noted when its list closes
(Fronts::watched) instead of asked of every copy at every submission.
After ReZOnGithub/VIctory-lap 2a31a14.
AI-assisted (Claude). Tested on an RTX 4060 Ti, driver 616.64: unit tests
(partial_due, front_tests) and the A/Bs above.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The BC7 dictionary's entries are read with all 32 index slots in order: in
every entry but the first, the word after the index widths (the widths again)
is pixel 0's index. The decoder skipped that word, so every stored index sat
one pixel early, and a block predicted from a wrong entry was wrong, as was
every block predicted from it in turn.
Each reading passed its own unit test, so it was settled against Microsoft's
decoder (the GDK's BCPack.dll, used on this PC only, never in the repository):
the title's own streams, saved as DirectStorage hands them over with the new
LEONIDA_BCPACK_DUMP=<folder> (local only), were unpacked by the DLL and by
this decoder. Of 381 BC7 streams (2,866,176 blocks), 2,101,646 blocks were
unlike the DLL's before and none now. BC1 (400 streams), BC3, BC5 (120) and
BC6 were alike already. (Blocks packed by the DLL's own compressor never use
the dictionary, which only blocks before a stream's 255th can reach.)
After trustno1-coder/VIctory-NVIDIA f9de61c5 (GPL-3.0).
AI-assisted (Claude). Tested on an RTX 4060 Ti, driver 616.64: leonida-formats
unit tests, and the comparison above.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
From ReZOnGithub/VIctory-lap (GPL-3.0-or-later), each with its switch, on as
there, and its check mode where it has one:
- LEONIDA_LIST_FRONTS (0ced255): what a list's steps refresh is found once,
when the list closes, instead of twice per submission on the submitting
thread. Standing: that thread worked -0.81 +-0.27 ms a frame.
- LEONIDA_FRONTS_LEAN (91ca3fd, with 9ea4cac's single-list join): the fronts
joined without a table of their copies, let go on the reaper. -0.68 +-0.27.
join_keys now folds a refresh of no bytes as front_spans does; the test
covers such refreshes.
- LEONIDA_SEND_TAKE_BESIDE (003e55a): a submission's own bytes copied on the
kept threads while its list is recorded, waited for before it closes.
-0.54 +-0.33. (shadow::wide split into wide_queue and wide_help.)
- LEONIDA_HURRY (ac97e48): what the submitting thread stands at is translated
first, above normal. It never fired here; on for scenes where it does.
Check modes, moving: 78,426 fronts and 21,883 takes (49.6 GB) compared, 0
that differed.
LEONIDA_SCRATCH_CARD: lists' scratch memory (tables' constant buffers made
afresh, root constant buffers, the batch pass's job table) in the card's own
memory the CPU maps (GPU upload heap) instead of upload memory in the PC's,
whose every first read crossed the bus. Card busy -1.70 +-0.41 ms a frame
moving, -0.92 +-0.44 standing (frame mean -1.47 +-0.65). On where the card's
budget is 9 GiB or more.
A/B phase lines now give the card's busy time and the submitting thread's
work a frame; LEONIDA_PICKED_WRITES can be turned by LEONIDA_AB.
AI-assisted (Claude). Tested on an RTX 4060 Ti 16 GB, driver 616.64, Ryzen 5
7600X: named unit tests, both check modes in play, A/Bs moving and standing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Frame generation (G-buffer path): the title also fills a 960x960 pass that looks like
its G-buffer (a probe's), and the pass recorded last was tagged, recorded at once on the
thin threads before the present of the frame before was served: four switches in four
seconds standing, each a generated frame from another pass's depth and motion vectors.
Now each host list carries the pass it bound to its submission (HostList::mark_gbuffer,
taken in Host::submit), and a present tags the largest one submitted before it; a frame
whose only such pass is under half the last one's area keeps the last. Standing with 2x
(2026-11-29): no switch in the whole run, the probe pass passed over twice, the picture
without the interface tagged on 300 of 300 presents.
XMemVirtualAlloc logs the protections of placeholder parts too (it returned before): the
title's 32-bit graphics heap is five parts, GPU read-only, write-combined executable,
garlic and cached GPU read-write.
Diagnostics (no change unless asked for):
- LEONIDA_INDIRECT_RUNS=1 counts the title's indirect executions by what comes between
them: 13,000 a frame, all of one record with no count buffer, between two of one
pipeline 1.7 tables, 0.9 views and 0.9 constants set.
- LEONIDA_AB switches LEONIDA_EXP_EMPTY_INDIRECT (an empty execution after each mesh one:
+0.67 +-0.77 ms, so merging executions would save nothing), LEONIDA_EXP_MESH_SKIP
(every mesh draw left out: -7.7 ms median of 38 pairs, the frame still about 50 ms,
held by the submitting thread) and LEONIDA_EXP_MESH_ONE_PIXEL (-0.3 +-0.3 ms).
docs/findings.md: where the frame goes at the launcher's default (card 56 ms, submit
thread 55-65 ms, 530-600 ms of CPU a frame), what a copy-free native runtime would
change (D33T0X/Native-Runtime compared: 0.4-0.83 s world frames in its own notes),
copy-back elision (446 ms a frame of list steps here, nothing elided) and card-side
windows (57.0 -> 66.2 ms) measured and not taken, and the defrag program still refused.
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>
On Series X the title presents one plane with its interface drawn into it, so frame generation had only the
picture with the interface and dragged it along in the generated frames. Before the title's interface composite
(one triangle, one instance of vertex 0602c2384acbb3b2 and pixel a78d088fa55aa495) into a texture it presents, the
plane is copied into one of two textures of ours in the draw's list (one copy a list, the list marked); when that
list is submitted the copy is noted, and the present after it tags the first copy of the presented texture as
kBufferTypeHUDLessColor (eValidUntilPresent, a copy's destination, the plane's size). A present with tags and no
copy removes an older one with a null tag. LEONIDA_FG_HUDLESS (on; 0 off); while frame generation is off (not
started, or the amount at 1) draws ask one atomic and nothing is copied or made. Log lines: "the picture without
the interface" (first copy, first tag, the textures made, and every 300 presents copies, tagged, missing,
overwritten, composites, others).
Ported from trustno1-coder/VIctory-NVIDIA 1d0fa87 (GPL-3.0-or-later): its streamline.rs INTERFACE_COMPOSITE,
before_target_draw, hudless_texture, hudless_submitted, hudless_for and draw.rs before_shown_target. Unlike it, a
copy whose texture of ours a later copy went into before its present is not tagged.
Tested: the new fg::hudless_tests (composite match, the copies' bookkeeping, presented textures, the switch) and
cargo build --profile diag -p leonida --features diagnostics,dlss,mimalloc. Not run in the title yet.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Measured with the merged build at the waterside save: masked pipelines made and used, 28 to 30 refused pipelines as
without it, none for memory, no device removal, nothing broken in the picture (two starts of the branch, one of the
merge).
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>