174 KiB
What was learned on the RX 7900 XTX (2026-11-23 to 2026-11-25)
One PC: i9-12900K (8 fast cores, 8 slow ones, 24 threads), 64 GB, Radeon RX 7900 XTX 24 GB, Windows 11, 1440p, Series X profile. Figures are of diagnostics builds with a screenshot a second. Scenes are not the same from run to run, so read differences under about 5 % as nothing. What a switch does is in the comment where it is read.
Where a frame goes
Median of whole runs, same part of the prologue: 280 ms, then 124, 103, 75, now 46-65. On the water (first boat mission) 46-53 ms.
The title needs 33 ms. Of a 55 ms frame on the water:
- The thread that prepares submissions: 48 ms. It is the wall. Steps of the lists 18 (refreshes of host copies 10), steps done on the card 7, waiting for descriptor records 6, asking the write watch 5, copies in the card's memory 4, the title's bytes under shader writes 4.
- The card: about 41 ms busy, the next wall.
- List calls: 36,000 a frame, 230 ms of work spread over eight threads. In a street chase 67,000 calls and 430 ms.
- Descriptor records copied as plain bytes: 400,000 slots looked at, 40,000 mirrored a frame, most of them empty.
- Landing what shaders wrote: 16 MB a frame put as dwords, on a thread of its own.
The one idea behind most of it
On the console the CPU and the graphics processor share memory. Here they do not, so everything one writes and the other reads must be noticed and moved. Every large cost is one of four: noticing writes of the title (write watch, guards), noticing writes of shaders (hashes on the card, compares on the CPU), moving them, and waiting until an order is safe. Gains came from making each of them narrower (dwords, not pages), wider (threads, AVX2) or later (on the card, behind the frame), in that order of size:
| What | Frame before | after |
|---|---|---|
| Descriptor records of draws' tables left to the draws | 280 ms | about 124 |
| Our hash passes over card copies, 64 threads a piece | card 79 ms | 66 |
| Preparing on a thread of its own, refreshes and records spread | 103 | 75 |
List calls written down and translated by eight threads (LEONIDA_THIN) |
75 | 68 |
| Submissions joined, card steps, textures sent ahead | 68 | about 63 |
| Title bytes under shader writes compared with AVX2 on six threads | 14 ms of it | 4-7 |
| Stores into guarded memory looked at first, fewer guards reset | 69 ms of threads' time | about 6 |
(Each figure is from the run in which it was measured; they overlap and do not add up.)
Faults found, and what they were
- Boats sank, the sea plane went under. The ocean's height and displacement maps are
textures that compute passes write and the title's physics sample on the CPU. They were
never brought back to title memory. Fixed by Geckomacabre's read-back as merged in
fxceless/victory-fork f5c03f3b; on by default here (
VICTORY_TEXTURE_BACK=0: off). With it the boat stays up through a whole run; without it sank in every one. - A device loss about every 16 minutes: a page fault inside a texture made in the same
tenth of a second. A slot showed it before its upload had run.
LEONIDA_SHOW_AFTER=1; none in the sessions since (likely fixed, not proven). - A rare lost write (6 of 200 runs of a stress test): a view was mapped between our look at its guards and our lock, and views were opened one after another. None in 603 runs after.
- Blocky patches: indirect dispatches cut at 65,535 groups. An AMD card was given what the
title asked from the start; every other card stayed cut until 2026-11-27. On an RTX 4060 Ti
at the save (Series X, 1440p) the first tile list (
CS_FinalGather_0_1_1_0) asked for 85,856 to 86,544 groups of 8 x 4 pixels: its last 20,300 (2,540 tiles of 16 x 16, the lower left of the picture behind a stair-stepped edge) got no final gather in any frame, so the railing and the character's legs there looked see-through under a displaced copy of other railing. The card runs such dispatches whole (65,536 to 2^20 groups, each once under its own number), so a card is now asked once a run, with one dispatch of 2^20 groups of a program of ours (indirect::runs_wide; 75 ms with its compile), and given up to 2^20 groups where it runs them;LEONIDA_INDIRECT_WIDE=0cuts as before. What is still cut is said in the log ("indirect dispatches: the most groups in x one asked for ..."). On the card the list's dispatch went from 0.75 to 1.2 ms a frame (LEONIDA_GPU_TIMING=1). A form for a card that does not run them (the groups folded into rows, the program told its grid) is not written: a command signature that sets root constants from the record costs this card 1.4 us a command against 0.08, and some 1,800 indirect dispatches a frame would need it. - Square holes and dashed edges in shadows: pixel shaders that read their quad's neighbours with wave reads; on AMD helper lanes take no part in them.
- Cube reflections too blurred, wrong materials: DXIL's
Logis base 2, and normalized buffer codes were one step off. - Every ray missed: the dispatch flag that says counts are threads, not groups.
Measured and not worth it
- Unordered early pipelines for everything (AMD's compiler crashed).
- Series S profile, smaller textures, a second drawing queue,
ASYNC_SUBMIToff. - Mapping pages on sixteen threads: no more pages mapped, frames longer.
- Scalar buffer loads four dwords a call (
LEONIDA_SHADER_OPT=511): no gain on this card. - Wave sizes, fused multiply-adds, fast reciprocals, raw picked buffers, leaving out
barriers: nothing to 0.1 ms each. Exact RDNA float rules (
LEONIDA_RDNA_FLOAT): 0.8 ms. - Running the console's shader code natively on the card: the Windows driver takes no raw code, the two generations differ, and a Vulkan host layer ends at the same compiler. What is left to gain from shader code was guessed at under 1 ms.
- An on-screen panel of numbers (
LEONIDA_PANEL): it helps finding where a frame goes but costs some, so it is off and F3 shows it.
Translated compute programs on an RTX 4060 Ti (2026-11-27)
Counted offline over the 2,703 compute programs of the title that translate (the
translate_cdxil example: --census, the NVIDIA host settings, every translation also
through dxil.dll's validator). The card time of a frame barely moves between 1080p and
1440p, so what counts is per group and per command, not per pixel. What the clean-up and the
wave64 forms took out, as instructions of the written module and group barriers:
- Exchanges of a console wave64 program in two host waves of 32 that run once
(
LEONIDA_EXCHANGE_SITES, dwords of their own, one barrier): barriers 10,643 -> 9,156. - A first-lane read of a load from a read-only view at a lane-uniform address needs no exchange
(
LEONIDA_UNIFORM_LOADS): 9,156 -> 9,108. LEONIDA_SHADER_OPTbit 128 (a value kept for the lanes a guard leaves out, read only where the guard holds, is its new value): guard selects 488,284 -> 281,592, instructions -1.5 %.LEONIDA_SHADER_OPTbit 256 (a conjunction of lane conditions with its terms in the order they were made, so the enclosing branches' share is one value).
What is left, by size: exchanges inside loops (two barriers each: about 110 of the 134 barriers
of the 8 x 8 material program 1f1fbd86759b3da2 are in loops), the entry ticket of every
console wave64 program with lane code (a group barrier and an LDS atomic, also for groups of
one dimension, where the host's waves are runs of consecutive ids), descriptors made again in
every branch of a program (createHandleFromHeap of an index that is a root constant plus an
offset, behind a branch on a load), and reads of read-only views repeated in blocks that
follow one another (70 of 118 in 922e1d0ee1e19a85).
Console wave64 programs a 32-lane host refused: the water's tiles and the culling program (2026-11-27)
26 of the 2,734 compute programs of the title were refused on the RTX 4060 Ti ("no wave32
lowering for this wave64 program") and every dispatch of them was dropped. Five were taken
apart with LEONIDA_WAVE_WHY=1 and translate_cdxil; what each trips on, and what takes it now:
5dc3b25986622949,6f225b641c5b0708,926c46bab3b86bd6(the water'sCS_TransmissionVolumetrics; 8 x 8 groups of one console wave, 512 bytes of LDS), and four more that trip on the same thing (2889c21328c69e58,6871d6e4b3ac9a10,888af37a584acf98,a10179ab7eda0dc3; all seven were taken for one family, but by the entry points in their containers2889c21328c69e58isCS_GenerateShadowMasks_SampleHairScreenSpaceand888af37a584acf98CS_GenerateShadowMasksHairOnly_SampleHairScreenSpace, the sun's shadow mask where hair is sampled on screen, which the NVIDIA launcher dropped with the water's fromcef91163buntil it was noticed): a lane's early return (s_and_saveexecands_cbranch_execz) around code that writes and reads LDS (ds_write2_b32,ds_min_u32,ds_max_u32,ds_read2_b32, at0x230and0x404-0x4c4of the first) and takes wave reductions and first-lane reads where not every lane runs. Thread (0, 0) stores the tile's starting maximum and minimum after those returns. Taken by the branches wave-wide, and bylds_init.6b82bc7d22016cb5(culling, 1,024 threads in one dimension, 32 KiB of LDS; its sibling6832a9da15c2e584too): LDS read and written in lane-branch regions (thread 0's read-modify-write of a counter at0x36dc-0x3704; the allocation loop's bitset read andds_add_rtn_u32at0x39c4-0x3a14); a reservation by an LDS atomic, which the allocation idiom did not know (only buffer atomics); and one LDS dword over D3D12's 32 KiB (LDS-OVER-32K: the dword ofwave_base's counter, and two exchange dwords for each console wave, of a program that has all of the 8,192 dwords itself). Taken bylds_exact, the idiom fords_*atomics and no counter.02384a60fda6f2d0(token compaction, 128 threads in one dimension, two console waves): not taken, see the end.
Wave-wide branches. The console takes a branch on EXEC for the whole wave of 64: the body
runs unless no lane is left. emit has had that form (widen: each host wave asks its lanes,
the halves exchange the answers, so both go the same way and can meet inside) behind
LEONIDA_WAVE_WIDE=1. It is exact, so it is now the last form tried for an 8 x 8 group (after
every other one, the approximate ones too: no program that translated before changes; 4, 6 and
20 branches of the three programs above are taken so, every lane running the code with its EXEC
bit clear where it has no work). LEONIDA_WAVE_WIDE_LAST=all takes the 1-D groups of 64 as well:
13 more programs of the title translate and validate that way (2-30 KiB of LDS), but none has run
on a card yet and runs 121-124 lost the card with the form on for the light atlas's programs, so
they stay refused; 0 takes none, LEONIDA_WAVE_WIDE=0 turns the form off everywhere. With the
form on from the start (LEONIDA_WAVE_WIDE=1) 33 programs that translate without it change,
which is why it is not the default.
LDS starts (lds_init.rs; LEONIDA_LDS_INIT_HOIST=0 off). Every lane ds_max_u32s and
ds_min_u32s its key into two dwords that thread (0, 0) set to 0 and 0xFFFFFFFF after the early
returns, with no barrier (one console wave). When (0, 0) has returned nothing stores and the
atomics combine with what the LDS held: another group's values on the console, anything on the
host (a dark patch in a lit tile: the "dark tiles" of the wave-wide form). A dword that every
write sets to one constant and every atomic accumulates into with that constant as its identity
is stored by every thread first thing, behind a group barrier. That is exact where the dword is
defined: where the program's own store runs it stores the same value again before the first use,
and a read that would see the early store instead of a later write of the group would have read
memory the group never wrote. Confirmed on the card with a hand-written 8 x 8 fixture
(water_tests): with the corner thread returned, the minimum came out as what the LDS held (0)
without the hoist and as the others' minimum with it; a start that is not the maximum's identity,
a write at a computed address, or no atomic hoists nothing. Ported from fxceless/victory-fork
a918163 (GPL-3.0). Its paired FP32 and wave64 sums (paired_fp32.rs, wave64_after_loop.rs) are
not needed here: the sums of these programs (the count of the lanes as f64 and f32, a sum of
0.0 over the launched lanes, lanes that have left included) are the tree sums wave.rs replays
bit for bit with lanes left out (wave64_tests: "a sum of halves where lanes have left").
LDS regions that need no order between the halves (lds_exact.rs; LEONIDA_LDS_EXACT=0
off). A lane-branch region that reads and writes LDS was refused unless it only raised a flag
(a group barrier cannot stand inside it). Two more are taken, in the last forms emit tries (after
the wave-wide one, each form whole and as the allocation idiom's local waves), so that a program
that translates without them keeps its form. A region one thread runs: every
way in is the taken edge of a branch on v_cmp_eq(thread id, k) in a group of one dimension, or
comes from a block that thread alone runs (a loop's mask joined by a phi is followed); its reads
and writes are one thread's, in its own order. And a region whose reads and writes cannot
meet: the byte range of each access is bounded from how its address is made (a constant, a
mask, a shift, a sum, the access's own offsets); no range read meets a range written, and atomics
that meet are the same operation, so no order of the halves can show. An atomic that returns the
old value (ds_add_rtn_u32) only in the form of with_local_waves, whose idiom check (a wave's
count goes to the first lane's atomic, the lanes take the base it returned plus their rank among
the lanes) makes the order of the halves legal; that idiom now knows ds_add_u32, ds_min_u32,
... as the reservation. A group of one dimension whose LDS fills all of the 32 KiB takes its
console threads from the flat id (no counter dword), and in the idiom's form gives no exchange
dwords, which it never touches. Confirmed with hand-written 128-thread fixtures on the card (two
console waves): thread 0's three read-modify-writes of a dword; the same by threads 0 and 1 (no
one-thread region: the form without the skip gives it a barrier per access); the odd threads'
wave allocation through an LDS counter (64 slots, each once, 8 runs) and the same in a loop the
lanes leave one by one (192 allocations, each once); and offline over the corpus
(translate_cdxil --census, every translation through dxil.dll's validator): 22 programs are
still refused, none invalid, and the instruction counts of the others change only where a hoist
adds its stores. 6b82bc7d22016cb5 translates and validates in the form with the idiom (exact
in the sense of with_local_waves: each lane a slot of its own; the order of the slots between
the halves is any).
What is left: 02384a60fda6f2d0. Its counter in LDS is read by every lane of a console wave
and then read and written by lane 63 alone (ds_read_b32 at 0x254, v_mbcnt ranks,
ds_write2st64_b32 at 0x288, ds_read_b32 and ds_write_b32 at 0x2b4-0x2c4), in a loop
each console wave runs for as many rounds as it has tokens (the second wave in another loop at
0x364-0x5d8, with a counter of its own). The halves have to be in step at both places of
every round: no group barrier gives that (the other console wave is in a loop of its own, with
another count of rounds), and the idiom does not cover a counter updated without an atomic. What
would: the wave-wide branches for groups of several console waves, the two host waves of one
console wave meeting through a pair of LDS flags (each half counts the meetings it has entered
and waits until the other's count is not below its own) in place of a group barrier. Not
written: it spins on LDS, which no run on a card has tried, and it needs LDS for the flags.
LEONIDA_WAVE_LDS_LOOSE=1 takes the program, approximately (the halves meet only around the
loops): wrong for the counter.
What the wave-wide form costs on the card. In a GPU timing run at the save (Series X,
1440p, RTX 4060 Ti; LEONIDA_GPU_TIMING=1, 2026-11-27) one indirect dispatch of
6f225b641c5b0708 took 76-80 ms of the frame, every frame; the next heaviest command took 3 ms
and all the others together about 65. Its translation (dxc -dumpbin) has 125 group barriers, 115
of them inside an outer loop that holds nearly the whole program and 50-76 inside each of two loops
nested in it: each branch on EXEC and each wave read where not every lane runs is an exchange of the
two host waves through LDS with two barriers, every iteration, in every 8 x 8 tile of the screen.
Runs x31-x33 had looked right with the water fix, at about 35 ms on the card: the program's
pipeline was not made yet in them (dispatches without a host pipeline are dropped), so what they
show is the water without it. The NVIDIA launcher drops its dispatches again
(LEONIDA_WATER_TRANSMISSION=1 runs it). What would make it cheap: one barrier per exchange (two
dwords used by turns), and no exchange for a branch whose condition the console wave already holds
in an SGPR (uniform by construction).
Paired lanes (paired.rs, LEONIDA_PAIRED_LANES). Ported from TaynanGT/Vice-Tay 5e588e8
(Geckomacabre with fxceless, after ByFxbian's fxceless/victory-fork #1397 and #1419, PiloteCode #854
and darkworldhm 840243e2; GPL-3.0). One host wave of 32 threads runs one console wave of 64: each
thread lowers console lane n and lane n + 32, every instruction for the lower lane and then the
upper one, every per-lane branch taken by the whole wave (as in the wave-wide form). A reduction, a
ballot, a first-lane or lane read and a wave-wide branch ask the host wave for both lanes of every
thread, so nothing is exchanged between host waves; the DPP rows, swizzles, v_permlane(x)16 and
ds_bpermute stay in their 32-lane half, which is the lower or the upper lanes of the host wave. LDS
is the program's own, each access bounded by it, behind a group barrier where a write or the first
read of a block comes (the host's lanes of a wave are not in step). The form takes dword reads and
writes (2 forms too) and the order-free atomics (ds_min_u32, ds_max_u32, ds_add_u32, ...); it
refuses spilled programs, groups that do not fill their console waves, and several console waves
of a group that would have to meet after they went their own ways. Not taken from Vice-Tay: its
replay of the console's order for 32-bit float sums (paired_fp32.rs; sums are joined as the
wave-wide form joins two host waves', exact for the water's counts), the programs by hash
(VICTORY_WAVE_PAIRS_ONLY) and its loop-exit change to the wave-wide form.
It is tried right before the wave-wide form (LEONIDA_PAIRED_LANES unset or 1; 0 never;
first first of all the forms, for trying it on programs another form takes). Over the 2,734
compute programs (translate_cdxil --census, dxil.dll's validator on every translation): the
seven programs of the CS_TransmissionVolumetrics family change and no other, none invalid, the
same 22 refused. Group barriers (all of them outside loops now; dxc -dumpbin) and DXIL instructions,
wave-wide form -> paired: 6f225b641c5b0708 125 (76 in loops) -> 5, 12,072 -> 22,288;
5dc3b25986622949 111 (58) -> 5, 7,966 -> 14,129; 926c46bab3b86bd6 703 (376) -> 10, 38,260 ->
70,226; 2889c21328c69e58 and 888af37a584acf98 138 -> 2, 6871d6e4b3ac9a10 and
a10179ab7eda0dc3 293 -> 9. Each thread does two lanes' work, in half as many threads. With
first 172 programs change (none invalid, two more of the refused translate). Hand-written fixtures
run on an RTX 4060 Ti (paired_tests): counts, first lanes and ranks after a loop lanes leave apart,
LDS one half writes and the other reads with no barrier (one and two console waves), the tile's
minimum and maximum and an LDS count over the lanes that go on, a wave OR and v_readlane of lane
37, ds_bpermute with EXEC per half, the 16-bit tree sum with lanes gone, a mask's "some lane" as
data, the console threads of an 8 x 8 group: all as the console computes them. Not yet measured in
the game (LEONIDA_WATER_TRANSMISSION=1 with GPU timing).
Group packing (LEONIDA_GROUP_PACK, off by default)
The card's time barely moves between 1080p and 1440p and is far above what the instructions of
its programs cost (ffdb43445541c981: about 0.08 ms of arithmetic, 2.9 ms measured), so the
suspect is launch and occupancy: 1,558 of the 2,703 compute programs use groups of 32 threads or
fewer (1,460 of exactly 32), some with 57,600 groups to a dispatch, and an Ada multiprocessor
holds 24 groups, which are 24 of its 48 warps when a group is one.
LEONIDA_GROUP_PACK=<K> (2, 4 or 8; the largest of them not above the number; 0 or unset: off)
translates a program of one console wave of 32 lanes with no group barrier to a host group of
K such waves (numthreads(32 * K, 1, 1)):
- host thread
tis console threadt % 32of slott / 32; the console thread's x, y, z are taken from the console group's shape; each slot is a host wave of its own (a one-dimensional group on a host of 32-lane waves:lower::Pack); - the console group number is
(x + 65535 * y) * K + slotof the host group (X, Y), taken apart by the console's grid, which the host puts in three root constants (USER_PACK_X,USER_PACK_Y,USER_PACK_GROUPSofshader.rs; their metadatadwordisK, so a cached translation says it is packed). A thread whose number is not below the groups in all leaves at once, which is right because there is no barrier; - group-shared memory is a slice for each slot (
slot * Ldwords added to every LDS address,K * Ldwords in all, at most D3D12's 8,192);Kcomes down until it fits, and untilK * 32 * vgprsis 32 K registers or less; - the host runs
pack_grid(groups, K): the console's groups in all divided byK, rounded up, as(min(n, 65535), ceil(n / 65535), 1). Direct dispatches do it inState::dispatch; indirect ones in the clamp (indirect::bound_packed, the batched clamp's job word 3), which writes the console's grid and the host's dispatch as one 24-byte record, executed with a command signature of three root constants and a dispatch (draw::pack_signature).
Not packed, with the counts over the 2,703 (translate_cdxil --census prints pack K or pack 0 <why>): 1,237 groups of other than 32 threads, 41 dispatches counted in threads (the structure
builder's), 28 console wave64 programs. 1,396 are packed with LEONIDA_GROUP_PACK=4 (1,395 at
4, one at 2 for its group-shared memory): 1,229 of 32 x 1 x 1, 146 of 8 x 4, 15 of 4 x 8, 5 of
4 x 4 x 2, one of 2 x 2 x 8; 77 use group-shared memory, 554 use over 128 registers. With LEONIDA_GROUP_PACK=8: 837 at 8, 558 at 4
(the registers), one at 2, none refused by the validator. The programs
ffdb43445541c981, cb6adcc6da2613ff, 5cf00dc39042edaf and the tile lists'
2dc364df5d3278b8 and 940c2635dc1312f4 are among them. All of the packed translations pass
dxil.dll's validator.
What it does not do, and what to look at: a program with a group barrier is not packed (the
slices would have to meet at it, and the tail of the grid would have to wait there); groups of
fewer than 32 threads are not (a wave would hold several groups); wave64 programs are not.
Shaders with lane operations are packed (each host wave is one console group where the host has
waves of 32 lanes, as it does here): that rests on a 1-D host group giving a wave a run of 32
consecutive thread ids, which LEONIDA_GROUP_PACK=0 takes away again if a program misbehaves.
The translator already takes a console group-shared memory address as in bounds (a shortcut);
packed, an address past the group's memory reaches the next slot's instead of the host's end.
Three picture faults looked into without the game (2026-11-27)
From the code, the forks' histories, the frame listings of runs x2 and c1 and counts over a work folder's programs (26,503 disassembled, 12,101 of them pixel programs). Nothing here has run in the title yet: each line says what would show it.
A light rim around silhouettes in fog. LEONIDA_STATIC_SAMPLERS_LINEAR=1 made every
immediate sampler linear. 21,876 sample instructions in 1,468 program names use a point
one (gathers apart). The pass that puts the fog on the picture,
CS_ApplyCombinedDeferred (960x540 ray-marched fog and depth onto 2560x1440), fetches the
four low-resolution texels around a pixel through such a sampler, depth first, and keeps
those within a quarter of the pixel's depth; CS_TAA2_Resolve has ten point taps.
Filtered, each tap is a mix across the silhouette. The reason for the setting is gone:
the bands in the colour grading were a pipeline restored from the pipeline library with
another run's sampler places (trustno1-coder/VIctory-NVIDIA 7fa0e95), and such pipelines
skip the library since f0606a744. The launcher now names the tonemap's programs alone
(PS_Composite). To check: fog behind a tree or a wire, with the launcher as it is and
with -More @{LEONIDA_STATIC_SAMPLERS_LINEAR='1'}; the sky's gradient for bands with
'0'. Not the cause, though the frame line counts it once a frame ("depth planes ... used
before the pass"): that use is CS_Tiling_Generate_Opaque reading the stencil plane of the
material-class texture, which is copied at once; the plane's readers (the tiled lighting's
draws with the test "equal") are in other lists, after the pass that runs when that list closes.
Square patches in a texture. The look that finds a texture changed after its upload
reads 48 KiB of it (texture::fingerprint): the smallest levels and two places of the
largest. Such changes are common (200 and more a run found by those windows; 18 of the
first 200 of run port15 more than 176 frames after the upload), so some fall between the
windows and stay. LEONIDA_HEAP_PRINT_SPREAD=1 (off) adds 256 bytes in each 64 KiB step,
64 places at most, 3 us more a look at 2 MiB; the log names what only those places find
("changed where only the spread places of the look read"). To check: a run with it, the
count of that line, and whether the patches still come. The forks' BC7 rotation fix
(fxceless 06702fe8) changes nothing here: none of the table's 512 control words and none of
the 255 dictionary entries has rotation bits outside modes 4 and 5.
Black squares at a glass door's foot. 3,023 pixel programs ask for the depth test
before they run (DB_SHADER_CONTROL bit 12); the translator read the word and did not
use it, so the 705 first programs of the transparent passes store their tile masks and
nearest depth for pixels the test rejects. LEONIDA_EARLY_DEPTH=1 (off; after trustno1
41b4a05) declares the early test. To check: the same view with and without it, and the
targets of PS_AlphaVelocityDepthResolve in a dump (LEONIDA_DUMP_TARGETS=1): the scene
depth at an opaque edge in front of glass. Not ported: trustno1's stand-in for reflections
after CS_RayMiss (2db59d4 and five more), which is where the blue comes from.
Forms of the tile and resolve programs (2026-11-27). For the region with a
stair-stepped edge at a glass door (the railing and a character's legs in front of it
see-through, a displaced copy of other railing over the floor): which form the translator
takes, on a host of 32-lane waves, for the compute programs that work by tile or resolve
the transparent passes. Without the game and without a card: the translator alone
(LEONIDA_WAVE_WHY=1), over the 81 compute programs one run had made
(known-shaders.bin) whose entry points are named CS_Alph*, CS_TileClassification*,
*TemporalResolve*, CS_RayMiss*, CS_ScreenProbe_RayMiss, CS_ResolveScreenSpace*,
CS_ResolveToMirrorGBuffer, CS_*Alpha* of the traced transparents, CS_Composite* and
CS_TransmissionVolumetrics*. What a form computes on a card is not in this.
| form | programs |
|---|---|
| as they are | 60, among them CS_RayMiss, CS_ResolveScreenSpace, CS_ResolveToMirrorGBuffer, CS_AlphaTransmissionHistoryResolve, CS_AlphaTransmissionDenoise, CS_AlphaTransmissionDepthTileMipDilate, the eight CS_SceneColorTemporalResolve*, the six CS_ScreenProbes_TemporalResolve* |
| without early-outs (exact) | 9: CS_AlphTransmissionPrefilterMip 2da4beb386509b77, CS_AlphaTransmissionDepthTileGenerationMip1 5c6224a6bc3a4066 and ...Mip25 9bdd33d77fb8ca0f, CS_TemporalResolveAlpha 068786c4b7e04851 and 1069ceb574bc92ca, CS_TemporalResolveWater 441c0b3940ddfa2d and 780546beec578f2c, CS_TileClassificationNeighborhoodBoundary f8a6133bfedc5759 and ...WithLookingGlassMask 445c61b3089eb8f0 |
| without skips (exact) | 3: CS_TileClassificationNeighborhood3x3 2b17036bf3a1d615 and ...WithLookingGlassMask f83f0ca30c60c3ac, CS_TransmissionVolumetrics_GenerateTiles 1aa247ed3653b616 |
each half-wave its own results (local waves (APPROXIMATE), without early-outs) |
4: CS_TemporalResolve1_Opaque_FrameStatistics 0ffd3b911e35e7d0, CS_TemporalResolve2_Opaque_FrameStatistics 71883e40620a567a, CS_TemporalResolveOpaque2 3c9d23fa83d63d43, CS_TemporalResolveOpaque_FrameStatistics 4031c6c05fa7ec48 |
| paired lanes, last of all | 5, the water's: 5dc3b25986622949, 6f225b641c5b0708, 6871d6e4b3ac9a10, 926c46bab3b86bd6, a10179ab7eda0dc3 |
| refused | none |
So no pass of the glass's transmission is refused or approximate here. (edsuuu/VI-BR-PORT's
window glass was CS_AlphTransmissionPrefilterMip refused by 32-lane hosts, their 30c29ed:
the access's own guard among what is known of the lanes that read a descriptor, which this
tree's tracer already had.) Four temporal resolves are approximate: what the console
computes once for a tile of 8 x 8 is computed for each half of it. And the forms counted as
exact are not proven so program by program:
that fork found its water's tile list (...GenerateTiles) wrong in such a form, whole
tiles unlit, and right in the paired form (cf3394b).
To check, one group at a time (LEONIDA_PAIRED_FOR=<hash>,<hash>: the paired form before
every other for the programs named, only those translated again; shader_cache.rs): the
transparents' tile list and ray pre-passes (CS_Tiling_Generate_Alpha a14c1da4be7b9837 and
CS_RayPrePass_Alpha_SSR edb8e66237fc38e6, each host wave on its own as the allocation
idiom, the kind of form that fork found wrong for its tile list; CS_RayPrePass_Alpha
d2b169b82f67ec5b); the two looking-glass tile classifications (f83f0ca30c60c3ac,
445c61b3089eb8f0); the four approximate temporal resolves; the two
CS_TemporalResolveAlpha. The paired form takes each of these (and the plain tile
classifications, ...Mip25 and the water's tile list), again as the translator says, not a
card. It does not take the two programs of 256 threads (CS_AlphTransmissionPrefilterMip,
...DepthTileGenerationMip1: its host waves would have to meet), which keep their form.
For the water: ...GenerateTiles named, with LEONIDA_WATER_TRANSMISSION=1 in the window's
environment so that the family runs.
Done (RTX 5070, 2026-11-29 and 30): in its own form the tile list left 8 x 8 groups of the volumetrics' output
unwritten at random, black blocks that moved over the water from frame to frame; named, none. With the loop
convergence on 32-lane hosts on by default (LEONIDA_LOOPS_WAVE, #2662) its own form has none either, unnamed
(Series X, 1440 lines, under the water and seen from above), so it is not named. The launcher runs the family by
default (LEONIDA_WATER_TRANSMISSION=0 drops it).
Every compute program of that run by form, and the approximate ones by name
(2026-11-27). translate_cdxil --census with LEONIDA_WAVE_WHY=1 (the host settings of
the NVIDIA run, no card) over the 2,682 of the run's 2,734 compute containers that carry an
entry point's name. The 81 above came out the same both ways.
| form | programs |
|---|---|
| as they are | 2,449 |
| exact, no group barrier: without skips, without early-outs, without skips with scalars followed | 84, 28, 27 |
| each host wave on its own, the allocation idiom (counted exact) | 30 (two with exact LDS regions): the batch culls, CS_Tiling_Generate_Alpha, _Opaque 2cc4c197ee29e291 and _Water 5e7cd6d3557a6c35, CS_RayPrePass_Alpha_SSR, CS_RayPrePass_Water and _Water_SSR, CS_MaterialTilesInitial bad01f53f53248e5, CS_DilateDenoiseInfo, CS_CollectTriangles*, the liquid trails, the horizon's vehicle lights, the two CS_Collision* |
| paired lanes | 7: the water's five and the sun's two hair shadow masks (2889c21328c69e58, 888af37a584acf98) |
| wave-wide | 1: CS_Visibility 369cbe906ea72764 |
| approximate (each half-wave its own results) | 34, below |
| refused | 22, as counted before |
The 34 approximate ones, grouped by their names (which pass each belongs to was not looked up beyond that):
- the sun's shadow mask and what feeds it:
CS_GenerateShadowMasksbc76c37f9fa3672b,_HairOnly0a5ecfee6b79e13b,_Raytraced12b0005a30bc18a9,CS_RTConstantCostShadowsTileClassificationNormalCones2620618869072a85,CS_TraceShadowRays_ScreenSpaceOnlyFullReseb9a057a81d18c42,CS_TraceShadowRays_Fullres4e816e1ef600ddcf; - the lights' clusters:
CS_ClusterLightsWorldSpaced3e5b737ea7cc150 and...IntensityBased55d2bce91ec9abcc (the two that fork names: each half of a cell is given half of the lights); - what shades where no ray hit, the irradiance cache and the shader bins:
CS_DeferredFallback_BVHf8f712930c606707,_Fallback40bc5fd052acfdf4,_Voxels294e7cdd91ebd1f1,CS_DeferredFallbacksAlpha_SkyProbeb7953a05b189dfc1,CS_IrradianceCache_Shadea53a7977fe762268,_ShadeSecondarybe14e72d86362031,_IntegrateIrradianceSH0a5d4f9047b3dce4,CS_GenerateShaderBinOffsets8dd8d739047fe557; - the four temporal resolves of the table above;
CS_ResolveVolumetrics89ed0b981f99573c;CS_Gatherb2711644ca5566cc,CS_Gather_Reference0903802745985664,CS_GatherDiffusionce2378e5e8711aad,CS_GatherDensityAreaForReadBack136986812880cead,CS_ScanMip0to3(3c196d81eca7ff15, acf14a70f37fb012, f79824724d8e2daf, f0aa2b1e79275592);- decals and effects:
CS_ProjDecalResolve_Scalarizede4a9f58e3acfcf7b and_Vectorizedc4183d3cbee28e8e,CS_EntityFireResolve_Scalarized2e92491c2ae5472b,ptfx_CS_lightAtlas_Sprite2561af9577c47289 and_Trailc06aa62112ffba4c.
Named in LEONIDA_PAIRED_FOR, 32 of the 34 take the paired form (not
CS_ProjDecalResolve_Scalarized: a per-lane descriptor written where some lanes may keep
the old one; not CS_TraceShadowRays_Fullres: an LDS operation that form does not take); so
do the three CS_Tiling_Generate_*, the six CS_RayPrePass_* and CS_MaterialTilesInitial.
What it costs the card is
not measured: every per-lane branch is the wave's in that form (252 of them in
CS_IrradianceCache_Shade, 114 in CS_GenerateShadowMasks) and each thread does two lanes'
work; and the two ptfx_CS_lightAtlas_* lost the card in the wave-wide form (runs 121-124),
so they are not the first to name.
Static samplers and the pipeline library on NVIDIA (2026-11-27)
RTX 4060 Ti, driver 616.64, without the game: pipeline/places/tests.rs runs the test
program again as processes of their own that share a cache folder, as runs of the title
do, with hand-written programs that read back which sampler they sampled through.
cargo test -p leonida-gpu --features diagnostics --lib pipeline::places -- --ignored --nocapture --test-threads=1
The fault reproduces, every time. A run stores three pipelines with static samplers in the library (compute by its description, graphics, compute by a stream; root signatures with the flags the title's have). The next run makes ten other static samplers first and loads them: all three load, and each of their seven samplers is another one, exactly the one now at the place its own had in the first run (the first run's had places 0 to 6, the ten others now have 0 to 9: read back 40, 41, 42 / 43, 44 / 45, 46 for 1, 2, 3 / 4, 5 / 6, 7). Made by the driver in that run instead they are right. So what trustno1-coder/VIctory-NVIDIA 7fa0e95 found on a 4070 SUPER holds here, and it is not rare: any other order of static samplers gives it.
What the driver does (the_table_of_static_samplers: a stored pipeline whose sixteen
samplers had places 0 to 15 is loaded in runs that did other things first, and reads
whatever is at those places):
- A device has one table of static samplers, and a process one device for a card: what another handle of the device made before is in it.
CreateRootSignaturegives each static sampler it has not seen the lowest free place, in the order of the root signature's array. A pipeline's root signature and one that no pipeline uses count alike. The sampler's register, space and visibility are not part of it: one place however often and wherever it stands. (With a throwaway probe: neither is the comparison function of a sampler whose filter does not compare; the border colour and the maximum anisotropy are, even where the sampler does not use them.)- A place is free again when the last root signature with its sampler is released, and is the next one given.
- Samplers in descriptor heaps have no place.
- A compiled pipeline holds the places. The driver's own cache on disk knows that
(
the_drivers_own_cache_knows_the_places: a compute and a graphics pipeline made by the driver took 12.5 and 4.3 ms, 0.7 and 0.5 ms in the next run, 9.6 and 4.9 ms in a run that made one other static sampler first, 0.9 and 0.6 ms in the next such run). A pipeline library does not: the blob is taken as it was stored. - So it is the same for
LoadGraphicsPipeline,LoadComputePipelineandLoadPipeline, for programs compiled by FXC (5.1) and, with the probe, by DXC (6.6, both heaps directly indexed). - Within a process the first of two equal pipelines wins (probe): made, then loaded by the same description, the loaded one is the made one and right; loaded first, the one made afterwards is the stale one too. A pipeline to hold a loaded one against must differ in its code.
- The blob of
GetCachedBlobdiffers from process to process in 17 or 18 bytes (16 in one run and one or two elsewhere) with the places the same, and in some 420 with them different: no plain way to read the places from it. Not used.
That is where the five minutes went. Which sampler a title pipeline needs first
differs from run to run (eight workers make them), so the places did, so the driver's
cache missed nearly every pipeline with static samplers at every start, and since
f0606a744 the library was not asked. A sample of the work cache's translations (8 of its
256 folders, some 16,600 programs) has 25 different static samplers (22 in half of it), 9
at most in a program: a short list.
What is done (pipeline/places.rs; on NVIDIA only, the other drivers' pipelines keep
their names):
- The samplers seen are listed in
static-samplers.txtbeside the library, in the order first seen; the file only grows. When the host device is made, before anything else, a root signature is made for a sampler of ours, each listed one in order, 64 more of ours and a last one of ours, and all are kept. A listed sampler's place then follows from the list up to it. - A pipeline whose static samplers were all in the list at the start is in the library
under a name that also holds the list up to its last sampler (and the list's own name,
new when the file is begun anew). One with a sampler first met in this run is made by
the driver, as before, and the sampler is written to the file. It is made at the place
it will have in the next run (one of the 64 is let go just before, and the lowest free
place is given next), so that the driver's cache has its pipelines then; nothing rests
on that (
a_sampler_met_in_a_run_has_the_place_of_the_nextshows it holds). - Before the first such pipeline is looked up, every place is looked at on the card: for each sampler made at the start a small pipeline, stored in the library by the first run that had it there, is loaded and must write bit for bit what the same pipeline made now writes (19 samples that tell the bias and level bounds, the anisotropy, the three filters, each address mode and the border; 8 for a comparing sampler: its function, filter and address modes). If one differs, pipelines with static samplers are made by the driver for that run and the log says so. Found in the tests: two samplers made on the device before the host had it, and one that is also in the list (then only the places before its own are other ones).
pipelines_with_static_samplers_come_from_the_library runs it: a first run meets seven
samplers (its pipelines made by the driver in 6 to 34 ms each), the second stores (made
again, about 1 ms each: the driver's cache had them), the third makes ten other static
samplers and a sampler heap first and the pipelines in another order: all loaded, all
right. A pipeline with two new samplers is the driver's in the run that meets them,
stored in the next, loaded from then on, while the others stay loaded.
LEONIDA_LIBRARY_STATIC_SAMPLERS=0: none of it, such pipelines are made by the driver
every run as before. =1: under their plain names with no care for the places, which in
the same test reads wrong through every sampler.
Costs: the look takes 95 to 155 ms with nine places (two programs compiled, four small textures). With 320 listed it took 7.6 s in the run that stores the small pipelines and 8.4 s in the first that holds them against new ones (each once: 23 ms a pipeline the driver has never compiled), then 0.4 to 1.1 s. With some 30 samplers that is about a second twice, then about 0.2 s, once a run, on the worker that asks first (an estimate from those figures).
Not shown here. That the title's pipelines load in seconds: it needs three starts (the first lists the samplers and is as slow as before, the second stores and should be quick if the driver's cache holds 1,650 large pipelines as it held the tests' small ones, the third loads). The look at the places tells samplers apart by what they do, not by where they are: two that sample alike in every way it tries would pass for each other (and would sample alike in a pipeline in those ways too). The debug layer is not installed on this PC, so the tests did not run under it. The table's size (2,032 on the 4070 SUPER, where the next sampler removed the device) was not measured again; the list stops at 1,000. If something makes static samplers on the device before the list in some runs and not in others, those runs fall back to the driver; the log then names the file to delete to begin anew.
The precompile and the game's pipelines (2026-12-01)
Right after a precompile (leonida warm) that had just made the 4,875 pipelines earlier runs drew
with, the game compiled 1,100 to 2,300 of them again in the world (runs d257, d285, d286, d287): a
few to thirty a second, frames of 2 to 10 s for minutes (the launcher waits up to 10 s a frame for a
pipeline), up to 3,800 draws a frame dropped in the first world frames. Two causes, both fixed:
- The precompile's processes had no places.
places::starttook the list's folder from the library's, which only the title's run sets, so in those processes a static sampler took the place its first pipeline gave it, and the driver kept their pipelines under other places than the game's. They now make the listed samplers first, as the game does, and write nothing to the list (places::use_list). On the card (what_a_precompile_makes_the_game_finds_in_the_drivers_cache): precompiled with the list, a compute and a graphics pipeline took 11.0 and 4.4 ms and a game-like process then 1.1 and 0.8 ms; without it, 12.8 and 4.5, then 9.0 and 5.3 (compiled again). - The driver's cache on disk does not keep what the precompile compiles. Of 400 pipelines the
precompile of run d287 had made, 116 were compiled again by the next process to ask for them (138 s
in all; the other 284 about 2 ms each), with the launcher's own settings and with none alike; and in
the four minutes run d287's game compiled 1,700 pipelines, none of the driver's files for it was
written. The pipeline library is ours, and the game looks there first (a run of 2026-11-27: 2,338
loaded, none made), but only a run that ends normally writes it, so test runs never did, and on
this PC it was last written on 2026-11-29. The precompile now puts its pipelines into the library
itself (
warm --store: one process with the library and the list in use as the game has them, on 8 threads;library-done.txt;LEONIDA_WARM_LIBRARY=0leaves it alone). The first store after a change of the translator took 388 s for 4,875 (the driver's cache still had about 70 % of them), and the library grew from 1.64 to 2.02 GB. In the run after it (d289) the game loaded 3,540 pipelines from the library and made 74; some 700 were still being loaded when the world came up, at 112 to 122 ms a frame instead of seconds, against 2,000 being compiled in d287.
The checks of a precompile against a fresh driver cache use test runs that end by a forced stop, which writes neither the library nor (it seems) the driver's cache: a storm in the run after one is what the next start of the game would meet too.
A load from the library is quick once the driver's cache for the process's name has seen the pipeline:
400 loaded as leonida_sm.exe (the launcher's name with frame generation off) took 43 s together the
first time (90th percentile 214 ms), 16 s the next; as leonida.exe 28 s. With the precompile's notes
by translation alone, a start as leonida_sm.exe after one as leonida.exe made nothing and came up
with 1,700 pipelines still loading, 5.4 s a frame (run d291). The notes are per name now and the store
loads what the library has under the new name (61 s for 4,875 instead of a 10-minute compile); the next
start (d293) came up with 505 loading, at 74 to 110 ms a frame, none left after two and a half minutes.
What is next
- The preparing thread: split what one submission does over two threads in a row; ask for the next submission while this one is sent; view the card's own buffers where fills copy them now.
- The card: small buffers' copies in its own memory (
LEONIDA_CARD_BUFFERS_MIN_KB=64, after fxceless c36971b2; not measured here yet), and the passes that run for nothing without rays. - Stalls: 270-660 s of a session were full of frames over 200 ms, almost all while new
pipelines were made.
leonida warm, and a quarter of the workers for the slow ones. - Outdoor flicker: suspected to be one bad indirect record that uses up its list's
budget, so that every later draw of it is empty. The log's frame line counts them;
LEONIDA_INDIRECT_REST=0is the experiment. - Memory, 40-46 GB private: lists' allocators 9 GB, windows 7, uploads 4
(
LEONIDA_MEMORY_MAP=1lists it).
The other repositories, compared
Read up to 2026-11-25: Marvisak/VIctory, fxceless/victory-fork, DexNom/VIctory, Belobug/VIctory-Belobug-AMD, FQY55kai/ZJOU-VICTORY. What was taken is in the history, each commit naming its source. In short:
- Marvisak's commits hardly apply any more; nearly all of what they fix is here, often another way. Taken: nearest normalized codes, d16 views, shader model flags.
- fxceless: the base. Newest taken: texture read-back, small buffers on the card, hashes over a buffer's own bytes.
- DexNom: thread counts of ray dispatches, cube gradients, joined sparse ranges.
- Belobug: pipeline workers for screen passes, the ambient stand-in's idea, pipeline and constant buffer bookkeeping (romainhedouin).
- ZJOU: render targets not set again; some shader corrections are being looked at.
Frame-rate switches measured on a six-core PC (2026-11-27)
Ryzen 5 7600X (6 cores, 12 threads), GeForce RTX 4060 Ti 16 GB (driver 616.64), 32 GB of RAM, Series X profile,
2560x1440 output, the title's upscaler, at one save point with the idle camera (6,000 to 14,000 draws a frame, so
medians of one run are comparable and medians of two runs only roughly: two runs of the same settings were 75.0
and 82.1 ms). "A/B" means the switch turned every 20 s inside one run (LEONIDA_AB).
| What | How measured | Result |
|---|---|---|
LEONIDA_PLACED_UNDECLARED (a copy at its place whose destination no flight declares is the title's own) |
A/B, 8 phases | 73.9 ms median with it, 88.5 without; the submitting thread's wait for flights 2 to 4 ms a frame against 6 to 21. On by default. |
LEONIDA_PORT_GUARD, LEONIDA_PORT_JOURNAL |
A/B, 22 phases | 83.7 ms with neither, 87.4 with the guard, 91.4 with the journal, 88.9 with both. No gain here; off. (The guard measured again on 2026-11-29 in 147 phases: -0.47 +-0.18 ms; on in the launcher since. The journal measured again on 2026-12-02, RTX 4070 Laptop, Series S, walking, two runs of 38 pairs in turns of 8 s: the frame's median -1.43 +-1.96 and -1.38 +-1.29 ms; on in the launcher since.) |
LEONIDA_JOIN_PARTS (8 against 1), with thin lists off |
A/B, 11 phases | 112.3 against 114.0 ms: none. |
LEONIDA_THIN=0 |
one run | 117.1 ms at 9,500 draws, against 95 to 104 at 9,000 to 11,000 with thin lists. Worse; the launcher keeps them on. |
LEONIDA_D3D12_BACKGROUND=0 (the driver's background shader work off) |
one run | 118.6 ms at 7,200 draws against about 80. Worse: the card keeps the shaders' first versions. |
LEONIDA_PORT_CONSTANTS=1 (the title's 32-bit graphics heap in place) |
one run | 290 ms a frame (3.4 fps): 31,000 fills a frame are read out of that memory on the CPU. Far worse on this card; off. |
LEONIDA_TITLE_GRAPHICS=performance (the lighter set of the title's own settings) |
three runs | 78.6 ms with it, 75.0 and 82.1 without; the draw count does not change at this place. No gain. |
Render at 1920x1080 instead of 2560x1440 (-Resolution 1080) |
one run each | 85.7 ms at 10,200 draws with the card 81% busy at 60 W, against 95 to 104 ms with the card 99% busy at 106 W and 15.6 of 16.4 GB of its memory used. |
| A run left alone for 13 minutes | medians per minute | 106 to 115 ms in the first three minutes, 94 to 104 from then on: it does not recover further when the driver's background compiling ends. |
What it adds up to on this PC: about 10 ms of frame per 1,000 draws. At 1440p the card and the processor are both at their limit; at 1080p the card has room and the frame is the processor's: the process uses 5 to 5.6 of the six cores, of which (profile by thread group) the title's own threads take 31 to 41 %, the driver's four background compile threads 26 % in the first minutes, the eight list-recording threads 25 to 35 % and the submitting thread 6 to 8 %, the last being the one thread every submission passes through (about 72 ms of an 87 ms frame).
What a frame waits for there, and what moved it (later the same night)
The same PC, profile and save. All game starts for these were muted in the Windows mixer (the game's own session) and unmuted before they were stopped.
Standing, the frame is the card's. A timeline of 20 frames (LEONIDA_TIMELINE, 96 ms a frame) has the card
running submissions for 80 of the 96 ms and idle for 16; the chain a present came out of is 56 to 59 ms of the card
and 17 ms of the title's own threads, 5 ms of threads woken and not yet running, 3 to 4 ms of write faults. Three
submissions a frame take about 30, 28 and 17 ms of the card, the dozen others 1 to 2 ms each. No thread of the
process is busy for more than 45 % of the time (the submitting thread 41 %, two of the title's 38 %, the eight
list threads 21 to 35 %), with 5.9 cores' worth in use and 17 % of it in the kernel.
The card's time is spread, not in a few programs. A timing run (LEONIDA_GPU_TIMING=1 with
LEONIDA_D3D12_DRED=1, every command between two timestamps): 78 to 85 ms a frame in 1,565 kinds of command;
indirect executions 47 to 52 ms in 9,567 commands (5 µs each), direct dispatches 18 to 20 ms in 1,574, mesh
dispatches 6 to 7 ms in 2,300, the copies behind aliased textures 4.2 to 4.6 ms in 86, plain draws 2 ms. The
forty heaviest kinds make 44 ms of it; the heaviest single programs are compute passes of 1 to 4 ms
(CS_ProjDecalReduceClassification 4.3, CS_ShadowRenderTiledCascadesCB 3.8, CS_Gather_Classified_0 2.7,
CS_TAA2_Resolve 1.5). Rendering 1080 lines instead of 1440 took 10 to 15 % off the frame (above), so less than
half of the card's time follows the pixel count. What makes an indirect execution cost 5 µs on this card is not
found; the frame replay (replay/) is where to ask.
| What | How measured | Result |
|---|---|---|
LEONIDA_REMAP_SPANS (a texture refresh waits only for a change of mapping that touches its own memory) |
A/B of 15 s phases while walking and turning, 25 phases | mean 153.3 -> 129.5 ms, median 117.2 -> 103.1, p90 305.1 -> 230.5. Of 130 to 320 named reads a frame, 6 to 128 went on beside a change and none waited. Standing: no change (the lock is held 5 to 13 ms a frame there). On by default. |
LEONIDA_BATCH_SCRATCH_POOL (lists share the scratch buffers of their batched clamps) |
one standing run each way, 4.5 minutes in the world | the card's memory in use that no line counted 3,587 MB and rising -> 1,347 MB and level; "card buffers" made 7,165 -> 5,592 MB; host textures made again after being let go 1,700 -> 357; 150 buffers a frame taken from 170 to 200 kept, none made. In the 13-minute session before it the uncounted memory reached 5.0 GB and the card stayed at its budget of 14.3 GB. On by default. |
LEONIDA_SECTION_MB (the title's physical pages in sections of a few MiB instead of one section an allocation) |
one run each of 4 minutes walking and turning, every run from the same copy of the autosave | none: mean 111.6 ms, median 105.1, p90 139.3, title memory held for mapping changes 43.2 ms a frame, the mapping thread 46.2. 2 MiB: 91.7, 91.8, 111.4, held 10.6, thread 22.6. 16 MiB: 94.4, 91.7, 113.9, held 8.9, thread 20.7. The card is then busy 90 % of the time (78 % without). The launcher sets 16. |
LEONIDA_WINDOWS_BAR_MB (windows of title memory in card memory the CPU maps) |
one standing run each from the same save, with timelines of 20 frames | 0 (all 1,105 windows in the PC's memory): 93.4 ms median, the card running 68 to 73 ms a frame. 3072, the launcher's (759 windows on the card, 797 not): 94.1 ms, 59 to 74 ms. No difference: what the card reads of windows over the bus is not where its time goes. 6144 is not comparable (its view had 4,800 draws). |
LEONIDA_ALLOCATOR_TRIM=1 (host command allocators taken anew when 30 s old, idle host lists let go) |
one standing run from the same save as the run above, 5.5 minutes | private bytes 30.1 GB against 30.7; 1,624 host lists alive against 1,514, 2,448 made against 1,514; 60 to 70 allocators replaced a second. No memory worth the churn on this driver; off. |
LEONIDA_LATE_WAIT=2 (a present settles its frame's flights; asked because El1xr 8fa2de5 counts fewer tile flashes with presents kept behind their frame) |
every frame of the standard moves saved and scanned, one run each way from the same save at night | 2 of 481 frames with a one-frame dip or spike as it is, 2 of 462 with the switch, the same early frames in both: there are no flashes at this place to count, so it is not judged. |
LEONIDA_BARRIER_MERGE, LEONIDA_WIDE_HALF |
A/B of 15 s phases standing, 30 phases, from the same save | neither 78.4 ms mean (median 75.7), barrier merge 78.4 (76.2), half the processors as helpers 78.0 (75.4), both 78.4 (76.3). No gain from either; off. |
Render at 1920x1080 instead of 2560x1440, again (-Resolution 1080) |
one standing run each from the same save, with timelines of 20 frames | at the view of 9,000 draws 75 ms -> 64 ms a frame, at the view of 15,000 draws 88 -> 77 ms; the card running 60 to 68 ms a frame -> 47 to 53. By these two views the frame is about 57 ms plus 2.0 us a draw at 1440 lines and 44.5 ms plus 2.2 us a draw at 1080: of the 57 ms some 28 follow the pixel count and 29 do not. |
LEONIDA_THIN_THREADS=6 with LEONIDA_UNDER_THREADS=4 |
one standing run | not comparable: the title streamed through the measurement (192 ms a frame of mapping changes held, frames of 160 to 580 ms). To be run again as an A/B. |
LEONIDA_PAGE_ASK (a fault asks Windows about its one page, QueryWorkingSetEx, before the region around it; after KyleS98/VIctory-Neo 0fb1e38) |
A/B of 4 s phases: standing with a level for each view (97 phases), walking and turning by pairs of phases next to each other (89 pairs); the faults' own line | The question 5.8 us -> 1.2 us, 210 a frame, every one answered by the page: 1.25 -> 0.25 ms a frame of the title's threads. The frame: standing -0.20 ms (+-0.19; means +0.10 +-0.20), walking -0.24 (+-1.05): none. A fault costs 84 us here (780 a frame, 66 ms of all threads' time), which is the wait for the guards' lock (540 waits and 75 ms a frame standing, 117 ms walking) and the change of protection, not the question: the fork's 245 us a question are regions of hundreds of megabytes, and the sections of 16 MiB keep them short here. On by default. |
LEONIDA_RETIRE_QUEUES (objects let go wait for their submission in a queue to each thread, not in one; after KyleS98/VIctory-Neo 9165dd0) |
the same two runs; the retired objects' own line | 136,000 to 142,000 objects a frame are retired. In one queue 28,400 pushes a frame find the lock taken and spin 33 ms of all threads' time (41 walking); with a queue to each thread 19 wait, 3.3 ms (4.7). The frame: standing -0.06 ms (+-0.19), walking +0.74 (+-0.98): none. On by default. |
LEONIDA_COMMIT_FLOOR=1 (host copies of textures out of use 2.5 s and 60 frames go while less is left to commit than LEONIDA_COMMIT_FLOOR_MB; after kylepelham/El1xr c24c0b2 as 22f73d8 mended it) |
one run each way of 7 minutes walking and turning, the floor set above what the PC has so that it acts all the time | private bytes 31.0 -> 29.4 GB, left to commit 6.4 -> 8.0 GB, host textures alive 7.2 -> 5.5 GB, the card at 88.3 -> 77.3 % of its budget; host copies made again 166,545 -> 410,045 (400 -> 980 a second); the frame median 84.9 -> 84.5 ms, mean 84.0 -> 85.8, p90 95.0 -> 101.0; the look for textures to let go, once a second on the submitting thread, 2.2 -> 11.6 ms. Off by default: 1.6 GB of commit for two and a half times the uploads. At its 4096 MB the floor would not have acted in any run of the night (5.9 GB left at the least). |
LEONIDA_BARRIER_MERGE, LEONIDA_WIDE_HALF, again with short phases |
A/B of 4 s phases standing, a level for each view, 96 phases | barrier merge -0.26 ms (+-0.26; means -0.40 +-0.32), half the processors as helpers -0.11 (+-0.26; means -0.06 +-0.32), of 77 ms: none from either, as the phases of 15 s said. Off. |
LEONIDA_REMAP_SPANS, again with short phases |
A/B of 4 s phases walking and turning, the third of three switches (21 pairs of four phases) | means -1.5 ms (+-1.5), medians -1.3 (+-1.4), p90 -2.5 (+-2.9), of 87 ms. The 153 -> 130 ms of the row above was measured before the sections of 16 MiB, which took the holds for mapping changes from 43 to 9 ms a frame: 1 to 2 ms are what is left for it to gain. Stays on. |
LEONIDA_CARD_AWAKE (a compute loop keeps the card's clocks up between submissions; the launcher set it; KyleS98/VIctory-Neo 38b768c turned its own off) |
A/B of 4 s phases (LEONIDA_AB can name it now): standing at 1440 lines (102 phases) and at 1080 (88), walking and turning at 1440 in two runs (89 and 44 pairs) |
The frame with it against without: standing +2.14 ms (+-0.30; means +2.07 +-0.33) of 72 at 1440 lines, +0.37 (+-0.32; means +0.61 +-0.32) of 66 at 1080; walking +0.68 (+-1.16) and +1.78 (+-1.84) of 83 to 87. The card is 86 to 99 % busy in all four, so there is nothing to keep awake and the loop takes its share. The launcher sets 0 now: a gain standing, nothing the spread shows walking, and what is given up is the case it was made for (a card idle half the frame, which this one is not). |
LEONIDA_STORE_BESIDE=1 (a faulting store of the title's is done beside the guard and the block stays read-only; the same fork measured 32.60 -> 31.17 ms) |
A/B of 4 s phases: standing at 1440 lines (102 phases) and at 1080 (88), walking and turning in three runs (21, 89 and 44 pairs); every frame of the standard moves saved both ways | standing -0.56 ms (+-0.30; means -0.90 +-0.33) at 1440 lines and -2.36 (+-0.32; means -2.15 +-0.32) at 1080, where the processor is more of the frame; walking -1.92 (+-0.94), -0.90 (+-1.63) and -1.64 (+-1.45), together -1.7 (+-0.7). 1.4 to 1.7 million stores a run done beside the guards, 56,000 to 75,000 not understood and 30,000 to 47,000 blocks with too many (those open the block as before), no "title memory not written". 553 and 571 frames of the standard moves: the scan flags 2 without and 6 with, the six a fast turn past a white house and the sky with nothing missing in them. The launcher sets it. |
LEONIDA_INDIRECT_BATCH=4 (a batch stays open past a program whose every buffer store goes through views its bind declares; a record is clamped again behind one bound to it since the pass), against 1 and 2 |
A/B of 4 s phases standing, two switches (_4, _2; both on is 4), a level for each view, 133 phases; and of 4 s phases walking and turning against 1, 92 pairs |
standing, medians against 1: 4 -2.15 ms (+-0.39), both on (4) -2.06 (+-0.39), 2 -3.77 (+-0.38); means -2.07, -1.84, -3.53 (+-0.4 each), of 60 to 82 ms. Walking: means -1.64 (+-1.55), medians -0.60 (+-1.38), p90s -0.74 (+-2.64), of 85. No record ran empty for want of a list's budget in any of the runs (0.00 a frame). 900 to 1,000 batch passes a frame against 1,150 with 1 and 235 to 240 with 2. The launcher's setting from here. |
The sea's fault (its surface or tiled resolve missing for a frame) in every frame of the standard moves at the waterside, by setting of LEONIDA_INDIRECT_BATCH |
the runtime's captures: 489 frames with 1, 1,186 with 2, 1,116 with 4; three scans against both neighbours: colour shares gone and new (seascan.py, above 0.030), water gone with sand or black new (seafault.py, above 0.005), all-black 8x8 tiles; the flagged frames looked at |
flagged with 1: 9 / 3 / at most 156 tiles more; with 2: 11 / 10 / 95; with 4: 0 / 3 / 76. The twelve flagged frames looked at are all the camera's own motion (a hand in view, a fast turn, a black ladder against the sky), the sea intact. None shows the fault with 2 either, so the scans are not shown to find it: they say only that 4 is no worse than 1 here. |
LEONIDA_SMALL_BUFFER_POOL (upload and shared buffers of up to 4 MiB placed in 64 MiB blocks, a piece given back once its submissions have run; after trustno1-coder/VIctory-NVIDIA 95509b9) |
the buffers made, by the line that asked, size and thread (the frame lines, diagnostics); A/B of 4 s phases walking and turning in three runs (46 pairs each) and standing (74 phases, a level for each view); a walking run each way for the memory lines | Without it 63 upload buffers a second (1.6 ms each, 102 ms) and 47 shared (2.9 ms each, 136 ms), on the threads that translate the title's lists; with it 59 and 46 in 14.5 ms together. The frame walking -0.77 (+-2.24), -1.75 (+-1.63), -1.68 (+-2.01) ms, together -1.5 (+-1.1), medians the same, of 80 to 84; standing -0.66 (+-0.48; means -0.46 +-0.51) of 70. Private memory 30.5 against 30.9 GB on average, left to commit 2.0 against 1.8 GB; the blocks at the end 448 MB of upload buffers (330 held) and 1,024 MB of shared (907 held). On by default. |
The rows from LEONIDA_PAGE_ASK down are of 2026-11-28, every start from the waterside save of the next section.
Walking and turning there is no view to fit a level for, so a switch turned every 4 s is judged by pairs: for the
switch of bit b the phases come in runs of 2^b with it off and 2^b with it on, each pair of runs next to each other
gives one difference, and the mean of the differences with its standard error is the effect (ab_pair.py; twelve
minutes give +-1.0 to 1.6 ms for the fastest switch of a run, of a frame of 83 to 87 ms). With the launcher as
those rows left it (the card not kept awake, stores beside the guards) a standing run of four minutes has a mean
of 73.1 ms a frame (median 74.1, p90 78.5) where the first run of the night had 76.6 (74.6, 86.1), and 279 waits a
frame for the guards' lock (52 ms of all threads' time) where that one had 540 (75 ms).
What the PC's memory watch says on this PC (residency; its own line, "memory, the PC's (residency)"). In every
run of 8 to 13 minutes it is under pressure from the moment the world is in and never out of it again (326 of 361
looks a second apart standing, 504 of 539 walking), by physical memory alone: 360 to 390 MB free at the least, with
other programs holding 46 GB, while 5.9 to 7.0 GB are left to commit, above the 4 GiB where pressure by commit
begins. So for the whole of a session texture prefetch is held to 64 MiB a pass, one spare staging block is kept
and spare chunks are trimmed every second. Commit was never critical (0 of 8,300 to 11,400 questions), no texture
pass was refused (of 0.7 to 2.6 million asked for), no new staging buffer (of 105,000 to 492,000), and no allocation
failed. What is left to commit falls by 0.11 to 0.16 GB a minute while walking (7.4 -> 6.1 GB in 11.5 minutes; private
bytes 30.0 -> 31.4 GB): if it went on so, the reserve of 1 GiB for new staging buffers would be reached after some 45
minutes and the 512 MiB for texture passes soon after, and textures would stay away from then on. No run was long
enough to say whether it does go on; a session of an hour with that line in its log would.
Host copies of textures come and go while walking. The card then stays at 88.3 to 89.1 % of its budget, just over the 88 % from which the keep rule lets the longest idle copies go: 281,530 let go and 166,545 made again in 9 minutes (400 a second), 427,483 and 300,043 in 13; standing (the card at 73 to 87.5 %) 33,532 and 1,765 in 8. By the two commit-floor runs 580 more a second are at most 2 ms of the mean frame, so the 400 are about a millisecond of it.
While the title streams (the idle camera is enough: 850 to 1,600 pages of 64 KiB mapped a second) the mapping
thread holds title memory for 90 to 270 ms of a frame in single holds of 45 to 70 ms, and each page costs it 0.4
to 3 ms, nearly all of it in the kernel's unmapping (ZwUnmapViewOfSectionEx is 47 % of that thread's running
samples, NtMapViewOfSectionEx 10 %). Whether the title would stream that much on the console at rest is not
known; its texture read-backs (18 a frame) are where its streaming decisions come from.
Over one standing run the frame follows the draw count closely: 77.7 ms at 8,000 draws, 100.5 ms at 14,000, and 70 ms at 4,800 in another run from the same save, which is about 47 ms a frame whatever is drawn and 3.8 µs a draw. The 47 ms are more than a 30 fps frame has, so the passes that do not grow with the draw count (1,574 direct dispatches, the compute passes of 1 to 4 ms, the copies behind aliased textures) are where to look first.
Runs are only comparable when they start from the same save: the title rewrites its autosave every two minutes, so a start loads wherever the last one ended (a road junction at midday, a house at night). The test scripts put a kept copy of the autosave container in place before each start and the player's own back afterwards.
The sampling profiler (LEONIDA_PROFILE) must not be given the title's own threads
(LEONIDA_PROFILE_ONLY=leonida-image): walking one of their stacks faulted in ntdll 23 s into the window and
took the process down (log s3-prof). The timeline's sampler does not walk them and is safe.
The card's compute passes, aliased views and batch passes (2026-11-28)
The same PC (RTX 4060 Ti, Series X profile, 2560x1440), every start from one copy of the autosave (a deck at the waterside, in daylight), standing. Three things first, about measuring there:
- The idle camera goes round three views of about 24 s each (8,500, 12,500 and 14,700 draws; 71, 79 and 81 to 90 ms a frame), and the same view costs a few ms more or less at another time. An A/B in turns of 15 s is as long as the views and measures them, not the switch (residual 3 to 4 ms a phase). Turns of 3.5 to 4 s, the phases cut into stretches wherever the draw count jumps, the first phase of a stretch left out and a level fitted for every stretch, give a switch's effect to +-0.5 ms in seven minutes.
- A program left out says what it costs (
LEONIDA_AB=<s>,LEONIDA_SKIP_TRY_AwithLEONIDA_SKIP_TRY_A=<hashes>). For the heavy compute programs the lines of a timing run are what they cost in the frame: left out,CS_ProjDecalReduceClassification_Scalarizedmakes the frame 2.3 ms shorter (+-0.55; its line 2.9 to 3.1 ms), the twoCS_ShadowRenderTiledCascadesprograms 2.9 ms (+-0.56; their lines 2.5 together, and which of the two has the larger line changes from run to run: only their sum means something),CS_ProjDecalResolve_VectorizedwithCS_GenerateShadowMasks_HairOnly0.45 ms (+-0.57; lines 1.0). - Phase medians pile up at 71.4 ms in the lightest view (15 of 45 phases of one run, to the tenth of a ms), and go below it with enough taken off the card (65 ms). What holds frames there is not found; means were fitted too.
The form each heavy compute program gets on 32-lane waves, and what the forms cost
LEONIDA_WAVE_WHY=1 on the 24 heaviest compute programs of a timing run, each translated alone into a scratch
cache. Seventeen translate as they are (CS_FinalGather_*, CS_Gather_Classified_*, CS_UpdateParticles,
CS_ScreenProbes_*, CS_GenerateShadowMasks_Checkerboard_NoHair, CS_GenerateMaterialMasks,
CS_ReconstructRaymarchClassifiedFull, CS_BatchCullInitArgs and others), CS_TAA2_Resolve as it is with the
entry ticket of an 8 x 8 group. The others, ms a frame in timing runs (two runs where two numbers stand):
| program | form the chain gives | ms | paired (LEONIDA_PAIRED_FOR) |
wave-wide (LEONIDA_WAVE_WIDE_FOR) |
|---|---|---|---|---|
CS_ProjDecalReduceClassification_Scalarized 1f1fbd86759b3da2 |
without skips, scalars followed (exact, group barriers: 134, most in loops) | 2.85, 3.14 | 0.03, under 0.02 | not tried: the first form takes it |
CS_ShadowRenderTiledCascadesCB be6ce5d849d51127 and ...AlphaCB 922e1d0ee1e19a85 |
the same | 2.48, 2.56 together | 1.60, 1.17 together | not tried |
CS_ProjDecalResolve_Vectorized c4183d3cbee28e8e |
local waves (APPROXIMATE, any mask), without early-outs | 0.53, 0.53 | 0.09 | 36.8 (the frame 96 ms) |
CS_GenerateShadowMasks_HairOnly 0a5ecfee6b79e13b |
the same | 0.47, 0.53 | 0.24 | 0.87 |
CS_DrawBatch f8f50ab85e7b10bb |
without skips (exact) | 0.55 | refused (an LDS operation) | - |
So the forms differ by far more than a factor: the group barriers of the exact forms are what costs (3 ms for a program the paired form runs in 0.03, 37 ms for one in the wave-wide form), and the paired form, which has none, is the cheapest of all, cheaper than the approximate one. Whole frames: 70.5 to 71.7 ms in a timing run with the chain's forms, 67.9 to 68.3 with all five paired, 67.0 with the first three. Left out in turns in a run with the five paired, the classification is no longer anything of the frame (+1.0 ms +-0.5 when it is left out), the two shadow programs 1.3 ms (+-0.5, from 2.9) and the last two 0.8 (+-0.6, from 0.45: no difference).
Every frame of the standard moves was saved with the five paired and with none (526 and 513 frames): the scene, its shadows on the deck, the fence and the player look the same, and the frames the scan flags (4 and 2) are the roof beam passing a camera that looks up, and two darker frames the run without has too. No projected decal is in view there, so the decal programs' pictures are not compared: the launcher names the two shadow programs only.
LEONIDA_LOOPS_WAVE=1 would change four of the 24 (1f1fbd86759b3da2, f8f50ab85e7b10bb, c4183d3cbee28e8e,
0a5ecfee6b79e13b: 28, 1, 52 and 1 loop branches taken by each host wave together). In a timing run with
it the frame is 71.2 ms (70.5 to 71.7 without) and the four lines are 2.87, 0.48, 0.53 and 0.47 ms (3.14, 0.56,
0.53 and 0.53 without): none of them is slower or faster for it.
The copies behind aliased views
All 59 aliased views at this place are R9G9B9E5 views the title places in R32_UINT textures its shaders write
(eleven of 2560x1440, eight of 1280x720, a 2048x2048, cubes, four-level atlases). 86 copies a frame of 57 views,
390 MiB, each through a buffer: 3.6 ms of a timing run's frame, and with no copy made at all
(LEONIDA_EXP_NO_ALIAS_COPY, in turns) the frame is 3.1 ms shorter (+-1.3). Direct3D copies R32_UINT into
R9G9B9E5 texel for texel, so the buffer is not needed (LEONIDA_ALIAS_DIRECT=1, tested on the card): 1.9 to 2.0
ms in a timing run, and in turns of 4 s the frame 2.6 ms shorter (+-0.9). The launcher sets it.
Of the 86 copies 53 are a list's first read of the view with the source as the list found it, 21 follow a write
by the list and 11 another write in the same list; none is made twice in a list without a write between. But by
view the copies outnumber the writes: a 2048x2048 view is copied 4.1 times a frame for 0.9 writes of its source,
seven 2560x1440 views every frame for sources written every other frame, two more 2.0 and 1.9 times for 0.5.
About 150 of the 390 MiB a frame copy a source nothing wrote since the view's last copy, in another list or the
frame before. Two ways on: leave such a copy out at submission (the list's prelude can decide in submission
order, as it does for depth twins), or make no copy: an R32_UINT texture made with R9G9B9E5 among its castable
formats (CreateCommittedResource3) can be read through the view itself, which is all of the 1.9 ms left.
Batch passes and direct dispatches
- The pass that clamps a batch of indirect records runs 1,150 times a frame (
LEONIDA_INDIRECT_BATCH=1): 4.8 ms of a timing run's frame as a command of its own (4.1 us each). With2(a batch ends only at the title's waits and draws) in turns of 4 s the frame is 6.5 ms shorter (+-0.8) with 450 to 600 passes: about 10 us of the frame a pass.2is not usable (it clamps records before the title's culling passes write them). Without the pass's wait for every earlier shader write the frame is the same (+0.3 +-0.3 ms; waiting for its sources only -0.1): the wait is not what costs.3(a batch ends for an execution only if shaders recorded since its pass are bound to memory its record lies in) is exact by what the list declares and takes off 0.8 ms (+-0.5): the passes stay at 1,020 to 1,170, as most records lie in memory some storing shader of the list has bound (root views reach to the end of their buffer). What a dispatch writes has to be known per dispatch, not per list, to get further. 4keeps it per dispatch: a batch stays open past a storing program only if every buffer store of its code goes through a view its bind declares (a table entry of unordered access at a fixed place, the first of its range, or a root view; resource tracking on a thread of its own, once a shader), and a record is clamped again behind a program bound to its bytes since the pass. Standing at the waterside withLEONIDA_BATCH_WHY=1: 900 to 1,000 passes a frame (2: 235 to 240 by the same count), 780 to 840 of them for programs whose stores are not all declared: the meshlet culling passes (CS_BatchCull*Meshlets*, 13 to 26 a frame each, the five of them about 100) andCS_RaytracingResolve(8 to 12 each), then a long tail; 24 to 30 records a frame clamped again behind a writer bound to them (one compute program's dispatch records for the next one's, 32 to 768 bytes). The culling passes and the resolve pick the views they store through from the heap by a number they compute (bindless): what they write is known at no bind, so they still end the batch: 4 takes 2.1 ms off where 2 takes 3.8 in the same run, walking 1.6 (+-1.6; table below). In every frame of the standard moves recorded with 1, 2 and 4 the scans found no sea fault, with 2 neither (table below): the pictures do not tell 4 from 2, and that 4 reads no record before its writer rests on what the binds declare. Not covered by them, as with 1: writes of another list of the same submission, a descriptor the title rewrites between recording and running; nor, withLEONIDA_ABswitching between 2 and 4, the first batches of 4 after a phase of 2.- 1,520 to 1,660 direct dispatches a frame: 46 % run one group, 19 % 2 to 16, 19 % 17 to 256, 12 % 257 to 4,096,
4 % more; 82 % have a program that can store to buffers (which is what ends batches). The layer records no wait
and no pass of its own around a direct dispatch. Their 16 to 17 ms of a timing run are not the many: the 830
under 5 us each (463 of them
CS_ComputeImposterTransform, 0.5 us each) are 0.9 ms together, 15 kinds over 200 us each are 6.6 ms and 42 kinds of 50 to 200 us 4.2 ms: the screen-sized passes.
Where the frame goes at the launcher's default, and what a "native" runtime would change (2026-11-29)
The same PC and save, the launcher's default since e4973b5db: Series X, a 2560x1440 output, the title's own dynamic
resolution from 1080 lines up (it sat at 1080 here), frame generation off for the measurements.
-
The card: 56 ms a frame in a timing run (
LEONIDA_GPU_TIMING=1), busy about 92 % of the frame in plain runs. Indirect executions 31 ms in 12,900 to 13,100 a frame, dispatches 12.9 ms in 1,530, direct mesh draws 5.8 ms in 2,760, clamp batches 3.5 ms in 940. The forty heaviest kinds of command are 26 ms together and the heaviest one 1.5 ms: no one program to take on, a long tail of small draws (indirect mesh draws ask for 44,000 to 53,000 groups a frame together, about four each). -
The indirect executions themselves cost next to nothing. Counted (
LEONIDA_INDIRECT_RUNS=1): every one of them has at most one record and no count in a buffer; none follows one of its pipeline with nothing between; between two of one pipeline the title sets 1.7 tables, 0.9 views and 0.9 constants on average (6,500 of 13,000 such pairs). An empty execution after each of the title's mesh ones (LEONIDA_AB=3,LEONIDA_EXP_EMPTY_INDIRECT, 57 phases): +0.67 +-0.77 ms a frame. Merging executions into longer ones would save nothing. -
The submit thread: 55 to 65 ms busy a frame ("sub worked"), sampled (
LEONIDA_PROFILE, 9,400 samples): the submissions 64 % (refreshes of host copies 14 %, shadow updates 8 %, the write watch 7 %), the presents 22 % (13.5 % of it the present smoother's sleep), and about 45 % of all samples waits. Its own line: preparing 48 ms a frame (copies of title memory 17.6 ms, 65 MB), copying back 23 ms (1.1 MB: mostly waiting for the card). -
With no mesh draw at all the frame is still about 50 ms. Every mesh draw left out by turns of 3 s (
LEONIDA_AB=3,LEONIDA_EXP_MESH_SKIP: 8,600 to 15,000 draws a frame down to 850 to 1,300, about 37 ms of the card's timed work), each phase against the two around it (G:\gta6port\tools\ab_pairs.py, 38 pairs): -7.7 ms (median of the pairs' medians; in the world -5 to -12), the frame 48 to 57 ms. The submit thread then sets it: it works 53.6 ms a frame in that run. Taking work off the card alone stops there; the copies have to go first or together.
So both walls stand at about the frame, and the card is the first. A runtime that lets the card read title memory
where it lies (D33T0X/Native-Runtime, 2026-11-28/29: no per-frame copies, lists recorded straight into Direct3D 12
on the title's threads) takes away part of the second wall, not the first: its shaders come from the same
translator family, and the card's 56 ms are the translated programs' own work. Its world frames took 0.4 to
0.83 s (debug-layer builds, ray tracing off) by its own notes. Leonida already records on the title's threads
(the thin threads) and keeps windows of title memory in card memory the CPU maps (LEONIDA_WINDOWS_BAR_MB); the
title's 32-bit graphics heap read in place cost 290 ms a frame on this card (31,000 fills a frame read out of that
memory on the CPU: LEONIDA_PORT_CONSTANTS, above), so
what may stay on the card follows the console's own memory classes (write-combined garlic the CPU rarely reads,
coherent onion it reads), not a rule for all. Nor does Vulkan open another way on this PC: driver 616.64 offers
VK_EXT_external_memory_host and VK_KHR_map_memory2 but not VK_EXT_map_memory_placed (vulkaninfo, 2026-11-29),
so card memory cannot be mapped at the title's own addresses there either.
Picture faults found on the way:
-
DLSS on Series X: the world black under the HUD (2026-11-29, run d120:
-SeriesX -Dlss quality, which makes the title upscale through FidelityFX,LEONIDA_FSR_UPSCALER=1, with DLSS in that call's place). Every recorded frame of the run is black but for the HUD. The DLSS feature is made (2,560x1,440 to 3,840x2,160, HDR, depth inverted, auto exposure, quality mode, colour format 10) and no evaluation fails (the once-only warning of a failed one never comes), and the output is marked as written on the host (texture::host_written), so what it is given is black or a parameter blacks it. To tell which: the same start with the stretch in DLSS's place and the upscale probe (xstretch,LEONIDA_UPSCALE_PROBE=1): lit there means DLSS's numbers (pre-exposure, exposure), black means the title's colour on that path. The default Series X path (the title's own upscaler) is not affected. Followed up (2026-11-30): with the stretch the world is black as with DLSS (d155), so not DLSS's numbers. Nor the colour input: no target of the title lies in its memory (a test build that would read through one found none, d174), and saved at the end of a frame (LEONIDA_DUMP_TARGETS, every 2560x1440 target of two frames, d175) it holds the lit world, HDR, as the title renders it. With every 3840x2160 target of a frame asked for (d194) none was saved: in that frame the title renders to and writes no texture of the output's size, and the upscale's output is written by our pass alone. What the title reads the world from after the upscale is still to be found; one lead is the size: its upscaler was made for its shipped 1280x720 to 1920x1080 while the output is 3840x2160 here, so a later pass that reads that memory through a texture of its own of another size would find title memory nobody wrote (black), and the alias lookup asks for the same size. The frame's op list (frame-<n>-ops.txt) stops after 2,641 operations, before the lighting and post-processing, so it cannot show those passes as it is. -
The G-buffer's velocity target holds the camera's motion (checked 2026-11-29 on the slow turn's dump of 2026-11-29,
slowdmp: the format-34 target of the pass frame generation tags, mid-turn): the wall, the floor and the trees, none of which move, carry motion, strongest at the nearest surfaces. So frame generation on Series X (LEONIDA_FG_GBUFFER) is given the camera's motion and not only that of moving things; what ghosts in generated frames at the launcher's default is the base rate (about 14 rendered frames a second, so each generated frame stands between two pictures some 70 ms apart), not motion missing from its inputs. -
Frame generation tagged another pass's depth and motion vectors now and then. The title fills a second pass that looks like the G-buffer to the test in
State::set_targets(four or more targets, motion vectors among them, a depth of their size): 960x960, a probe's. Whichever was recorded last was tagged, and recorded at once on the thin threads, before the present of the frame before was served: four switches in four seconds standing. Now each list carries the pass it bound to its submission, 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). -
Console programs' LDS accesses past their allocation reached the translator's own words (the halves' counter, the exchange, the ticket, a packed neighbour's slice): no bound at all before. Bounded now, as on the console (a read gives 0, a write or atomic is dropped), after D33T0X/Native-Runtime 733b7cc and 745db9a (
xlate, GPL-3.0-or-later), whose runs had a program clearing 4,096 bytes of its 3,300 write into the exchange (LEONIDA_LDS_BOUNDS=0: as before). Except the face programs: the face network's operations and the two programs that rebuild a face's normals from its blend shapes use memory past their header's size, and bounded, only the eyes and teeth of a cutscene's faces were drawn (trustno1-coder 9eb44fa6, Victorywillbeours222, on an RTX 5080). The same 25 programs, by the same hashes, are taken as unbounded here (LEONIDA_LDS_BOUNDS_EXEMPT, inshader_cache.rs;=0: none); six of them run in the waterside tour (runs d37, d38), the rest in cutscenes. -
Copy-back elision (
LEONIDA_COPYBACK_ELIDE, from maren-halv/VIctory-DXR) is not usable here. Named inLEONIDA_ABits watching runs in both phases: the submitting thread's list steps took 446 ms a frame against 21.7 in the start before on the same build (frames 495 ms median, the card 25 % busy), and in the whole run it promoted no copy and left out nothing (its own line: 0 promoted, 0 demoted, 0 declarations skipped). What it watches for, a big copy only the card ever changes, did not occur standing at the waterside. -
Windows given a side in the card's memory do not pay either (
LEONIDA_CARD_WINDOWS_MB=1024withLEONIDA_CARD_RESERVE_BUDGETS=1, after TaynanGT/Vice-Tay f3dfb5b; one start each, same save): 345 windows got a card side and none was left in the PC's memory (892 MB read over the bus before), and the frame went from 57.0 to 66.2 ms median (the submitting thread 54.9 to 59.7 ms worked: those windows' bytes are now sent up), at 10,300 and 11,100 draws. Not taken. -
The title's 32-bit graphics heap is five parts the console treats apart. The title makes its 185 MB placeholder into graphics memory with five
MEM_REPLACE_PLACEHOLDERcalls, whose protectionsXMemVirtualAllocnow logs too (they returned before it did): 10 MB0x1004(CPU cached, GPU read-only), 1 MB0x1404(write-combined, GPU read-only), 27 MB0x8404(write-combined, GPU execute-read: command and argument memory), 47 MB0x2404(write-combined, GPU read-write) and 100 MB0x2004(CPU cached, GPU read-write). The copy that carries most of a frame's traffic (174 MB, starting 11 MB in) spans the last four, so the whole-copy rule ofLEONIDA_WC_NO_BACKnever takes it; shader writes declared over its GPU read-only parts can be nothing on the console. Those parts are now left out of what shaders are declared to write (LEONIDA_GPU_READ_ONLY_NO_BACK, on;Shadow::gpu_writes): 1,340 MB a frame were declared there standing, 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 eight list threads, sampled (
LEONIDA_PROFILEonleonida-list, 81,000 samples in a minute standing): 43 % of their samples wait (35 % for work, 8 % on contended locks), so they are not what holds the frame. Of the rest,State::bindis 51.5 % of all samples (mostly through the indirect executions'prepare_for),HostHeap::make_listed17.4 % (view creation 7.9 %, aCopyDescriptorsSimplea slot),readable14.7 %,shadow::lookup6.3 %, the slots' references (HostHeap::keep5.2 %, the COM reference counts 4 %), and the driver and Direct3D runtime about 15 %. Nowkeeptakes no reference for a slot that holds the resource already, and a table's copies can go in one call (LEONIDA_BATCH_DESCRIPTORS, after PL-VIP/sureVI 60cc6e4): in turns of 3 s (66 phases) the frame was the same (-0.01 +-0.31 ms) and no device was lost, so it stays off: the list threads have room, and what they spend does not hold the frame.
What this points to, in order: the CPU's share first, since it stands right behind the card standing and in front
of it moving (the card waited 21.5 ms a frame behind the submit thread on the tour) - the copy-back of
write-combined memory by its memory class (the console's own rules: the CPU reads garlic only uncached, so rarely),
copy-back elision (LEONIDA_COPYBACK_ELIDE), and the list threads' 290 to 340 ms of CPU a frame (the process uses
530 to 600 ms of CPU a frame, 8.7 of the 7600X's 12 threads: at 33 ms a frame there is not room for that); then
the card's own 55 ms.
-
CS_DefragHeap_ComputeRelocations(02384a60fda6f2d0) is dropped every frame, and two particle programs (5e3dd99e0f067aee,57f1b81de55c2842) with it: no 32-lane form takes them. The first is a group of 128 threads (two console waves) that shares LDS between them through atomics (ds_add_rtn_u32,ds_cmpst_rtn_b32), lane counts (v_mbcnt) and lane reads (v_readlane) inside lane branches; the others are one console wave with LDS read and written in one lane branch region (LEONIDA_WAVE_WHY=1). Neither the paired nor the wave-wide form takes them. Since 2026-11-29 the paired form does take the first, after voidopcode/vilocity add4873: a group of several console waves pairs where everys_barrieris one each wave passes once whichever way it goes (the block dominates every end and is in no loop:emit::barriers_on_every_way), its LDS accesses then fenced instead of waiting for the group; and the paired form lowersds_read2st64/ds_write2st64, the atomics with the old value back andds_cmpst_rtn_b32. A program named inLEONIDA_PAIRED_FORnow takes the paired form before its own translation, which is how the five programs that move the heap's blocks get it (CS_RelocateVfxStartIndexLocationand its Alt,CS_DefragHeap_Defrag,_RelocateAllocations,_PostDefrag): they copy overlapping blocks of 1 KB a pass, and in 32-lane halves one half stores over what the other has not read yet (white blotches there from about 130 s into a night walk; none with all six paired, through 174 s, RTX 5080). The two particle programs are taken by it too now, named in the launcher's list: translated alone with their reasons said (leonida translate --warm,LEONIDA_WAVE_WHY=1, a host of 32-lane waves), the exact LDS regions refuse them (ds_add_rtn_u32,ds_write2st64_b32and a buffer atomic in their lane-branch regions), and the paired form, never tried for them as they were not named, takes both (60 and 71 branches taken wave-wide). They were dropped in every run since the first log here. In the game (run d66, a tour) no program of the title failed to translate any more. -
Switching the submissions' own thread off while the title runs ends the title. A tour with
LEONIDA_AB=4,LEONIDA_ASYNC_SUBMIT(run d67, to see whether the floor's one dark frame below follows the line) went from the first phase (off, during loading) to the second (on) and at the end of that one, as it switched back off, the title wrote through a null pointer in its own code, 43 s in. A whole run without the line is the way to ask it: an A/B phase longer than the run, whose first is off. -
The decoration bake's uploads were the one submission waited for in play. Lists run synchronously, counted by where they were run (diagnostics,
sync_callers): on a tour onlydraw.rs's bake pass, 0.17 to 0.22 a frame, 20 to 60 ms each (3.5 to 12.4 ms a frame of a list thread's time). Its synchronous form settles everything in the air so that no list sees a slot's new view before its upload has run and the bake's draw, which picks the slots by index, sees them.LEONIDA_BAKE_AHEAD=1sends the uploads ahead as a flight of their own instead; a thread of ours shows the slots once the card has run them, and a gate in the card's queue (a fence the queue waits on,Host::execute_gated) holds back the list with the bake's draw until it has. With the gate right behind the uploads the card waited 2.2 to 3.4 ms at each while the slots were shown, and in turns of 4 s moving (33 pairs) the frame was the same: medians +0.9 +-1.6 ms (the median pair -0.4), p90 +2.8 +-3.3. The gate now stands in front of the list with the bake's draw instead: on a tour and in turns again, every such submission found it open already (0.04 to 0.11 a frame; none made the card wait, while showing a pass's slots took 0.05 to 9 ms on the gate's thread), and the frame was still the same (33 pairs: medians +2.0 +-1.8 ms, the median pair +0.2; p90 +0.7 +-3.0). The tour's 546 recorded frames had no one-frame fault: the nine flagged are the camera swinging round the player, whose clothes (the bake's own output) were right in every frame. So the list threads' waits for the bake do not reach the frame here, and the switch stays off. -
The card waits for what draws read over the bus. A read-only look at where the card's 55 ms go (2026-11-29) found it 96 % busy at 72 of 165 W and each draw more costing the frame some 2 us at either resolution: waiting, not working. Lists' scratch memory (constant buffers of tables made afresh, some 23,000 a frame; root constant buffers not on 256 bytes; the batch pass's job table) was upload memory in the PC's: each draw's chain on the card began with a read across the bus.
LEONIDA_SCRATCH_CARDputs it in the card's own memory, which the CPU maps through the resizable BAR (D3D12_HEAP_TYPE_GPU_UPLOAD; the same bytes at the same offsets, only written by the CPU). The A/B phase lines now give the card's busy time and the submitting thread's work a frame beside the frame's (ab.rs,ab_eff.py), since the frame stands at whichever wall is longer. In turns of 4 s with the three ports below: moving (133 phases) the card's busy time -1.70 +-0.41 ms a frame; standing (95 phases in 23 views) -0.92 +-0.44, the frame's median -0.91 +-0.63 and mean -1.47 +-0.65. On by default where the card's budget is 9 GiB or more. Less than the bus could have explained, so the card's wait is mostly elsewhere. -
Three submitting-thread ports from ReZOnGithub/VIctory-lap, measured in the same runs (standing, the submitting thread's work a frame): a list's fronts found once at its close (
LEONIDA_LIST_FRONTS, 0ced255) -0.81 +-0.27 ms; joined without a table of their copies and let go on the reaper (LEONIDA_FRONTS_LEAN, 91ca3fd with 9ea4cac's single-list join) -0.68 +-0.27; a submission's own bytes copied beside the recording of their list (LEONIDA_SEND_TAKE_BESIDE, 003e55a) -0.54 +-0.33. Their check modes, moving, found the old way's answers exactly: 78,426 fronts and 21,883 takes (49.6 GB) compared, 0 that differed. A fourth, the threads that translate what the submitting thread waits for raised and taken first (LEONIDA_HURRY, ac97e48), never fired here (the line never stood at a recording not translated yet). All four are on, as there. -
The BC7 textures DirectStorage unpacks were wrong in 73 % of their blocks. trustno1-coder/VIctory-NVIDIA f9de61c5 reads the BC7 dictionary's entries with all 32 index slots in order (the word after an entry's widths, the widths again, is pixel 0's index), where this decoder skipped that word. Each reading passes its own unit test, so it was settled against Microsoft's decoder (
BCPack.dllof the local GDK, used on this PC only and never in the repository): blocks made from each dictionary entry and packed by the DLL's own compressor never use the dictionary (its references reach the dictionary only before a stream's first 255 blocks), so the title's own streams were saved as DirectStorage hands them over (LEONIDA_BCPACK_DUMP=<folder>, local only) and unpacked both ways. Of 381 BC7 streams (2,866,176 blocks) every one had blocks unlike the DLL's (2,101,646 in all: a block predicted from a wrong entry is wrong, and so is every block predicted from it) with the word skipped, and none with it read. BC1 (400 streams), BC3, BC5 (120) and BC6 were alike already. -
Three picture fixes measured free and turned on (2026-11-29). Picked writes (
LEONIDA_PICKED_WRITES, aki's fix for skinned characters' torn and flashing triangles; off since the runtime was taken over, never measured here): standing in turns of 4 s (87 phases in 19 views) the frame's median -0.02 +-0.75 ms, the card's busy time +0.06 +-0.45, the submitting thread +0.08 +-0.47; 60 of the 575 buffers the heap shows unordered views of were found written through picked views, and a recorded tour of 598 frames had no fault. A partly mapped texture read again the frame after a write (LEONIDA_PARTIAL_WRITTEN, trustno1 dbba4ad7): moving in turns of 4 s (89 phases) the frame's median -0.45 +-1.58 ms, the card -0.47 +-0.44, the submitting thread +0.05 +-0.38. Textures painted through another view looked at every 8 frames for good (LEONIDA_PAINTED_EVERY, trustno1 cbf5d68d and 76db3ec3) ran on through all of these with no fault (a look reads 48 KiB). And from VIctory-lap 2a31a14, whether a copy is asked about ahead is noted when its list closes (Fronts::watched) instead of asked of every copy at every submission. -
The approximate forms shaded the player wrong in sunlight. Of the 34 compute programs the chain gives an approximate form on 32-lane hosts (each half-wave its own results; listed above), eight are now in the launcher's
LEONIDA_PAIRED_FORbeside its three: the four opaque temporal resolves, the sun's two shadow masks and the lights' two cluster passes. Two recorded tours of one build from the same save, these approximate against paired (runs d33, d34, the standard tour, aligned to within a few frames): in sunlight the player's cap (a light grey front, a dark brim) came out black as if in shadow with the approximate forms and lit with the paired ones, the shirt and arms evenly lit; indoors both were alike. Timed on the card (runs d36 and d39, each command timed in its own submission): those eleven paired cost 1.74 ms a frame against 1.60 approximate; all 33 that have a paired form, 1.98 against 2.31 for the eleven (the projected decals' vectorized resolve, c4183d3cbee28e8e, 0.46 ms approximate and 0.07 paired), the frames alike and no device lost. A recorded tour each way (d37, d38) showed nothing broken in either, so the launcher names all 33. -
Device-removed data costs the card its breadcrumbs.
LEONIDA_D3D12_DRED=light(auto breadcrumbs and the faulting address) againstfaults(the address alone), two pairs of standing runs with frame generation (d35): the card 89.1 and 89.3 % busy against 82.6 and 83.3, the frames' means 66.7/65.0 against 65.1/65.0 ms (the submitting thread is the longer wall). The launcher keepsfaults;lightis for a removed device that needs the command it stopped at. -
Ports of 2026-11-29 for the shader translator (one re-translation of everything): global stores and atomics count as UAV writes for the early-depth decision (trustno1 788fe236); a sum of two high halves (
v_add_f16with op_sel) is not taken for the wave reduction it resembles (Bebrik229); SDWA sign-extended 16-bit selects write their sign (lower.rswrite_half); mesh loops closed by a plain jump leave at the iteration limit through their own exit instead of aret, which lost the group's shared memory and triangles on NVIDIA (LEONIDA_MESH_LOOP_EXITS, trustno1 6bbb6bca, with the zeros a half write keeps of a register without a value); readers and computed values indexed once per lowering, the same output faster (trustno1 7cc0d153, 101Leafy: one program 25 s to 2.6 s); and containers whose program is a raw FSSM record (XDAT kind 0x0c, three text programs) read instead of dropped (fuzeofficial's reader through MiniVI 96e788c7). Each with its own unit test. -
Two lock passes from the forks gain nothing here. Slot writes of other views into slots with no placed texture view leave that heap's lock of placed views alone (
LEONIDA_SPANS_QUICK; Belobug a284ca7 via readmet3xt 96dfd9bb8 and trustno1 #1937: 4 of 16 ms of the submitting thread waited there), and notes that change nothing leave the texture queue's lock alone by marks of what it holds (LEONIDA_QUEUE_MARKS, readmet3xt-lab b377071: 33-44 s of other threads' waits in 150 s there). In a start here 17.4 of 18.1 million slot writes took the quick way and 20 million notes left the queue's lock alone, but in turns of 4 s standing (runs d41, 150 phases) the frame's median moved +0.30 +-0.25 ms and +0.26 +-0.25, the submitting thread +0.15 +-0.19 and +0.16 +-0.19: these locks were not what anyone waited for on this six-core PC. With the quick way counting itself per thread in batches instead of in one shared counter, two more runs by turns (d43) gave the submitting thread +0.12 +-0.50 and +0.30 +-0.31 ms again. Both are off by default now (=1turns each on; the marks and the set of slots are kept either way), kept for a PC whose threads do wait there. -
Measured by turns and kept as they were (runs d43, two runs, 154 phases): 8 parts of submissions joined against 2 (
LEONIDA_JOIN_PARTS_AB=2, the value ReZOnGithub/VIctory-lap f2c7109 found 0.87 ms better there): with 8 the frame's median -3.09 +-0.51 and -3.03 +-0.26 ms, the submitting thread -4.66 +-0.33 and -4.60 +-0.18, so the launcher's 8 stays. The write-watch asking joined across gaps of 8 MiB against 256 KiB (LEONIDA_ASK_GAP_KB_AB, the gap of elaboratecl/VIctory-AMD-4K c825a48): with 8 MiB the card's busy time -1.08 +-0.50 and -1.14 +-0.22 ms, the frame -0.73 +-0.56 and -0.27 +-0.30, so 8 MiB stays. The copies put back into title memory (LEONIDA_COPY_BACK, 9,216 copies and 52 MB in a run of 8 minutes) cost the frame's median -0.33 +-0.50 and +0.34 +-0.25 ms, the submitting thread +0.06 +-0.33 and +0.28 +-0.17: on. And 16 parts against 8 (runs d49, 147 phases): the frame's median -0.05 +-0.40 and +0.12 +-0.31 ms, the submitting thread -0.43 +-0.31 and -0.40 +-0.21; the frame does not stand at that thread alone, so the launcher keeps 8. And 8 against 4 (run d296, 2026-12-01, 112 phases; at most 4 is what ImTaneax/VIctory-RTX3050-4gb 2b3030f measured faster than 16 on a laptop RTX 3050): with 8 the frame's median -0.43 +-0.88 ms, means +0.37 +-0.98, the card +0.12 +-0.35, the submitting thread -3.18 +-0.32: 8 stays. -
What a frame waits for, from a timeline of three frames standing (run d46, 50 ms a frame; the first start of a new translation, so the driver's background thread was still compiling, 39 ms a frame): the card ran 27.5 ms a frame and stood 22.4 ms between submissions, behind a DirectStorage thread (7.6 ms of that idle chain), textures' refreshes (2.9) and the submitting thread's steps. The processor is full: the eight threads that translate lists ran 20 to 31 ms a frame each, the submitting thread 51, and the title's own threads spent 42 ms a frame in 278 write faults of the guards (
a fault looked at, the longest 9 ms). The runtime's own count agrees: 337 waits a frame for the guards' lock, 76 ms of all threads' time (run d43), the faults' waits ended by the submitting thread and the heap sync holding that lock. Renderer port #6 (LEONIDA_PORT_GUARD, the lock shared by faults, claims by block) was measured only in 22 phases in an older state (no gain then). In turns of 4 s standing (runs d50, 147 phases) with it: the frame's median -0.62 +-0.34 and -0.41 +-0.22 ms, the submitting thread -0.61 +-0.28 and -0.57 +-0.12, the card's busy time +0.53 +-0.26 and +0.52 +-0.10 (fed sooner); the launcher sets it now. -
The presents' pacing costs nothing. The smoother holds a present on the submitting thread (11 ms a frame in the timeline of run d51), but in turns of 4 s standing (
LEONIDA_PRESENT_SMOOTH, runs d52, 144 phases) the frame's median moved -0.14 +-0.42 and -0.33 +-0.34 ms, the card's busy time +0.29 +-0.24 and +0.04 +-0.25, the submitting thread's work +0.16 +-0.26 and -0.01 +-0.24, while the median of the phases' jitter of the title's presents fell from 8.7 ms to 6.6 and 7.5 (about 52 phases each way per run): it stays on. The same phases put the walls where they stand: frames of 58 to 78 ms, the card busy 52 to 64 ms a frame, the submitting thread working 45 to 53. -
The frame is the submitting thread's work. Standing on the launcher's settings (run d54, 300 s): 71.4 ms a frame, the card 87 % busy, and the thread that prepares the title's submissions working 67 to 69 ms a frame with some 21 submissions waiting in its line (63 a frame, 44 of them joined to the one before); the title's threads waited 30 to 32 ms a frame at their presents for it. The eight list threads used 340 ms of processor a frame, over half of the process's 560 ms of user time on the six cores.
-
The list threads' own costs, cut by four switches, do not move the frame by turns. Each is off unless set and A/B-able: a per-thread cache of table entries' views checked by generation, and of placed views' shapes (
LEONIDA_VIEW_CACHE; ReZOnGithub/VIctory-lap 242d0c6); a view of a table read in place that the list brought up to date is left so while the list's epoch stands (LEONIDA_ENTRY_ONCE; VIctory-lap 1d52e85; a view of an aliased texture is gone through again, one whose staging was put off is not taken as ready); a placed texture found with nothing the host writes in its memory is found so again without the table's lock while the table is unchanged (LEONIDA_ALIAS_QUICK; VIctory-lap 242d0c6, here for the answers that find nothing); and tables made afresh known by their heap and what they hold, not by where they lie in the title's heap, the title's own slots of each place still made a table's (LEONIDA_CONTENT_TABLES; the content-addressed tables of crossducking/RAZDA4A-XEN's wave 15 notes, written anew). They do what they are for: 98.5 % of entries' views answered from the cache, 96 % of entries read in place found brought up to date, 92 % of placed textures found empty without the lock, 3 % of the fresh tables found again at another place. The sampled list threads (profilelist-d58, all four on): bringing views up to date 8.8 % of their samples (14.7 in the morning's profile), waits for contended locks 4.4 (8.0), the threads idle 38.8 (35.0); their time 324 ms a frame against 340 (run d54, launcher's settings). By turns of 4 s (run d56): the first run gave the frame's median -0.24 +-0.38, -1.59 +-0.39, -0.65 +-0.48 and -2.87 +-0.58 ms; the second, its phases spoilt by a scan of logs on the PC until five of them were left out, +0.22 +-0.43, +0.50 +-0.43, +0.30 +-0.53, +0.49 +-0.67. Repeated on a quiet PC (runs d62, 70 and 77 phases): the view cache +0.16 +-0.31 and +0.10 +-0.25, the entries' memo -0.70 +-0.31 and -0.55 +-0.27, the placed textures' answers +0.16 +-0.38 and -0.36 +-0.31, the tables by what they hold -1.19 +-0.50 and +1.25 +-0.45 (the card's busy time -0.63 and +1.98: two runs that say opposite things). The frame waits for the submitting thread and the card more than for these threads (as VIctory-lap found, 1d52e85). So the entries' memo, the one gain in all three clean runs, is on now (LEONIDA_ENTRY_ONCE=0: off); a tour with all four on (run d60) flagged the same kinds of frames as one without (the deck below, the camera's cuts); the other three stay off. -
What the submitting thread does (profile
submit-d61, 11,540 samples, standing): 28 % waits; refreshes of copies by span, shared with three helpers, 14 %; copies brought up to date (Shadow::update) 9 %; the write watch asked 7 % (the kernel's own walk 6 %); the title's bytes under flights' writes 7 % (merge_under_writes); the presents' planes 5.5 %; closing host lists 5 %, 3.6 of it the empty lists given to the title's lists at their submission, which the title's next call resets. Those are now reset and closed by the thread that recycles run lists (LEONIDA_CLOSED_AHEAD, on;=0: closed by the line's thread, as before). By turns of 4 s with a list keeping its dynamic slots' resources once (LEONIDA_KEEP_BY_LIST, VIctory-lap 1641cb6;keep_refwas 5.4 % of the list threads' samples), runs d65: the frame's median -1.33 +-0.58 and -0.44 +-0.25 ms for the closed lists, -1.33 +-0.58 and -0.51 +-0.25 for the keeping (the submitting thread -0.51 +-0.28 and -0.53 +-0.15); both on. The list ahead of each frame (its passes over the heap's views, 8 to 10 ms) held the line 0.1 to 0.6 ms a frame in a plain run and 5 to 9 ms in the sampled ones: the sampling's own. -
Six list threads, not eight. The eight threads that translate the title's lists stood idle 39 % of their time (profile
list-d58) while the title's threads waited for a core on the frame's chain (3.2 ms a frame "woken, not running yet", timeline d59). Two of the eight parked by turns of 4 s (LEONIDA_THIN_PARK), standing, two runs: the frame's median -0.83 +-0.16 ms (run d69) and -0.94 +-0.52 (d73), the submitting thread -0.49 +-0.12 and -0.74 +-0.62, the card's busy time -0.76 +-0.20 and -0.07 +-0.44. The launcher starts six (LEONIDA_THIN_THREADS=6); four against six is not measured yet. -
What a frame rate is measured against: the PC's own load. After a power cut and restart (2026-11-29, 16:55) the same build that stood at 16.2 to 17.3 frames a second at the waterside save (runs d62 to d69, 15:07) stood at 12.8 (d73, 17:06, no change of the layer in between): the process's CPU time 559 ms a frame against 420, the fault handler 39 ms against 27 for as many faults. Memory ran at its rated 5,200 MT/s, the processor at 4.7 GHz, the card at its usual 165 W in P0; what the restart brought back was the programs that start with Windows: SignalRGB about 0.75 of a core by itself, Wallpaper Engine decoding its video on the card, a Roblox client, BlueStacks' service and others, against a title whose threads already take 9 of the 12 logical cores. Runs compared by turns or alternated within one sitting stay fair; frame rates of different sittings are only compared with the PC's background as it was (
G:\gta6port\tools\run_fps.pygives a run's frames a second, CPU time and faults over its measured stretch). -
Open: the title's stores that change nothing. The handler of the title's faults is entered 2,400 to 2,950 times a frame, 26 to 51 ms of the title's threads' time (run d69), and only some 360 of them open a guarded block. The rest are single stores done beside the guards (
LEONIDA_STORE_BESIDE): over that run 3.2 million done, 10.8 million left out because the memory already held what was stored, 0.1 million not understood, some 2,000 a frame. One place in the title's code made 3.7 million of the left-out ones and changed memory 30 times. The loader can rewrite such places at the start so that they read before they write and do not fault when nothing would change (leonida-loader/src/write_sites.rs,LEONIDA_WRITE_SITES=<file>: a run notes the places, the next start rewrites them), but the launcher does not set it. The three busiest places, 7.4 of the 10.8 million, are anorof a byte with a constant (a flag set in a loop over objects), the kind it rewrites; the next ones are moves of three or four bytes, too short for the jump. A noted place names the patched image, whose file name carries the hash of the original executable (PreparedImage::file_name), so notes are not applied to another one. To be measured: a start that notes the places, then starts with them rewritten against starts without. The title'smemcpystores (the C runtime's, some 1.7 million of the run's faulting stores, mostly changing memory) are whatLEONIDA_COPY_BESIDEtakes beside the guards; it was never measured either. Measured (runs d113 to d116, standing at one save, on, off, off, on so that the driver's cache warming between them favours neither): a start with the notes rewrote 11 places; the faults fell from 2,400 to 2,500 a frame to 1,400 to 1,470 and the stores left out for changing nothing from 10.8 million a run to 1.0 million, but the handler's time only from 41.5 to 39.5 ms a frame (the faults gone were the cheap ones), and the frame did not change: 12.88 and 12.85 frames a second with it, 12.69 and 12.89 without, over the stretches with no pipeline compiled in the game. The frame waits on the card and the submitting thread, not on these faults. So the launcher leavesLEONIDA_WRITE_SITESunset: a rewrite of the title's code at its start for no frame.LEONIDA_COPY_BESIDE(the title'smemcpy,memmoveandmemsetthrough the runtime's own, which write beside the guards), by turns of 4 s standing, two runs (d117): the frame's median -0.64 +-0.48 and -0.25 +-0.49 ms, means -0.34 +-0.47 and -0.10 +-0.45, the submitting thread -0.73 +-0.37 and -0.26 +-0.37, the card -0.31 and -0.22. The same way both times but within the spread: a few tenths of a millisecond at most, for the title's copies taken over. Left off. Shader writes declared over the write-combined parts of copies that are not write-combined whole, left on the card asLEONIDA_WC_NO_BACKleaves whole ones (after kylepelham/El1xr'sVICTORY_SKIP_WC_BACK), by turns of 4 s standing, two runs (d128): +0.19 +-0.67 and +0.40 +-0.50 ms, and 0.0 MB a frame ever declared in such parts. What the title's shaders write in write-combined memory lies in copies that are write-combined whole, which the switch that exists already leaves on the card: the per-part form was taken out again.LEONIDA_TEXTURE_HASH_BACKOFF(a texture whose bytes hashed the same four turns running is hashed one turn in 16), by turns of 4 s standing, two runs (d118): the frame's median -1.67 +-0.81 and -0.76 +-0.82 ms, means -1.61 +-0.78 and -1.00 +-0.90, the submitting thread -2.88 +-0.50 and -2.62 +-0.49, the card -0.58 and -0.27. A gain of about a millisecond a frame, three of the submitting thread; what it risks is a quiet texture's change seen up to 16 turns late, which a tour with it on is to show. The hash itself (texture::digest, over a texture's memory at every check that is not skipped, and over all of it the first time it is seen) was a fold of 64x64-bit multiplications that ran at 23.5 GB/s at every size from 16 KiB to 256 MiB: the multiplications were its limit, not the memory. Eight lanes of AES rounds (texture::digest_aes, with AES-NI, the folded one without) run at 139, 121, 108, 114 and 70 GB/s on 16 KiB, 256 KiB, 2 MiB, 32 MiB and 256 MiB (best of five,digest_speeds, a Ryzen 7 7800X3D: 4.6-5.9 times from cache, 2.9 times from memory). A first version, whose lanes met by one round, had pairs of one-bit changes with one digest (1,328 in a million with four lanes; the test of pairs has the eight-lane form as its negative control, 83 in its pairs); with each lane through two rounds before they meet, none in 2.2 million pairs (the test as first run, with every third bit of the 520 bytes; it keeps every seventh to take 7 s), as with the folded one. No frame time was taken with it: the 38 to 40 MB of guarded textures the code counted for one save a frame are 1.7 ms at 23.5 GB/s and 0.3 to 0.6 ms at the speeds above, on the submitting thread. -
Open: the copies behind aliased views could go. The title reads R32_UINT textures its compute programs write through R9G9B9E5 views it places over them, and the host copies the texels into a texture of the view's format through a buffer (
texture::alias; 1.0 ms of a timing run's frame for the 2560x1440 one, about 1.6 ms with the others). Driver 616.64 says it casts formats relaxed (RelaxedFormatCastingSupported), and makes an R32_UINT texture castable to R9G9B9E5_SHAREDEXP (checked 2026-11-29): the view could read the source itself. Castable formats come only with the creation calls that take an initial barrier layout (CreateCommittedResource3,CreatePlacedResource2), while the runtime keeps legacy states for every texture: to be done with that in mind. -
The card's time is the title's programs. Of a timing run's heaviest commands (run d39) the title's programs are 47.2 ms a frame and ours 4.6 (the batches' clamp 2.6, the aliased views' copies 1.6). So the translated programs' own cost is what the card's half of the frame waits for. Two exact rewrites from trustno1-coder/VIctory-NVIDIA d08360e3 (mizzied) make many of them shorter: 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); both on, the program stores the same bits (testfloat_max_min_and_med3_with_constants_store_the_same_bits_rewritten, on the card and on WARP over signed zeros, denormals, NaNs and infinities). -
Open: a sunlit floor the camera turns onto is black for one frame. In the standard tour (run d38, frames 4030 and 4062, the turn back past the house's corner) the deck as it comes out from behind the wall is drawn black in the first frame it shows and lit in the next; framescan finds 9 such dips in that tour's 636 frames (the other flagged frames are motion). Not the light stand-in (it averages the frame before over cells, so it is not black where the frame around is lit): more likely a temporal pass keeping the wall's shadow on the newly shown pixels. Ruled out with every screen-sized target of 23 frames of the turn saved (
LEONIDA_DUMP_TARGETS,LEONIDA_DUMP_SIZE=2560x1440, run d48, the turn key held while each frame was saved): the motion vectors (R16G16_FLOAT, smooth over the turn, the player apart), and an R8 mask of the view past the railing that dips to half in one frame, which is the title's own frame parity (255 and 127 in turn, every frame). Frames saved seconds apart did not show the black floor itself: what takes it needs frames in time. -
A list's prelude no longer uploads a texture from title memory over another list's host write (
LEONIDA_UPLOAD_GUARD, trustno1 e530c003, aventureroestelar-source: a face in noise or black for a whole scene, about one launch in three there). Written down from a reviewed spec: the write is noted at the writing list's submission only while the texture is still the title's (a texture released and made again at its address does not inherit it). -
R9G9B9E5 views read in place cost the card less, not the frame (PR #2660,
LEONIDA_ALIAS_CAST, on), 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 submitting thread -0.06 +-0.30 and -0.29 +-0.31. The frame here waits for the submitting thread (0.0 ms on the card in the frame line), so the card's 1.3 ms shows only once that thread is quicker. Kept on. -
Where the submitting thread's time goes, sampled (2026-11-30, the merged build
31439e0b4, standing, Series X, frame generation;LEONIDA_PROFILEevery 4 ms from 200 to 260 s, runs d180 and d181). The submitting thread is busy 68% of its samples and waits 32%. Of its waits, 53% are inqueue::ahead_of_frame(the list ahead of each frame: the views' pool looking at the heap's slots), about 12 ms of a frame of some 80; 20% inHost::submithelping the wide pool refresh copies and waiting for its last jobs; 5% in a descriptor drop; 2% for landing jobs. Its work (inclusive):Host::submit66%,ahead_of_frame25%, the wide refreshes 13%,stale_under_flights7%, the write watch 6%, the driver 6-7%,merge_under_writes6%, the present 6%. Meanwhile our helper pools stand idle: landing 97.8% of their samples waiting, records (9 threads) 99.7%, the wide pool 94.6%, picked textures 99.9%, the heap sync 95%; the six list threads are busy 76%, of it the tables (State::tables6.3% self,descriptor::view_at5.3%, the per-recording views 4.0%). So the frame stands on one thread waiting for pools that are mostly asleep: main's wider pools and the list ahead split in two (whab1/whab2by turns) are the first thing to measure, and the views made by a list thread kept past its recording (the VIctory team's table view memo with epochs, through kylepelham/El1xr) the next, once epochs are kept for every change of a texture's or a buffer's host copy. -
Main's switches of 2026-11-29 on this card, by turns of 4 s standing (two runs each, no pipeline past its wait). Its three new launcher defaults (d198):
LEONIDA_QUICK_FIND_WINDOWSthe frame's median -0.00 +-0.44 and -0.16 +-0.48 ms, renderer port 2 (LEONIDA_PORT_DESCRIPTORS) -0.40 +-0.44 and -0.68 +-0.48, scoped copy forgetting (LEONIDA_COPY_SCOPED) -0.76 +-0.53 and -0.86 +-0.54 (the submitting thread -0.98 and -1.17): together a millisecond or so here against 2 to 3.4 ms each on the RX 6800 they were measured on; kept on. The helper counts and the list ahead split (d196):LEONIDA_VIEW_THREADS_WIDE-0.17 +-0.25 and -0.27 +-0.35,LEONIDA_RECORD_THREADS_WIDE+0.18 +-0.25 and +0.38 +-0.35,LEONIDA_AHEAD_SPLIT-0.22 +-0.29 and -0.73 +-0.39 (means -0.65 and -0.66),LEONIDA_WIDE_HALF+0.84 +-0.34 and +1.24 +-0.44 (the card +0.73 and +1.70; the submitting thread works 0.6-0.9 ms less, the frame is slower: six helpers beside the title's threads on six cores). So wider pools do not take away the submitting thread's wait for the list ahead of the frame that the profile shows; the list split in two takes about half a millisecond. The same night, by turns of 4 s standing, two runs each:LEONIDA_BATCH_KEPT(d185) -0.35 +-0.37 and -0.28 +-0.44 ms median,LEONIDA_PRESENT_SMOOTH(d186) -0.12 +-0.40 and -0.07 +-0.37: neither moves the frame (the smoother is for the steadiness of presents, which these fits do not see). With frame generation a stable 30 frames shown needs 15 rendered, 66.7 ms a frame: the standing frame is 63-82 ms by view (79 on average, d156), the tours' 71-73. -
After a translator change the world waits for the pipelines the warm did not make. Standing and touring with chain30's build (new translations): pipelines not made within their 10 s wait (
LEONIDA_PIPELINE_WAIT_MS=10000, each waited for once) were 10 in the second run (d173), 55 in the third (d154) and none in the fifth and sixth (d156). Two timelines of the third run, at 200 and 280 s, each hold a frame of about 10 s, 9,933 and 8,646 ms of it on one pipeline worker: the frame's whole budget spent on pipelineswarm --usedhad not made (mostly mesh and pixel programs). It ends as runs add them to the used list; until then a measured run is not one, so after a translator change the measured runs come after tours. -
From a key to the first frame that shows it: three frames either way (runs d187, d188, 2026-11-30).
latency.pyover every presented frame of a standing run, around twelve turns of the camera each: as the launcher plays (frame generation 2x on this card) the median 351.9 ms, p90 479.5 ms over 11 probes; native frames alone (LEONIDA_FRAME_GEN=1) 310.0 and 417.2 ms over 11 (a twelfth turn not seen within 60 frames). Recording every frame spaces the presents 105 to 137 ms apart, and in both runs the first frame that moves is the third presented after the key (one probe the fourth, one the fifth). So the delay is three frames' length and frame generation adds some 40 ms to it: what shortens it is the frame (at a tour's 71-79 ms a frame, about 220 to 240 ms). -
The title's own ray tracing draws right, at 3 to 7 frames a second (run d189,
-RayTracing, 2026-11-30). The switch translates every shader again (96 s) and makes the 4,873 used pipelines anew (601 s on 8 processes, median 230 ms each, the longest 21 s). In the tour the deck's shadows and the water look as they should in the frames seen, and the frame line reads 3.0 to 6.7 fps, a median of 217 ms a frame, 79 to 203 ms of it on the card (the structure builder and the traced passes) against a 71-79 ms frame without; standing (run d190) 2.9 to 8.2 fps, a median of 158 ms. So it stays off by default: the rays would need the host's own ray tracing (DXR) to be playable, not this path. -
A steady frame comes out of the title's threads and the card more than out of ours (timelines of run d200 at 200 and 280 s, standing, frame generation off, 2026-11-30). By cause, per frame, the chain each frame came out of: the title's threads 22 to 30 ms (one of them 13 to 37 ms of its own code at a stretch), its waits that end by themselves (Sleep) 5 to 8.5 ms (a thread waking every 0.2 to 0.5 ms for 26 ms on end), our list threads' calls 5 to 8 ms (single calls of 5 to 11 ms), the host's Present 2 to 7 ms, threads woken but not yet running 1.4 to 3.9 ms, the submitting thread 7 ms. The card is busy 96 to 99 % of most seconds by our count (nothing of ours queued 0.6 to 3.0 ms of 77 to 92), while its track in the timelines has stretches of 25 ms at 6 to 61 %.
-
The frame meter's lines beside the present do not move the frame (
LEONIDA_METER_BESIDE, after kylepelham/El1xr d7ff66ab; by turns of 4 s standing, runs d202 and d203): the frame's median +0.07 +-0.37 and +0.00 +-0.34 ms, means +0.27 +-0.42 and -0.34 +-0.43, p90 +0.35 +-0.92 and -0.82 +-1.35; the card +0.02 and +0.18, the submitting thread's work +0.65 +-0.34 and +0.18 +-0.28. In the present they held the line's thread 37 ms in a frame of d141's timeline (16.4 ms of itVirtualQueryfor the copy counters' busiest ranges), a frame of a compile storm: in a steady second they are short enough not to show. Kept on, for the seconds when they are not. -
The list ahead of each frame, sampled (run d201,
LEONIDA_PROFILE_ONLY=leonida-ahead,leonida-views, 200 to 260 s): the thread that records it waits 85 % of its samples and used 6.7 s of processor in the 60 (some 8.6 ms a frame); 54 % of its work isheap_buffer_passitself, and by line (DbgHelp's line tables over the samples' own addresses) 81 % of that is making the copies' spans (SweepRanges::spans), 11 % setting the slots' ranges. A part's span held its copy (anArc), and about every part of the 16 is made again each pass, so some 70,000 holds on copies other threads hold too were taken and let go a pass: the parts now keep a slot that shows the copy, and a pass takes one hold on each copy, which goes on into what it refreshes. -
No torn frames at night at the waterside, with the card's steps or without (vilocity's report of what shaders wrote merged under the title's writes with the card's steps; runs d204 and d205, the standard tour with the clock set to 23:00 by the game actions, every frame recorded): with
LEONIDA_CARD_STEPS=2as the launcher plays, 545 frames and one flagged in the tour itself (frame 3475, two cells darker as the deck comes into view on a turn: the frames around it show motion, no torn rows and no black block); with0, 517 frames and none. The card's steps stay as the launcher has them. -
The list threads' costs, sampled again (run d207,
LEONIDA_PROFILE_ONLY=leonida-list, 200 to 260 s; the timeline's list calls of 50 us or more were 309 ExecuteIndirect calls a frame, 51 ms of the list threads' time): 99 % of an ExecuteIndirect isState::execute_indirect, 85 % binding (State::tables73 %, the per-list views 22 %), and 11 % waits for contended locks; of all the list threads' waits for contended locks, 55 % were underplaced_texture, the lookup of a texture the title placed in its memory in one map of 69,000 behind one lock (and, in diagnostics builds, a second lock and a tree's search to count the filler twins). Those lookups go to 64 tables read under shared locks first now (LEONIDA_PLACED_SHARDS); by turns of 4 s standing, two runs (d209, d210): the frame's median -0.09 +-0.61 and +0.23 +-0.41 ms, p90 +0.02 +-1.98 and +0.80 +-0.88, the card +0.25 and +0.08. The frame does not wait for these threads enough to show it, as with the earlier switches of theirs. Kept on. -
The pass over the heap's buffer views, sampled again after the spans' slots (run d208 against d201, the same window):
heap_buffer_pass's own samples 7.9 -> 4.5 % of the thread's, its whole 14.0 -> 14.9 %: the holds were not what took the time. What does is the walk over the slots of the parts made again (30 % of the pass's samples, an iterator of its own now) and the tables' work (30 % in the pass itself): almost every part is made again every pass, as the title's slot writes fall in all sixteen. -
main's indexed heap buffer spans take 1.6 ms off the frame on this PC (
LEONIDA_INDEX_HEAP_SPANS,d367675c7, which keeps each copy's span up to date as its slots change instead of making the parts again; on in the launcher). By turns of 4 s standing, two runs on the merged build (d212, d213): the frame's median -1.64 +-0.35 and -1.61 +-0.48 ms, means -1.42 +-0.39 and -1.36 +-0.47, p90 -1.73 +-0.95 and -0.63 +-0.79; the submitting thread's work -0.68 +-0.35 and -0.98 +-0.37, the card -0.26 and -0.42 (on an RX 6800 its author measured -4.8 ms walking). The first gain of the night that the frame shows: the line's thread waited for the pass. -
What ends the indirect batches now (run d211,
LEONIDA_BATCH_WHY=1, standing): 926 to 988 batches opened a frame and as many clamp passes (948 a frame were 3.9 ms of d183's 55.7 ms of timed card work, the heaviest kind of command); 785 to 841 of them ended by a program whose stores are not all declared, every one of the eight that end most for views it picks from the heap (compute programs 13 to 22 times a frame each, as the meshlet culling passes that write the records the draws after them read), 27 to 28 for a record declared written since the pass, 52 to 55 for a full table, 2 for a copy; 7,353 to 8,012 executions read from an open batch. A batch could stay open past such a program only if what it picks could not be the records' memory, which no bind declares: left as it is. -
The texture queue kept by due frame: the textures' part of the list ahead 4.64 -> 3.40 ms a frame (716fc15d7; runs d214 and d215, the list ahead recorded by its one thread,
LEONIDA_AHEAD_SPLIT=0, sampled the same way). With main's indexed spans the list ahead was the slots' looks 3.6 ms, the spans 0.19 and the textures 4.6, and of the textures' part the biggest function was the walk over the 25,000 queued slots for the 100 to 470 due (2.6 % of the thread's samples, 0.3 % now). The whole list 8.98 -> 7.80 ms, the thread's work 13.8 -> 9.9 % of its samples, the line's thread standing for it 5.19 -> 4.94 ms; the frame 71.7 and 72.1 ms (one run each: the card sets it). -
A steady frame's chain on
497bdd039(timelines of run d216, indexed spans and the texture queue by due frame in): at 200 s the title's thread 14.6 ms a frame, our list threads' calls 14.2 ms (long calls 7.9, recording 6.4), threads woken but not running 2.7, the submitting thread 6.3, the list ahead's buffer views 0.4; at 280 s DirectStorage's inflating thread 11.2 ms, the title's Sleeps 10.6, threads woken but not running 8.7, the title's threads, faults looked at 4.4. ExecuteIndirect's calls of 50 us or more 51 ms a frame of the list threads' time in 292 to 309. The list threads' three switches of 2026-11-28 by turns again (d217, d218,LEONIDA_VIEW_CACHE,LEONIDA_CONTENT_TABLES,LEONIDA_ALIAS_QUICKtogether): the frame's median +0.11 +-0.38 and -0.46 +-0.32, +0.12 +-0.38 and -0.25 +-0.32, -0.17 +-0.44 and +0.30 +-0.36 ms: none moves it, as then; they stay off. -
The "black floor for one frame" of the recorded turns was the camera, not the renderer (runs d220 and d226, 2026-11-30). framescan.py flags a cell that is darker than the same cell in the frames before and after it; in a fast turn of the camera (some 150 of 1,280 pixels a frame) a dark wall between a bright window and the bright view past the house's corner crosses such a cell in one frame, which reads as a dip. Seen at full size, every flagged frame looked at (d220 3784 and 3816, d226 2718 and 2911) shows the wall where it should be. The A/B of d226 (no batches against
LEONIDA_INDIRECT_BATCH=4, 30 sweeps of the camera each way) then has nothing to tell: the phases faced other views, and the darkest one-frame cells of both (pixels of 3 or less,blackscan.py) are the black weight plates on the deck moving across the picture. A flash check of turning frames has to follow the picture's motion first. -
Frame generation's motion vectors on Series X are in the title's own units (checked 2026-11-30 from the upscale probe lines of runs d155, d174, d175 and d194,
-SeriesXwithLEONIDA_FSR_UPSCALER=1): the title gives its FidelityFX upscale a motion vector scale of [1.0, 1.0] (FidelityFX: the texture's values are pixels of the render size, pointing to where the pixel was in the frame before), no jitter cancellation (flags 0x0), near 10,000 and far 0.15. That is what the G-buffer path tags (fg.rs,gbuffer_at_present: pixels, scale 1/width and 1/height, depth inverted, the same near and far), so a wrong scale or sign is not what makes generated frames ghost. What the path still lacks is the title's reset on a camera cut (always false) and its real field of view (60 degrees given; the probe reads 0.471 rad). -
One more launcher:
scripts\play-X-1080-1440p.ps1(-SeriesX -Lowest 1080): the title's own dynamic resolution between 1080 and 1440 lines, the two heights the owner asked for, about 13% shorter frames thanplay-X-1440p.ps1.
What frame generation shows (2026-11-30, recorded runs d227 to d232)
The capture at our present saves the frames the title renders; with DLSS Frame Generation the screen also shows one
DLSS-G makes between each two, presented by Streamline on the native swap chain behind its proxy. With
LEONIDA_CAPTURE_SHOWN=1 (diagnostics, crate::shown) the native swap chain's Present and Present1 are hooked
and every buffer it presents is saved too (shown-<n>.png, shown-times.txt). Streamline's native swap chain gives
no queue through GetDevice, so the copy goes on the presenter's queue; in the recorded sweeps every shown frame is
either a rendered one (mean grey difference 0.05 to 0.3 of 255 against its own rendered frame) or one between two
(20 to 34 against both), in strict turns. The series tools shownpair.py, shownphases.py, shownstrip.py and
madequality.py sort, count and draw them.
-
Generated frames across a menu were made along vectors that do not join the two pictures. A present with no G-buffer pass of its own (the pause menu, the map, a loading screen) tagged the last frame's depth and motion vectors with
resetfalse, and so did the first present after such ones. In the pause menu, opened and closed four times from the waterside save, the frame made while the menu's panel slides in shows the world warped under it and the button prompts doubled into unreadable text. Such presents are now told as resets (LEONIDA_FG_RESET_STALE, on;0: as before), and so is a present whose G-buffer pass has other depth or motion textures than the last one. By move, rendered and generated frames shown (runs d230 with, d231 without):move with resets without standing 20 / 21 22 / 21 camera sweep 76 / 80 75 / 80 opening the menu 71 / 28 66 / 63 in the menu 200 / 6 201 / 204 closing it 66 / 6 75 / 66 back in the world 111 / 120 110 / 116 So the world goes on being generated as before, and the menus and their changes no longer are. In a standing and sweeping run (d228) the resets came at the end of loading (31) and in the menus only.
-
The motion vectors frame generation is given are right. The G-buffer pass's format-34 target, the one tagged (run d232,
mvdmp: four frames of a turn dumped as they are,<name>.bin), holds pixels of the 2560x1440 target: medians of -21 to -81 over the background as the turn speeds up, up to 458. Every pixel of each frame looked up in the frame before at its position plus m times its vector (mvwarp.py): m = +1 fits best in all four (mean grey difference 4.8, 6.2, 6.6 and 6.3 against 12.5 to 15.8 with no motion, 17.8 to 34.3 with m = -1). That is the FidelityFX and DLSS convention (where the pixel was) in the units frame generation is told (mvecScale1/width, 1/height). -
What ghosts is the gap between rendered frames. In camera sweeps the background moves some 41 of 320 pixels from one rendered frame to the next (a recorded run renders 8 to 10 frames a second), and the generated frames between show trees and window frames doubled and a smeared band at the leading edge. They follow the motion (nearer the motion midpoint of their neighbours than to their cross-fade in 78% of 55, median distances 12.6 against 17.8), so DLSS-G uses the vectors; it cannot fill a gap of 70 to 120 ms cleanly. The owner's "huge amounts of ghosting" with frame generation on is this: a shorter rendered frame is what makes it smaller.
-
The rendered frames of a tour hold no one-frame flash. Every frame of the standard tour recorded (run d233, 511 frames) and scanned with
flashscan.py(each frame aligned to its neighbours by phase correlation and a search of +-12 pixels per cell, then cells that match neither and are 30 darker or brighter than both): 29 frames with 91 such cells, all in the turn back, where the camera swings into the player and the title fades him out over a few frames (his head half seen through) and branches and window frames move against the far view. The olderframescan.pyflags every dark thing the camera moves across a cell (the "black floor" above).
Where the card's time is not (2026-11-30)
-
NVIDIA's own forms of max/min/med3 and the legacy product (
LEONIDA_HOST_FLOAT, on) cost and gain nothing in the standing scene (2026-12-01; KyleS98/VIctory-Neo e23accf from readmet3xt-lab/foxhound 9b11fac5). Timing runs at 1,080 lines, no generated frames: d294 before, 51.82 ms of the card's timed work a frame; d306 with them, the second run of their pipelines, 51.81. (The first run, d303, right after compiling all 4,875 of them, gave 54.51, and the clamp passes, which the change does not touch, were 0.55 ms slower in it too: the driver's background compiles of new pipelines, as after every translation change; a timing run of a new translation is to be the second.) Every form gives the console's bits on this card (host_forms_give_what_the_spelled_out_ones_give). Left on: the code is shorter, and the source measured the title's pipelines 50.7 -> 40.3 ms in replays of the night drive on an RTX 4070 SUPER where the old forms spilled. -
Near surfaces taking the light stand-in's estimate (
LEONIDA_AMBIENT_NEAR=1, off) is not shown to be needed here (2026-12-01, runs d304 without and d305 with, the tour recorded, no generated frames). Its source (DoubleGhosty/cool_fox b0906d4, NoLogicAlan's fix of its issue #151) saw stale 16x16 probe tiles kept on faces and hair by the pass's larger-of-two; Leonida's pass caps what was there by the estimate already, and no such mosaic was found in the frames without it. The two tours ended their moves in other places (the frames of a move are not the same views from run to run), so the comparison is of the frames each has: faces and hair clean with it, a corridor by a window very dark with it (the source's own caution: it may darken rooms that are right). Left off; a standing comparison of one view is what would settle it. -
Up to 6 GB of title memory windows in card memory the CPU maps instead of 3 moves almost nothing on this PC (2026-12-01, run d314,
LEONIDA_WINDOWS_BAR_MB=6144, standing, no generated frames). With 3 GB (run d309) 759 windows lay there (3,156 MB) and 340 in the PC's memory alone (1,500 MB, read over the bus); with 6 GB, 798 (3,344 MB) and 413 (1,744 MB). The windows' line (80 hundredths of the card's budget) stopped them, not the cap: the budget was 12.2 GB, 10.1 GB of it in use, as other programs held 4.4 GB of the card's 16 (counted with nothing of ours running:\GPU Adapter Memory(*)\Dedicated Usage). The frame's median 76.2 ms against 73.7 in d309 (other views of the idle camera). The launcher's 3 GB stays; with the card's memory free, more windows would go there under the same line. Over that run the card received 3.9 GB/s over PCIe at the median (10.3 at p90) and sent 5.1 GB/s (11.3 at p90;nvidia-smi dmon -s t, the samples at 80 % use or more), on a PCIe 4.0 x8 link. -
The paired form for the heaviest single compute passes is no clear gain (2026-12-01, timing runs d312 without and d316 with 16 of them added to
LEONIDA_PAIRED_FOR, the second run of their pipelines). The screen probes' temporal resolve, the biggest at 2.0 ms, is the same either way, as are TAA and the shadow masks; the bent cones (0.51 -> 0.24 ms) and the probes' injection (0.48 -> 0.24) gain, the probes' spatial filter (0.42 -> 0.63), the material masks (0.34 -> 0.69), the deep ocean texture (0.63 -> 0.89) and one final gather (1.03 -> 1.31) lose. The classified passes moved both ways with what the idle camera faced (the terrain and foliage of the two runs differed by 1.5 ms each). Not taken. -
A clamp pass waiting only for its record buffers is no quicker than one waiting for every shader write (2026-12-01, run d302,
LEONIDA_AB=4,LEONIDA_EXP_BATCH_WAIT_SOURCES, 109 phases standing, no generated frames): with it the frame's median +0.07 +-0.39 ms, means +0.10 +-0.39, the card busy +0.26 +-0.37, the submitting thread +0.01 +-0.23. A barrier on the record buffers costs the card what one on every resource does. Left as it was. -
Legacy multiplies as plain products where the zero rule cannot apply are worth about 1 % (2026-12-01,
LEONIDA_LEGACY_PLAIN=1, off). Timing runs standing at 1,080 lines, no generated frames, the same build, with every pipeline loaded from the library (d294 without, 81 reports; d297 with, 85): the card's timed work 51.82 -> 51.25 ms a frame, the heaviest kinds moving both ways by up to 0.17 ms (as much as two runs of one build differ: d283 and d294, 51.75 and 51.82). In the heaviest mesh programs compares and selects run one to one with the multiplies (the foliage skin program,89a622617919c92a: 14,872 DXIL instructions, 1,468 compares, 1,408 selects, 1,018 multiplies, 627 raw loads), so taking part of them away is little for a card that waits inside its work rather than computing (below). Left off. -
The card runs at full speed and well under its power. Sampled every second through a tour (run d234,
nvidia-smi, the 269 samples at 80 % use or more): graphics clock 2,715 to 2,730 MHz, memory 9,001 MHz (its most), P0 throughout, 101 W median (62 to 105) of its 165 W limit, 54 C, use 99 %, memory controller 37 %; the only clock event reason 0x400. So nothing throttles it and memory bandwidth is not the limit; a card this busy that draws two thirds of its power is waiting inside its work rather than doing much of it. -
The waits for every earlier shader write are not what it waits on. All of them left out by turns of 4 s standing at 1440 lines, no generated frames (run d235,
LEONIDA_AB=4,LEONIDA_BARRIER_WAITS: the title's barrier groups, 1,080 to 1,124 a frame, and the two of each of the 961 indirect bounds' passes; timing only, shaders may race): the frame's median +1.73 +-0.81 ms with them, means +1.84 +-0.76, the card +1.81 +-0.76, the submitting thread -0.06 +-0.53, of 75 to 115 ms. Some 2,000 waits a frame cost under 2 ms; what is left is the programs' own time, latency more than arithmetic by the power they draw. -
Frame generation costs a rendered frame about 6 ms. Generated frames on and off by turns of 4 s standing at 1440 lines, no Reflex frame limit (run d237,
LEONIDA_AB=4,LEONIDA_FG_TURNS, 114 changes of the amount): with them the frame's median +5.82 +-0.43 ms, means +6.04 +-0.41, p90 +10.25 +-1.30, the card +6.76 +-0.36, the submitting thread -1.46 +-0.55, of 72 to 94 ms. That is DLSS 4's generator (nvngx_dlssg 310.9.16, Streamline 2.14.16) with the depth, motion vectors and picture without the interface it is given; no newer one is cheaper. (The first run of the switch, d236, measured nothing: the start of Streamline went through the A/B pick and its first phase was off; fixed.) -
The title's compute queue holds little of the card's work, so running it beside the drawing queue would gain little. The console runs the title's compute queue (
{COMPUTE, pipe 1, queue 0}) beside its drawing queue; the host runs every submission on one queue. The operations of a standing frame (run d239, adumpfile at a move:frame-3102-ops.txt, whose SUBMIT lines name each list's queue: 15 submissions from drawing queues, 19 from the compute queue), each weighed by its kind's card time a frame in timing run d183 (G:\gta6port\tools\queuesplit.py): the drawing queues' lists about 50 ms, the compute queue's 1.6 ms (928 dispatches, 425 of them one small program e30970f1727063fd), and the lists recorded in that frame but submitted with the next one's work about 22 ms (mesh draws). So at most some 1.6 ms of the frame could overlap the drawing queue's work: a second host queue is not where the card's time is. -
Float compares tell a NaN by its bits now (
LEONIDA_NAN_EXACT, on; after vilocity 598050b). The title's NaN guards are float compares, which the NVIDIA driver may fold under fast math; a NaN let through spreads in the temporal filters as black blocks. With the change (runs d240 to d242, the same build otherwise): the same 202 of 25,687 programs do not translate as before; the first start makes its pipelines in the world (as after every translator change), and in the next two tours no pipeline waits; the card's time a frame 36.5 ms against 36.8 in the tour before the change (d233); the frames' scan shows reflections and leaves in fast turns, no black block. (The 340 to 430 draws a frame "dropped without a host pipeline" in every run, before and after, are the ray tracing structure builder's, left out on purpose while ray tracing is off.) -
Three list threads instead of eight on this six-core processor: fewer of the worst frames, a slower frame. KyleS98/VIctory-Neo 6eaa2f3 gives a six-core processor three (a quarter of its logical processors) after twice the frames over 50 ms in camera turns with eight. Here, 20 camera sweeps as the owner plays (1080 to 1440 lines, frame generation on), every present's time logged (
LEONIDA_FRAME_TIMES,G:\gta6port\tools\ftstats.py, the last 90 s), two runs each in turns (d248 to d251): eight threads mean 79.4 and 77.2 ms, median 77.3 and 74.1, p99 129.4 and 134.7, frames over 150 ms 9 and 8; three threads mean 83.8 and 80.1, median 84.2 and 78.0, p99 115.5 and 131.0, over 150 ms 2 and 5 (over 100 ms 99 and 85 against 112 and 58). Some 4 ms a frame slower for fewer spikes past 150 ms at this frame rate:LEONIDA_THIN_THREADSstays at eight. -
DLSS on Series X, the black world, where the upscale's output goes (runs d246, d247,
-SeriesX -Dlss quality): the title's FidelityFX output is a title texture of R9G9B9E5 (format 67, 3840x2160, 33.4 MB at its address), its host copy 16-bit float, and at the first upscales no other title texture lies in that memory (the new log line "the upscale's output and the title textures in its memory"). The passes after the upscale work on two other 3840x2160 16-bit float textures in turns (ops 611 and 622 offrame-1454-ops.txt), whose tables name neither the output nor its memory, and the frame's last pass reads no texture through a table: what carries the upscaled picture to them is a view the program picks from the heap or one made later, which the op listing does not show. Next: name the views picked from the heap in the listing, or log every 3840x2160 view made after the first upscale. Then (run d252, the placed-view lead looked for whateverLEONIDA_COPY_BACKsays, which brings back only textures the title fills): no view is placed in the output's memory after the upscale writes it, so the passes after it read the output texture itself through views picked from the heap, which the listing does not show. Left there. -
Settling copies in the card's memory instead of merging under the flights' writes costs this PC 53 ms a frame (
LEONIDA_MERGE_CARD_COPIES, after vilocity ccb27fd, whose night walks found the merge tearing moving cars and people into big flat triangles for single frames, at 16 ms a frame there). By turns of 4 s standing at 1080 to 1440 lines, no generated frames (run d253): with the merge the frame's median -52.82 +-1.22 ms, means -56.11 +-3.39, p90 -70.25 +-11.26, the card -8.58, the submitting thread +6.68; settled, 0.5 to 3 waits a frame for flights, 8 to 13 ms. The merge stays on; the switch is there to tell a tear from it, and what is left is to find the bytes the merge gets wrong (this save has no traffic to tear: a place with cars and people is needed to count tears). -
What the up-copy check finds under the merge, and where the torn frames more likely come from (run d254,
LEONIDA_UPCOPY_CHECK=1standing, police called by the trainer's wanted level 2, 250 s). The check now notes the pieces merged under flights' writes as such and counts, for every piece sent, the words the title changed whose card value is neither the old one nor the title's (the card wrote them since). Merged words that went over the card's: 30 to 50 a second, in bursts of 1,700 to 4,400 in two seconds of the run, nearly all in two buffers of 2 MiB (0xd5c005080, 0xd5c645e80) of floats in -1..1. Few, and the merge's order (the title's bytes behind the flight) is the console's when the title waited for the flight; so the merge itself is not shown wrong. What the same run shows every second instead: refreshes of title memory that a flight in the air is writing through another copy of it, some 280 a second (upcheck::reads): the 4 MiB buffers at 0xdab000000 and 0xd49400000 refreshed while flights wrote 4 bytes to 32 KiB inside them through copies of their own. Such a refresh sends title memory as it was before the flight, and the submission's draws read that: the note that came with VIctory-NVIDIA's runtime calls it "triangles flung across the screen with the relay on" (LEONIDA_RELAY_CROSS=1settles the flights for it, off). Settling for the merge's sake lands those flights before such refreshes as a side effect, which would give vilocity's result.LEONIDA_CROSS_COPY(on) mends them on the card instead: the bytes of a refreshed range whose last writer among the flights in the air or being landed is another copy go from that copy's card side to the refreshed one's, behind the submission's sends, the writer's own card side having taken the title's changes there first (host/cross.rs). By turns of 4 s standing (run d255, copies in the card's memory only): the frame's median -0.20 +-0.30 ms, the card -2.27 +-1.95, the submitting thread +2.07 +-0.32 (the search held every flight's declared writes; it now looks at what is refreshed under flights' writes first). It mended 0.6 crossings a frame and left 25 to 47 alone, every one of them a refresh of a copy in the PC's memory, which it takes now too: run d257, 31 to 42 copies on the card a frame (200 to 580 KB) in 2 to 4 submissions, none left alone, none settled. What that costs, by turns of 4 s standing with the driver's cache warm (run d258, 110 phases): the frame's median +0.31 +-0.46 ms, means +0.12 +-0.58, p90 +0.47 +-0.96, the card -0.24 +-0.32, the submitting thread +1.56 +-0.25 (the search and the writers' merges). On by default; whether the torn cars and people are gone is for a walk with traffic to tell (LEONIDA_CROSS_COPY=0turns it off). -
Our own lists take 7 to 8 ms of the card's 70 a frame (run d263,
LEONIDA_OWN_STAMPS=1, a timestamp at the start and end of each, standing at 1080 to 1440 lines, no generated frames): the sends to copies in the card's memory with their hash passes 3.1 to 3.9 ms in 12 to 14 lists (27 MB a frame over the bus, in 77,000 to 100,000 ranges), the compares behind submissions 3.4 to 4.7 ms in 17.5 (10,100 pieces of 64 KiB, 370 of them fetched), the copies between copies ofLEONIDA_CROSS_COPY0.02 to 0.04 ms. The indirect batches' clamp passes (3.6 ms in the timing run) are in the title's lists, not these. -
Only the changed dwords sent up do not pay (
LEONIDA_SEND_CHANGED, off since run tile1-0; nameable inLEONIDA_ABnow). Its sends take 1.2 to 1.7 ms of the card (5.5 MB a frame, 280,000 ranges; run d264). By turns of 4 s standing (run d266, 93 phases): the card -1.95 +-0.16 ms, the submitting thread +5.08 +-0.36, the frame's median +0.77 +-0.33, means +0.87 +-0.32, p90 +0.99 +-0.72: the submitting thread holds the frame as much as the card does, and the compare and the ranges cost it more than the card saves. A recorded tour with it on (run d265, 468 frames) had no fault (rooms lit, no torn geometry; the flagged cells were reflections and edges in a fast turn). Off. -
What the card compares after submissions is nearly all one range (run d272: the five-second lines count the compares of copies in the card's memory now): 0x3d330000+0x9300000, the 147 MB of the title's heap that views of the whole heap declare written (the skinning passes',
host/card_steps.rs), 4 times a frame, 624 of some 660 MB a frame; every other range 1 MB a frame or less. Comparing only the pieces found written lately would leave what shaders wrote elsewhere out of title memory until a later compare, and other copies refreshed from title memory after the flight has landed (when no crossing is seen any more) would take the older bytes: the torn geometry again. Not done. -
Parts of submissions joined, measured again with thin lists on (as the launcher has them since; the table above has 8 against 1 with them off at nothing). 8 against 1 by turns of 4 s standing (run d273, 111 phases at 7,500 to 15,000 draws): the frame's median -8.93 +-0.39 ms, means -10.42 +-0.40, p90 -15.67 +-0.86, the card busy -9.69 +-0.35, the submitting thread -12.61 +-0.38; 63 parts a frame, 43 of them joined to the one before. A recorded tour with it (run d274, 507 frames) had no fault (the flagged cells were fast turns). 16 against 8 (run d275, 108 phases): the frame's median +0.02 +-0.40 ms, means -0.18 +-0.40, the card -0.16 +-0.31, the submitting thread -0.65 +-0.32: nothing more to join. The launcher's 8 stays; the code's default stays 1 for starts without it.
-
Batches of indirect records stay open past programs that only read through views picked from the heap: 928 clamp passes a frame become 175 to 186, the card 3.7 ms a frame lighter (
LEONIDA_BATCH_HEAP_READS, on; 2026-12-01). WithLEONIDA_INDIRECT_BATCH=4a batch ended at any storing program that picks buffer views from the heap by an index it computes (draw.rsstores_declared: its use of the table of strides), 793 of the 928 batches a frame standing (run d275,LEONIDA_BATCH_WHY): the meshlet culling passes and, behind them, the 934CS_RaytracingResolvedispatches a frame (265 programs, 1.4 ms of the card's timed work), each of which ended the batch the next one read its record from. Butpipeline::stores_boundalready says no of every store that goes through a view not found at a fixed place of a table or around a root view, a picked one among them: what the extra rule left out was programs that only read through picked views (bindless material data). Without it (run d311): 175 to 186 batches a frame, 8 of them ended for stores not declared (scalar stores, code not known), 44 to 47 for a record declared written since the pass (the culling passes store their records through views their binds declare: 27 before) and 50 to 53 for a full table or another source; 8,300 to 9,000 executions read from an open batch. By turns of 4 s standing (run d310, 53 phases): the frame's median -2.11 +-0.69 ms, means -1.86 +-0.86, the card busy -3.67 +-0.43, the submitting thread +0.48 +-0.73. A timing run with it (d312) has the card's timed work 60.5 ms a frame against 63.2 (d306), the clamp passes 5.2 ms in 205 against 7.0 in 930 (each pass now clamps more records, and a timing run counts its wait for what came before in it). The recorded tour (d313, 520 frames): 37 frames with one-frame cells, 67 cells, all in fast turns (the camera through the player's head, palm trunks and the house's wall sweeping by), at the low end of the tours before (29 to 62 frames, 91 to 176 cells); terrain, foliage, the house and the player drawn. The batch pass also reads its job, the job count, the experiments' bits and the budget at once now (the job waited for the count, and the budget took an atomic read of its own and a compare and exchange: four trips to memory one behind the other), and a pass whose jobs fit in one group and all fit in what is left of the budget adds them with one atomic it does not wait for; what it writes and charges is the same (the batched clamp's WARP tests: budget charging, cut dispatches, the clamp of one execution against the batch). -
The write-combined part of a mixed copy is left out of the copy-back too: the card and the submitting thread 1 ms a frame lighter each (
LEONIDA_WC_SUBRANGE_NO_BACK,f85d1790aby hardly-relevant, on since 2026-12-01). The copy the compares behind submissions go over most (147 MB of the 32-bit graphics heap, four times a frame) spans the heap's GPU read-write parts: 47 MB write-combined (0x2404) and 100 MB cached (0x2004). The rule for whole write-combined copies (LEONIDA_WC_NO_BACK) never took it; this one subtracts the write-combined part, asLEONIDA_GPU_READ_ONLY_NO_BACKdoes the read-only ones, so what shaders write there stays on the card (the console's CPU reads such memory uncached, rarely). By turns of 4 s standing (run d317, 55 phases): the card busy -0.99 +-0.40 ms a frame, the submitting thread -0.99 +-0.40, the frame's median -0.68 +-0.61, means -0.48 +-0.68. The recorded tour with it (d318, 581 frames): 49 frames with one-frame cells, 79 cells, all where the camera swings (faces close by, palm fronds against the sky), as in the tours before; nothing torn. -
Mesh executions launched by an amplification stage, with no clamp pass (
LEONIDA_MESH_AMPLIFY,indirect/amplify.rs). The title's mesh draws are indirect executions of one record each, written by its culling passes: 8,600 a frame standing at the waterside, clamped by 955 batch passes (run d275,LEONIDA_BATCH_WHY: 802 of them ended by programs whose stores are not all declared). A benchmark on the card (9,000 mesh draws of about a microsecond each; not committed): records clamped every 9 draws 23.9 ms, read as they are 10.8 ms, through an amplification stage that reads the record itself 10.7 to 11.5 ms. A wait for every earlier shader write every 9 draws costs nothing there (11.1 ms) unless the stage declares a writable view: with the list budget's view, 4.4 ms against 1.1 for the lightest draws and 241 against 200 for heavy ones, the view merely declared and never written as much. So the stage writes nothing: with the switch, mesh pipelines are made twice, the second time with a stage that reads the record through a root view appended to the root signature and launches X groups, Y and Z as 1, none past 65,535 (the batched clamp's rule for a mesh record), and the execution waits for earlier writes alone where a batch would have opened; mesh shaders declare the stage's payload with the switch (D3D12 refuses the stage in front of one that declares none: E_INVALIDARG; one that declares it runs without the stage too). The list's budget is not charged for these records (the largest of the title's in 55 runs with batches asked for 2,828 groups). In the world (run d276) 7,540 mesh executions a frame went through the stage with 18 waits a frame: the batches still opened for the other indirect executions carry the waits the mesh ones need. A recorded tour with it (d276, 419 frames) drew the terrain, foliage, the house and the people as without it (the flagged cells were fast turns). By turns of 4 s standing it is slower (run d279, 108 phases): the frame's median +4.42 +-0.40 ms, means +6.52 +-1.27, the card +7.64 +-0.68, the submitting thread -0.00 +-0.35. The passes did not go: 860 batches opened a frame in that run against 871 without the stage (d275). They open for the indirect dispatches and vertex draws, and the mesh executions only read from batches those had opened; what the stage adds, some 0.6 us of the card a mesh draw (about 12,000 a frame through it in its phases), is all that changed. The benchmark's draws (one mesh program of a few instructions) did not show that cost. Off; the switch stays, mesh pipelines are made only with it, and translations are as before without it. (Its first runs also compiled some 570 of the stage's pipelines in the game after a warm that had made them, not found why; with the switch off nothing of it is made.) -
The title told at its first signal, and three frames ahead, do nothing here (after ImTaneax's VIctory-RTX3050-4gb bd79bb1 and 5f0a1d5, measured there on a 4 GB laptop card where the title polled 32 to 81 ms a frame for the card). Both by turns of 4 s in one run standing (d280, 112 phases): the relay landing up to the title's first signal and telling it at once (
LEONIDA_RELAY_EACH) the frame's median +0.73 +-0.46 ms, means +0.85 +-0.49, the card +0.32 +-0.28; three frames ahead against one (LEONIDA_SUBMIT_FRAMES=3) +0.60 +-0.46, means -0.31 +-0.50, the card -0.06 +-0.28. Here the card is the wall (about 95 % busy): the title learning sooner, or running further ahead, has nothing to win. Both off. -
Lists' scratch in the card's memory pays here, and its spare chunks are now kept to the card's budget (
LEONIDA_SCRATCH_CARD,LEONIDA_SPARE_CARD_GROW). Main turned card scratch off by default (TheGeogeo'sf8ad7e245, #2819: on an RTX 3090 the card's pool of 256 MiB let go of every chunk given back past it, 1,158 were made a second, 35 ms a frame ofMakeResident, the frame 64.6 ms against 33.3 without). Here, by turns of 4 s standing on that main (run d281, 103 phases, the old pool): on against off, the frame's median -1.15 +-0.36 ms, means -0.84 +-0.38, the card -1.72 +-0.30, the submitting thread +0.45 +-0.34; 48 chunks a second made in the card's memory (28,800 in 597 s) and 3.7 ms a frame waited for their residency (median of the five-second lines; 2.84 at p90 with it on all the time in d275). Some 500 MB of scratch stood in use or spare against the 256 MiB kept. With the spare chunks kept up to a sixteenth of the card's budget (1 GiB at most), those kept longest let go first, and a guard that sends new chunks to the PC's memory past 1,000 made in 10 s (run d282, the same A/B, 96 phases): on against off the frame's median -1.87 +-0.30 ms, means -1.61 +-0.40, the card -1.94 +-0.24, the submitting thread +0.10 +-0.32; 19.5 chunks a second made in the card's memory (10,600 in 544 s), 1.0 ms a frame waited for residency (2.96 at p90); the guard never tripped. So card scratch is on again by default where the card's budget is 9 GiB or more. What the guard does on a card like TheGeogeo's is not measured here: past 100 chunks a second it puts new chunks in the PC's memory for the rest of the run, which was the default there. -
A full driver cache file made every start compile in the game, and the launcher stopped seeing it. The launcher's precompile makes the pipelines in eight processes, which NVIDIA's driver gives one cache file each; the first of each series (
...cffeec2.nvph, the runtime's) had reached the 4 GB "Shader Cache Size" cap, so the pipelines its process made were never kept and some 600 compiled in the game at every start (run d276: 920 being made as the world opened, 2,222 draws dropped in a frame, frames of up to 1.1 s). The 19 files were moved aside (G:\gta6port\DXCache-leonida-old-1201, 29.3 GB). The start after that compiled all 4,875 in the game (d278): the launcher's note of its cache files had been replaced by the one file a precompile with nothing to make had touched (d277). The note now keeps what was noted before beside what a precompile wrote. The lasting fix stays the driver setting: "Shader Cache Size" unlimited. -
Pages written since they were taken go up by the 4 KiB that changed: the frame 1.7 ms shorter (
LEONIDA_TAKE_BLOCKS, on). A page of a copy in the card's memory that the copy held before and the title wrote since is compared with the CPU's side 4 KiB at a time, as the pages a landing wrote were (Shadow::take_landed), and only the blocks that differ go up: 10 MB a frame against 27 to 28, the sends with their hash passes 1.3 to 1.8 ms of the card against 2.8 to 3.7. By turns of 4 s standing (run d271, 106 phases): the frame's median -1.69 +-0.38 ms, means -1.87 +-0.39, p90 -2.48 +-0.68, the card -1.84 +-0.32, and the submitting thread -1.87 +-0.31 as well (it writes the blocks that changed, not the page). The dwords alone (LEONIDA_SEND_CHANGED) saved the card as much but made 280,000 ranges a frame; blocks are few. -
The submitting thread, sampled again (run d267,
LEONIDA_PROFILEonleonida-submit300 to 360 s standing, 9,347 samples): 45 % waits (26 % in the kernel's waits, 20 % on condition variables for the wide threads and the line), and the rest spread out: refreshes on the wide threads 15 % (Batch::refresh_spans), the merge under flights' writes 6.4 %, the write watch's askings 7.3 % (kernel_written), the driver's calls 6.6 %, the planes' presents 5.9 %, the crossings' search 1.2 %. No one place to take on. -
Copies at their place hand their buffers back to the common state (after TaynanGT/Vice-Tay 6ca29bc1, from upstream Belobug#425 by MamaLeVrai):
HostList::place_copyleft the host copy it wrote promoted toCOPY_DESTfor the rest of theExecuteCommandListscall, where a root view of it later in the list is not allowed (the debug layer's message 538, 369,094 times in a run on an RTX 5070 there): what a shader read there may not have been the copy's bytes. -
A driver shader cache moved aside was not told by the launcher (2026-11-30). NVIDIA's cache files for
leonida.exewere full again (two of 4 GB: every start's precompile made the same 4,873 pipelines, 9 minutes, and the driver kept none). Moved aside toG:\gta6port\DXCache-leonida-old-1130, the driver made files of the same names anew, small, before the precompile looked, so nothing was made again and the next start compiled in the world (run d256: frames of up to 5.9 s, the run's A/B lost). The launcher notes the files with their sizes now and takes one smaller than noted for emptied (run d257: "was emptied ... made again", then the world without storms). The lasting fix is NVIDIA's "Shader Cache Size" set to Unlimited (the launcher's warning says so). The same run counted 60,000 to 80,000 words a second that ordinary sends (whole pages) put over words the card wrote, in a dozen buffers (the two of 2 MiB again, 0xd624f2660 with 0x80 on the card and 0 sent, half floats in 0xe59910000, three of 1.1 MiB at 0xdb5047000), while the check sent landed pages whole (it does not any more). And at rest 16 million words of 3,444 copies in the card's memory are not their CPU side's, title memory being the CPU side's (0x7fffffff, 0x7fff7fff: what the card filled and nobody brings back): harmless until the title writes such a page. (The check's "no shader was declared to write the buffer" says nothing with the relay: only the landing without it notes what was declared.) With the check on the game's own path for landed pages (run d259) the older values sent are as many, 66,000 words a second, in the same buffers (the two of 2 MiB had moved). WithLEONIDA_FETCH_CHECK=1as well (run d260: 356 to 362 fetched pieces checked a frame, 13 to 17 of them caught while a later flight was at them and fetched again whole), 61,000: the pieces caught in between are a small part of it, and what else puts card bytes there that never come back is not found yet.
Mesh programs on 32-lane waves, and their own output counts (2026-11-28)
The indirect mesh draws (ExecuteIndirect kind 10) are 26 to 35 ms of a timing run's 53 to 65 ms frame on the
RTX 4060 Ti, so whether their translation pays for the console's wave size, as the compute programs did before the
paired form, was counted: leonida translate with LEONIDA_HOST_WAVE=32 and LEONIDA_SHADER_CENSUS over the
1,078 mesh programs eight runs of 2026-11-28 translated (their shader translated stage="mesh" lines).
- All 1,078 are wave64 on the console (
FLAG_WAVE32clear). The six heaviest are groups of 128 threads (two console waves) with maxima of 128 vertices and 128 primitives, the title's vertex programs wrapped as mesh programs (MS_VS_*,MSNC_VS_*): lane n makes vertex n and primitive n of a meshlet whose counts its header holds. - Their translations pay nothing for it. No group-shared memory (none of the six heaviest asks for LDS; 9 of
the 1,078 have LDS instructions), no group barrier, no ballot, no exchange between host waves: a mesh lane is
taken as itself (
Lower::lane_index: the flat thread id & 63), and cross-lane operations in a mesh program are refused (cross_lane), which none of them uses. The only wave operation isWaveReadLaneFirst(7,676 over the 1,078; 39 inMSNC_VS_LinearDepthSkin910b4be059bfb28f, 71 inMS_VS_PropFoliageDeferredadc5c689b0552cc2), the same on a host of any wave size: the console's waterfall loops over per-lane descriptors and its uniform tests. So a paired or wave-wide form has nothing to take away from them. - What the translation does pay is elsewhere: the skinned programs are long (910b4be059bfb28f: about 3,000 console instructions, 7,300 DXIL ones, 14 loops, 9 of them waterfall loops; the foliage ones twice that), the legacy multiplies are a compare pair and a select each, and the counts were the declared maxima (below).
LEONIDA_MESH_COUNTS=1 (off by default): the program's own counts. The console asks for its group's vertices
and primitives in one lane (s_sendmsg GS_ALLOC_REQ, M0 = primitives << 12 | vertices, in the title's programs
the meshlet header's counts); without the switch the host is told 128 and 128 and every slot starts culled, so its
primitive stage takes all 128 slots of every group. With it (emit/mesh_counts.rs) the counts are set in the
deepest block before the request that every thread runs once, no loop before it, that comes before every export;
M0 is made there again from the scalar instructions between, the group's first thread (the console's request lane)
gives it to the group through one group-shared dword and a group barrier, and outputs past the counts are not
written. A program without such a place keeps the maxima (LEONIDA_WAVE_WHY=1 prints MESH-COUNTS at the maxima: <why>). The shader cache keys on the switch like on every LEONIDA_* switch the translator reads. Checked with
hand-written programs (the place and the chain; dxil.dll's validator; on WARP a group that asks for no primitive
draws nothing, as on the console, where the maxima draw every lane's). Not counted yet: how many of the 1,078 get
their own counts (LEONIDA_MESH_COUNTS=1 LEONIDA_WAVE_WHY=1 LEONIDA_HOST_WAVE=32 leonida translate --validate <shaders.rpf>), and what it saves on the card: the GPU timing lines of 910b4be059bfb28f, ff2afa5e9a460ff0,
adc5c689b0552cc2, 89a622617919c92a, 321d411b20a35ef9 and db875f50a166bd91 with and without it, with the
translations and pipelines made ahead (leonida shaders, leonida warm --used) under the same setting.
Timed (2026-11-30, the merged build, GPU timing runs standing, 27 reports each; d183 without, d184 with, after a tour that made its pipelines): the card 49.8 -> 51.5 ms a frame, the indirect draws 28.1 -> 29.4, the mesh kinds 2.1 -> 2.2; of the six named, 910b4be059bfb28f 0.50 -> 0.51, ff2afa5e9a460ff0 1.25 -> 1.28, adc5c689b0552cc2 0.92 -> 1.17 (114 -> 125 draws a frame), 89a622617919c92a 1.43 -> 1.44, 321d411b20a35ef9 0.48 -> 0.47. No gain on this card: the primitive stage that takes every slot costs NVIDIA less than the counts' barrier and group-shared word cost the programs. Left off. (The tour with it on, d157, drew as without.)
Where the translator's time goes (2026-11-30)
leonida translate <shaders.rpf> with LEONIDA_HOST_RDNA=1 over the whole archive (26,084 programs, 40.6 million
IR instructions; 14,247 vertex and pixel, 2,682 compute, 8,765 mesh), --release at 497bdd039, Ryzen 7 7800X3D
with 16 threads: 65 s of wall clock and 890 s of CPU. Per stage, from timers around each call in a scratch build
(not kept; CPU seconds summed over the threads): console decode 3, spill::build 98, structure::structure 330,
resource::track 11, io::raise 9, emit::emit 521 (lowering proper 297, Module::optimise 196, the rest of the
container 19).
- Structure is the stage that does not scale with size. Its 330 s are 0.4 µs an instruction in a program of up to
1,000 instructions and 28 µs in the 720 programs of 10,000 to 30,000 (313 s of the 330, 2,682 compute programs
holding 320).
spill::build(2.3 to 2.6 µs) andoptimise(4 to 5 µs) stay linear; lowering goes from 2.6 to 14 µs an instruction, with 18 programs over a second inemit: 13 pixel programs of 6,200 to 8,500 instructions (2.0 to 2.9 s each, in lowering proper) and 5 compute programs of 20,000 and more. - Inside
structure_wide_host(28,146 rounds in all, 2 at most for one program):masks_in_order145 s,finish114 s,paths58 s,check_joins12 s. The BDD behind them made 2.9 billioniteentries (42 % memo hits), 504 million nodes over the 28,146 rounds, a memo of up to 2.8 million entries and 1.2 million nodes in one program: about 110 ns an entry, the cost of a miss in a table of that size. Bools::givenwas 97 s offinish's 114 (1.52 million calls, 5.4 million support variables, 10.7 millionimplies, each a conjunction of the known condition with one atom built to compare with 0). It is now the restriction of the function by the literals the condition forces (Bools::forced, one pass over the condition's nodes, kept for the later calls on it), the same function: the DXIL of all 25,689 emitted programs (15,799 distinct) hashes the same before and after in every run (5 runs of the old build, 4 of the new, 0 differences). Wall clock, three alternating pairs: 65.2, 65.1 and 65.1 s -> 59.4, 59.5 and 61.6 s; CPU (user and kernel) 890, 894 and 889 s -> 818, 820 and 821 s.- Left: the
iteitself (masks_in_order,paths,finish: 232 s), lowering of the compute programs (167 s) andspill::build(98 s).
Table constant buffers filled once per list (2026-12-01)
RTX 3080 10 GB, driver 32.0.16.2140, Windows 11, Series S settings, standing in the world (from #2850).
- A table that holds a constant buffer view is made afresh on every draw, and each such view got a scratch piece and a
fill of its own at submission. A diagnostics count (
constants_line, the frame meter's lines): 11,578 fills a frame (5.8 MB), of which 3,327 (28.7 % of fills; 1.6 MB) were the first of their bytes in their list; the others copied bytes the same list had already filled, with no write of title memory between. LEONIDA_CONSTANTS_ONCE(HostList::constants, on by default): the same (source, bytes) asked again before the list next writes title memory gets the first fill's memory, and its slot joins that fill (FillTo::Slots: withLEONIDA_CARD_STEPS=2the card re-points every slot of a fill it takes). Switched every 20 s in one run (on minus off, 13 pairs of phases): the lists' steps on the submitting thread -0.99 ms a frame (+-0.07), its copies and fills -0.85 ms (+-0.02), steps done on the card -0.16 ms, the frame's median -0.39 ms (+-0.14). Per-arm means (14 phases each): card idle 7.21 ms off to 6.44 ms on (-0.77 ms), card busy unchanged (30.49 ms off vs 30.48 ms on).- Independent check on RTX 5070 12 GB, driver 621.40, Windows 10 22H2, Series S settings,
-NoFrameGen, switched every 20 s in one run (on minus off, 4 of 9 pairs valid, 5 dropped for draw jumps; 0 errors / 0 device lost):copies_fills_ms-0.659 +- 0.053 ms,steps_ms-0.475 +- 0.159 ms,card_steps_ms-0.165 +- 0.012 ms, whole-frame median -0.175 +- 0.411 ms (no clear difference).