AI-assisted (Claude). Tested on an RTX 4060 Ti (driver 616.64), Ryzen 5 7600X: runs d246 to d251.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AI-assisted (Claude). Tested on an RTX 4060 Ti (driver 616.64), Ryzen 5 7600X: tours d240 to d242 against d233.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The NVIDIA driver compiles DXIL under fast math and may fold a float compare's NaN case away. The title's NaN
guards are such compares (v_cmp_u_f32 x, x; v_cmp_neq_f32 x, x), lowered to fcmp uno / une; a NaN that passes
one reaches the temporal filters, where it spreads as black blocks that grow frame by frame. Every
v_cmp_*_f32 / _f16 but f and tru now tests both operands with the integer check is_nan_f32 already used
(|x| > the bits of infinity): ordered compares are the ordered compare and no NaN, unordered ones the ordered
compare of their sense or a NaN, o and u the NaN test itself, so no unordered fcmp is left. The NaN of
v_cvt_u16_f16 / v_cvt_i16_f16 is found the same way, and so are the NaN and infinity tests of the scrub of
colours and image stores (LEONIDA_NAN_SCRUB), which were unordered compares too. LEONIDA_NAN_EXACT=0: as
before. The shader cache keys on the switch (translation_fingerprint).
Ported from voidopcode/vilocity 598050b (INFIERNOXIII, GPL-3.0-or-later; after the Whiplash-NVIDIA team's
nan_exact), written into Leonida's lower.rs; the scrubs are ours.
Test: float_compares_with_nan_on_the_device (the fourteen compares other than f and tru against quiet,
signalling and negative NaNs, infinities and signed zeros, on the RTX 4060 Ti and WARP; f and tru are left out:
WARP's device is removed at a dispatch of an fcmp false). The existing NaN tests (v_cmp_lg, med3, the 16-bit
conversions, the scrub's integer bits, division fixup) pass with the switch on. docs/switches.md made again.
AI-assisted (Claude). Tested on an RTX 4060 Ti (driver 616.64) and WARP: the named tests above.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each list of a standing frame's operations given the queue it was submitted to, and each operation weighed by its
kind's card time in a timing run: the drawing queues about 50 ms, the compute queue 1.6 ms. Running the compute
queue beside the drawing one, as the console does, could overlap no more than that.
AI-assisted (Claude). Tested on an RTX 4060 Ti (driver 616.64), Ryzen 5 7600X: run d239 against timing run d183.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
By turns of 4 s standing at 1440 lines with no frame limit (run d237, LEONIDA_FG_TURNS): the frame +5.82 +-0.43 ms
by medians, p90 +10.25, the card +6.76, with DLSS 4's generator (nvngx_dlssg 310.9.16).
AI-assisted (Claude). Tested on an RTX 4060 Ti (driver 616.64), Ryzen 5 7600X: runs d236, d237.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A recorded tour scanned with motion taken into account has no one-frame flash in its rendered frames (only the
title's fade of the player as the camera swings into him). Through a tour the RTX 4060 Ti holds 2,715-2,730 MHz,
its memory at its most, 101 W of 165 W, the memory controller at 37 %. Every wait for earlier shader writes left
out by turns (LEONIDA_BARRIER_WAITS) takes 1.73 +-0.81 ms off a 75-115 ms frame.
AI-assisted (Claude). Tested on an RTX 4060 Ti (driver 616.64), Ryzen 5 7600X: runs d233, d234, d235.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Recorded with the shown-frame capture: generated frames across the pause menu were made along stale vectors
(fixed by the resets of daa3f47a9: 6 generated frames in the menu phases against 204, the world's unchanged);
the G-buffer's motion vectors are pixels pointing back, as frame generation is told (a warp of each dumped
frame fits best at m = +1); and what ghosts in camera sweeps is the 70 to 120 ms between rendered frames.
AI-assisted (Claude). Tested on an RTX 4060 Ti (driver 616.64), Ryzen 5 7600X: runs d227 to d232.
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>
`Bools::given(b, known)` restricted `b` by every atom `known` decides. It
found them one atom of `b` at a time: for each, build the conjunction of
`known` with the atom's negation (and with the atom) and compare it with
0. In `structure::finish`, which calls it for every block's guards,
branches and mask joins, that was 97 s of 114 s of a full-corpus
translation's 330 s of structure time (1.52 million calls, 5.4 million
atoms, 10.7 million `implies`).
What `known` decides is a property of its nodes alone: the literals that
hold on every path to 1. `Bools::forced` finds them in one pass over the
condition (a node's are its children's intersection, or the one child's
plus its own atom where the other is 0), and keeps them per node for the
later calls on the same condition (bounded, then it starts over); `given`
applies them to `b` in one restriction. Where nothing satisfies `known`
every atom of `b` is decided both ways and the old code took them as
true: kept (b at all-ones). The result is the same function, so the same
node.
- given_as_the_forced_literals_of_what_is_known_gives_what_testing_each_atom_gave
keeps the old algorithm as the reference and compares it with `given` for
every pair of 72 random functions (conjunctions of literals among them,
and the constants), and checks `forced` against `implies` for every atom.
With the intersection's comparison of values left out it fails.
- `restrict` (one atom) is only the test's reference now: cfg(test).
- docs/findings.md: where the translator's time goes, by stage and by size.
Output unchanged: `leonida translate` over the whole archive, the DXIL of
all 25,689 emitted programs (15,799 distinct) hashes the same in 4 runs of
the new build and 5 of the old. Wall clock 65.2/65.1/65.1 s -> 59.4/59.5/
61.6 s, CPU 890/894/889 s -> 818/820/821 s (Ryzen 7 7800X3D, 16 threads,
--release, alternating).
AI-assisted: Claude Sonnet 5.5
Co-authored-by: Cursor <cursoragent@cursor.com>
Timelines of run d216: the chain is the title's threads, our list threads' ExecuteIndirect calls and, in other
frames, DirectStorage's inflating and threads waiting for a core. LEONIDA_VIEW_CACHE, LEONIDA_CONTENT_TABLES and
LEONIDA_ALIAS_QUICK by turns (d217, d218): none moves the frame; they stay off.
AI-assisted (Claude). Tested on an RTX 4060 Ti, driver 616.64 (Windows 11), Series X profile.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Runs d214/d215 (the list ahead recorded by one thread, sampled the same way): the textures' part 4.64 -> 3.40 ms a
frame, the walk for due slots 2.6 -> 0.3 % of the thread's samples, the whole list 8.98 -> 7.80 ms.
AI-assisted (Claude). Tested on an RTX 4060 Ti, driver 616.64 (Windows 11), Series X profile.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
LEONIDA_INDEX_HEAP_SPANS by turns on the merged build (d212, d213): the frame's median -1.64 and -1.61 ms. With
LEONIDA_BATCH_WHY=1 (d211): 785-841 of 926-988 batches a frame end for programs that store through views they pick
from the heap, the culling passes that write the records first.
AI-assisted (Claude). Tested on an RTX 4060 Ti, driver 616.64 (Windows 11), Series X profile.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
draw.rs: heap_buffer_pass takes main's snapshot of the spans (SweepState with the indexed backend, d367675c7);
this branch's change to the legacy backend's parts (a slot that shows each copy, 2a1e66b15) stays under it.
heap_range_tests and heap_sweep_tests pass.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Runs d204/d205 (the standard tour at 23:00): no torn frames either way; the card's steps stay. Profile list-d207:
ExecuteIndirect is binding, and over half the list threads' contended waits were the placed textures' one lock;
LEONIDA_PLACED_SHARDS by turns (d209, d210): the frame does not move. Profile ahead-d208 against ahead-d201: the
spans' holds were not the pass's cost; the walk over the parts' slots is.
AI-assisted (Claude). Tested on an RTX 4060 Ti, driver 616.64 (Windows 11), Series X profile.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Timelines of run d200: the frame comes out of the title's threads (22-30 ms a frame), its own Sleeps, our list
threads' calls and the host's Present more than out of the submitting thread; the card busy 96-99 % by our count.
LEONIDA_METER_BESIDE by turns (d202, d203): no change to the frame. Profile ahead-d201: the copies' spans are most
of the list ahead's own work.
AI-assisted (Claude). Tested on an RTX 4060 Ti, driver 616.64 (Windows 11), Series X profile.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Runs d187/d188 (latency.py over every presented frame, standing): median 351.9 ms with frame generation, 310.0 ms
without, the first moved frame the third presented after the key in both. Runs d189/d190 (-RayTracing): the deck's
shadows and the water look right, the frame 158-217 ms (79-267 ms of it on the card), so it stays off by default.
AI-assisted (Claude). Tested on an RTX 4060 Ti, driver 616.64 (Windows 11), Series X profile.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The launcher column saw one way of assigning of four, three kinds were wrong,
names read by turns through a constant, a function or asked_for! were missing,
and test modules with a brace in a raw string were cut short. measuring_fps.md
now says how to give LEONIDA_AB to the launcher and what GPU_TIMING and
PROFILE need.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
d3d12/docs/findings.md was reachable from d3d12/README.md alone, so a night of
runs repeated measurements it already holds. Index it, point AGENTS.md at it,
say how to measure (a switch by turns inside one run), and list the variables
the runtime names from its own sources: 415 of 669 were in no Markdown file.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
And what a stable 30 frames shown with frame generation asks: 15 rendered, 66.7 ms a frame, against 71-79 now.
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>
The card 49.8 -> 51.5 ms a frame with LEONIDA_MESH_COUNTS=1, the six heaviest mesh programs the same or slower.
Left off.
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>
Quick window finds, renderer port 2 and scoped copy forgetting together save about a millisecond here (2-3.4 ms
each on the RX 6800); kept on. Wider views and records pools do nothing, half the processors refreshing copies
makes the frame slower, the list ahead split in two saves about half a millisecond.
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>
The submitting thread works 68% of its samples and waits 32%, half of the waits in the list ahead of each frame
(the views' pool), while our helper pools stand idle (94.6-99.9% of their samples waiting) and the six list threads
are busy 76%, the tables and views a sixth of it. Next: main's wider pools by turns, then views kept past a
recording.
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>
Runs d155, d174, d175, d194 (test build of fix/upscale-alias, not merged: the alias it reads through is not there).
The stretch in DLSS's place gives the same black world; the colour input is no texture placed over another target
and holds the lit world at the end of a frame; the title renders to and writes no texture of the output's size
(3840x2160) in a frame. Leads: the title's upscaler is made for its shipped 1280x720 to 1920x1080, and the frame's
op list stops before the lighting and post-processing.
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>
- LEONIDA_ALIAS_CAST (PR #2660) by turns of 4 s standing, two runs (d156): the card -1.73 +-1.38 and -1.31 +-0.30
ms a frame, the frame's median +0.34 +-0.32 and -0.46 +-0.32 ms: the frame waits for the submitting thread here.
Kept on.
- After chain30's build (new translations) the pipelines not made within their 10 s wait were 10 in the second
run, 55 in the third and none in the fifth and sixth; two timelines of the third run each hold a frame of about
10 s spent on one pipeline worker. Measured runs come after tours.
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>
All 1,078 mesh programs of recent runs are console wave64, and their translations
pay nothing for it on 32-lane hosts: no group-shared memory, no barrier, no ballot,
no exchange between host waves; the only wave operation is WaveReadLaneFirst. So a
paired or wave-wide form has nothing to take away from them (docs/findings.md).
What the translation did pay: the counts were the declared maxima (128 and 128 for
the heaviest), with every slot culled first, so the host's primitive stage takes
every slot of every group. With LEONIDA_MESH_COUNTS=1 the counts are the program's
allocation request: M0 is made again in the deepest block before the request that
every thread runs once and that comes before every export, the group's first thread
gives it to the group through one group-shared dword and a barrier, and outputs past
the counts are not written. A program without such a place keeps the maxima
(LEONIDA_WAVE_WHY=1 says why). Without the switch the emitted modules are unchanged.
The shader cache keys on the switch (translation_fingerprint lists every LEONIDA_*
switch the translator reads; a test checks it is listed).
Tests: the place and the chain on hand-written programs; dxil.dll's validator; on
WARP a group that asks for no primitive draws nothing, as on the console.
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>
- play-nvidia.ps1: LEONIDA_THIN_THREADS=6. Two of eight list threads parked by turns of 4 s (LEONIDA_THIN_PARK),
standing at one save, two runs: the frame's median -0.83 +-0.16 ms (d69) and -0.94 +-0.52 (d73), the
submitting thread -0.49 +-0.12 and -0.74 +-0.62.
- findings: the fault handler is entered 2,400 to 2,950 times a frame, of which some 2,000 are single stores done
beside the guards, most of them storing what the memory already holds; the loader's rewrite of such places
(LEONIDA_WRITE_SITES) is not set by the launcher and is the next thing to measure.
- findings: the copies behind aliased views could go with relaxed format casting (driver 616.64 has it).
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>
- LEONIDA_KEEP_BY_LIST is on (ReZOnGithub/VIctory-lap 1641cb6): by turns of 4 s standing (runs d65) the frame's
median -1.33 +-0.58 and -0.51 +-0.25 ms, the submitting thread -0.51 +-0.28 and -0.53 +-0.15; the closed lists
from the recycling thread -1.33 +-0.58 and -0.44 +-0.25 by the same runs (on since the last commit). A tour with
it on (run d66): no device removed, every texture whole, the flagged frames the same kinds as without it (the
newly shown deck's dark frame, the camera's cuts), and no program of the title untranslated any more (the two
particle programs paired).
- LEONIDA_THIN_PARK (off unless asked for; by turns under A/B): the last LEONIDA_THIN_PARK_N (2) of the threads that
translate lists sleep, to measure six against eight in one run; the title's threads wait for a core on the frame's
chain (timeline d59, 3.2 ms a frame).
- findings: the particle programs in the game; switching LEONIDA_ASYNC_SUBMIT off by turns ends the title (run d67).
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>
- Shader translator: a float maximum or minimum with a constant that is not a zero leaves out the test for two
zeros (LEONIDA_MINMAX_NONZERO), and the median of a value and two normal constants is a clamp
(LEONIDA_MED3_CLAMP), from trustno1-coder/VIctory-NVIDIA d08360e3 (mizzied). Both store the same bits: test
float_max_min_and_med3_with_constants_store_the_same_bits_rewritten, on the card and on WARP, over signed zeros,
denormals, NaNs and infinities. Retranslated and warmed in run d53 with no failure.
- play-nvidia.ps1 sets LEONIDA_PORT_GUARD=1 (renderer port 6): in turns of 4 s standing (runs d50, 147 phases) the
frame's median -0.47 +-0.18 ms, the submitting thread -0.58 +-0.11.
- DirectStorage requests are told apart in a timeline: reading the source, inflating, unpacking BCPack.
- findings: the present smoother costs nothing by turns (runs d52: frame median -0.14 +-0.42 and -0.33 +-0.34 ms,
the jitter of the title's presents from a median of 8.7 ms to 6.6 and 7.5); where the two walls stand.
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 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>
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>
- 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>
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>
XMemVirtualAlloc reads the console's GPU bits of each protection: memory the GPU reaches
without writing it (PAGE_GRAPHICS_NOACCESS, _READONLY, _EXECUTE, _EXECUTE_READ: three
parts of the title's 32-bit graphics heap, 38 MB) is told to leonida-gpu
(title_memory_gpu_read_only). Shader writes declared over it can be nothing on the
console, so Shadow::gpu_writes leaves those parts out of what is kept, compared, fetched
and landed (LEONIDA_GPU_READ_ONLY_NO_BACK, on; 0 as before). Standing at the waterside on
an RTX 4060 Ti: 1,340 MB a frame were declared there, and in turns of 3 s (23 phases)
the frame was 0.76 +-0.72 ms shorter without them (means 1.29 +-0.79). The frame line
counts both. Tests: gpu_read_only_parts_of_a_range, gpu_read_only_protections.
HostHeap::keep_ref: a slot that already holds the resource takes no reference. The
callers cloned it first and it was given back at once: two atomic changes of a count
every list thread changes (keep and the COM counts were 9 % of the list threads'
samples).
LEONIDA_BATCH_DESCRIPTORS (off): a table's listed-view copies in one CopyDescriptors
call, after PL-VIP/sureVI 60cc6e4 (GPL-3.0). In turns of 3 s (66 phases) the frame was
the same (-0.01 +-0.31 ms), no device lost: the list threads have room (43 % of their
samples wait), so it stays off. docs/findings.md: the list threads' profile.
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>
Since 2026-11-27 07:27 every run logged "no stand-in for the indirect light:
missing depth SRV role=Resolve" and never ran the resolve's stand-in: the view
the resolve binds where its depth was (table offset 464) is the stencil plane,
so rooms lit by bounced light (Jason's house, every interior away from its
windows and lamps) kept the title's ray-less output, walls and ceilings black.
Now, where that view is a stencil plane, the depth plane of the same texture
that the same dispatch reads elsewhere is taken (after TaynanGT's 292adb5a8 in
Fayberr/Victory-United, GPL-3.0); the log names where it was found.
LEONIDA_AMBIENT_FLOOR=<level> holds the estimate at least at a warm fill,
shaded in creases (DoubleGhosty/cool_fox 98c3333, VICTORY_AMBIENT_FLOOR,
GPL-3.0-or-later); the estimate follows only the light visible surfaces send
out directly. Unset or 0: no floor. The estimate's NaN guard comes with it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The pool of the commit before (after trustno1-coder/VIctory-NVIDIA
95509b9) turned on, as its measurements say (RTX 4060 Ti 16 GB, driver
32.0.16.1664, Ryzen 5 7600X; Series X 1440p from waterside-1125, frame
generation off):
- walking and turning, A/B of 4 s phases in three runs of 46 pairs: the
frame -1.5 ms (+-1.1) by means and by medians, of 80 to 84 ms, every
run the same way; the threads that translate the title's lists spend
14.5 ms a second making buffers where they spent 238;
- standing, a level for each view: medians -0.66 (+-0.48), means -0.46
(+-0.51) of 70 ms;
- memory, a walking run each way: private 30.5 against 30.9 GB on
average, left to commit 2.0 against 1.8 GB.
A row for it in docs/findings.md. LEONIDA_AB can still name it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Standing A/B against 1: -2.15 ms (+-0.39) with 4, -3.77 (+-0.38) with 2;
walking -1.64 (+-1.55). The batches 4 still ends are the bindless programs (the
meshlet culling passes, CS_RaytracingResolve). Recorded frames: 489 with 1, 1,186
with 2, 1,116 with 4, no sea fault found in any.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>