VICTORY_DLSS=1: an upscaling the title asks for is recorded by DLSS
Super Resolution at the same place of the title's command list, from the
same colour, depth, motion vectors, exposure and reactive mask into the
same output: a step of ours in the list (list::external; with
VICTORY_THIN=1 an op in the list's stream, run where it is translated),
the inputs prepared as a compute shader's would be, moved to the states
the title gave, handed to slEvaluateFeature as local tags, the title's
draw state set again after. The DLSS mode follows the render and output
sizes (the smallest whose optimal size holds the render); preset from
VICTORY_DLSS_PRESET; constants from the dispatch (jitter, motion-vector
scale, near, far, field of view, reset, context flags).
VICTORY_FRAMEGEN=1 (needs the line of submissions): the device is handed
to Streamline, the direct queue is made through its device proxy and our
swap chain through its factory proxy (manual hooking, nothing hooked
globally). A host list that recorded an upscaling is noted; at its
submission its depth and motion vectors become the latest, and the next
present tags them (states the submissions left them in), sets constants
and the latency markers, and switches frame generation on; off on
presents without an upscaling. Series S's interface plane is tagged as
the interface over the scene plane.
Streamline is loaded at run time from VICTORY_STREAMLINE_DIR (default
C:\dev\sdk\streamline-sdk-v2.14.16\bin\x64) after an Authenticode check,
with no downloads; anything missing leaves the title's upscaling and our
present as they were. The C ABI is written by hand from the SDK 2.14
headers (offsets asserted as the SDK asserts them); no NVIDIA file is in
the repository. Log lines: support and requirements, feature versions,
the first recording and every change of mode or size, per second the
upscalings done, failed and left to the title, frame generation on/off,
frames shown and status. streamline::check backs `victory upscaler-check`.
The external-work helpers (host textures in a given state, inputs
prepared as for a compute view, output written on the host) are ported
from DexNom/VIctory (crates/victory-gpu/src/external.rs,
GPL-3.0-or-later); the FidelityFX state mapping is from its
fidelityfx.rs.
Not run with the title yet: `victory upscaler-check` (no device) loads
Streamline 2.14.16 on the RTX 4070 SUPER, driver 621.01: DLSS, DLSS
Frame Generation and Reflex supported.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The title's write-combined memory (protection 0x400: 2.2 and 3.2 GB,
0x2404) is what its CPU writes and does not read. Of the gameplay frame's
compares (coolfox-20261126-184458) seven of the eight largest ranges, about
360 of 730 MB a frame, lie in it, and 36 MB a frame of it was fetched and
merged into title memory.
- xmem notes write-combined regions (forgotten when freed or decommitted),
`victory_gpu::title_memory_write_combined`.
- VICTORY_WC_NO_BACK=1: a copy with two sides of write-combined memory has
no write-back: no hashes, compare, fetch or merge; what shaders write stays
on the card. Refreshes still send whole pages.
- VICTORY_WC_BAR=1: a write-combined title buffer gets one copy in card
memory the CPU maps (GPU upload heap, resizable BAR): refreshes write it
through the bus, nothing is sent, no CPU side, no write-back. Counted
with the card sides of copies (card_limits) and made while a fifth of the
budget is free.
Both off by default. Risks (shadow.rs, wc_no_back): the title's CPU reading
what shaders wrote there reads older bytes; a page the title writes goes up
whole and takes back what shaders wrote in the same 4 KiB page; another
host copy of the same bytes does not see shader writes. The frame line says
how many MB of declared writes were left on the card.
Test: the registry of write-combined regions.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The streaming log's copies of page mappings (CopyPageMappingsBatchX ->
map_aliases) were counted twice with one mapping thread: once for the
batch and once more for each range in it (map_alias), so their calls and
milliseconds (254,000 calls, 70.3 s in run x1440-streamlog) were up to
twice what they were. A batch is now one call; map_alias called alone
still counts.
The log's M line has two more fields at its end: pages the copies mapped,
and how many of them show the section page after the one the page before
them shows, i.e. what one view could show with it.
VICTORY_MAP_RUNS=1 (off by default) maps such a run through one view: 2
system calls where a view a page took 2n (unmapping is the dearest call,
about 110 us a view in a cutscene). A run gets one view where its
addresses are one placeholder: the hole one view left, holes of views of
ours side by side that cover it exactly (joined into one with
MEM_COALESCE_PLACEHOLDERS), or memory with no hole of ours in it (cut out
of the title's reservation; if that fails, nothing is changed). Anything
else goes a page at a time, as before. A copy whose source is mapped onto
itself is looked up page by page as it changes, as before, and the pages
before a source page that is not mapped are mapped all the same.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The 6 to 18 bake sources a run still said were "not brought up to date:
no upload was recorded" (runs of 2026-11-26 18:02-18:51) were all views
the title places, as R9G9B9E5, in the memory of R32_UINT textures the host
writes (1280x720 and 2304x576 lighting tables, resource::alias_of).
`readable` brings those up to date by a copy on the host, not by an
upload, so no staging buffer was made. They are now copied (on the bake's
list) and published like other textures the host writes, and counted as
current or published. Real failures still say why.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
VICTORY_SKIP_PIPELINES drops a shader's draws in diagnostics builds only.
The decal heap's CS_DefragHeap_ComputeRelocations (02384a60fda6f2d0),
translatable for 32-lane hosts since ce383f8 through host waves that
meet by spinning, took 11.85 ms of the card a frame in the first
gameplay area (timing run x1440-gputime2): gameplay 45 -> 51 ms. Its
pipelines are left out the way the ray-tracing passes are, until it is
fast.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The stand-in raises the diffuse light to an estimate made from the light the
visible surfaces sent out the frame before, which it had raised itself: its
own light comes back to it reflected, and the light settles at
level*e/(1 - level*a) rather than one bounce (1.3x at walls that send out
0.6, 1.75x at 0.9; more near lamps and pale walls: the overexposed rooms;
R3: VICTORY_AMBIENT=0 is much darker, lamps less blown).
With VICTORY_AMBIENT_ONCE=1 the raise notes, at the 25 places of each cell
the next keep reads, the share of the light there that is the title's own,
and the keep counts each place's light by that share: one bounce of the
title's light. Off by default (an A/B first). Light surfaces make
themselves (lamps) is counted down too where the stand-in raised it
(shortcut: no albedo to tell them apart). The cells' buffer grows by 25
entries a cell (0.9 MB).
Test: a model of keep and raise over frames (fed back vs once), and the
passes still build.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The posterized light (PS_CompositeNMB reading its colour-grading tables
unfiltered) is the host driver's: a pipeline stored in an
ID3D12PipelineLibrary keeps the places its static samplers had in the
driver's sampler table in the run that stored it. Loaded in a run that made
static samplers in another order, it samples through other ones. Reproduced
on the 4070 SUPER (examples/lut3d_probe.rs): the composite's three samplers
(point, linear, trilinear), SM 6.6, the table read by heap index; stored,
then loaded in a process that made ten other static samplers first: every
sample is a table entry; made in that process: filtered. The runs that
posterized loaded the composite from the library (coolfox-174945: 1,614
loaded, 2 made); those that did not had made it (175249, whose
VICTORY_FILTER_3D translation was new).
Such pipelines are now made every run (the driver's own cache keeps that
quick) and neither loaded nor stored; the others keep the library.
VICTORY_LIBRARY_STATIC_SAMPLERS=1: as before. Any loaded pipeline with
static samplers could read through another's (filter, address mode, level,
comparison), not only the composite.
examples/lut3d_probe: the measurements (filtering of a 33^3 RGBA16F table
by table or heap index, bound point-sampler heaps, writes past a heap, UAV
state, background recompiles, 2,032 distinct static samplers at most: the
next removes the device), documented.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
CS_DefragHeap_ComputeRelocations (vfx_triangleClip, 128 threads: two
console waves, which walk the decal triangle heap each its own way, with
LDS shared inside one wave and no barrier) did not translate on NVIDIA:
"an LDS read and write in one lane-branch region", and the wave-wide
branches (`widen`) were refused for groups of more than one console wave,
because a group barrier inside a branch one console wave takes and the
other skips would wait for threads that never come. Its dispatch was
dropped every frame.
- `lower::with_pair_meetings`: the two host waves of each console wave
meet on their own (`Lower::meet`): an LDS counter per console wave that
its 64 lanes count up and wait on, polling at most 4096 times (a partner
that never comes costs wrong values, not a hung card). Used for the
LDS meetings, the exchanges of masks, lane reads and wave-wide decisions.
A meeting starts a new block: exchanges happen where the code is being
lowered, the masks and SCC an instruction reads as numbers are exchanged
before its own code (`exchange_first`), and an IR block's last DXIL block
is taken after its exit's code (phi predecessors were wrong otherwise).
- With it, a branch closing a loop is in its own lane region (a lane that
left the loop does not run it again), and the title's barriers count
wave-wide branches as per-lane ones (`fence_only`).
- `widen` takes groups of whole console waves when allowed (the digest
list or VICTORY_WAVE_WIDE=1); the LANE_MASK and driver-loop paths stay
as they were. A program whose LDS with the meetings' dwords passes the
host's 32 KiB is refused.
- Digest list: CS_DefragHeap_ComputeRelocations (128) and
CS_TransmissionVolumetricsSubmerged (water_shading, 64 threads, the
underwater volumetric light: widened like its tiled siblings).
CS_CollectTriangles_Meshlets (1024 threads) still does not translate: its
own LDS is the host group's whole 32 KiB, no room for exchange dwords or
meeting counters.
Checked: both translate and validate (dxil.dll); 1,800 other compute
programs translate to the same DXIL as before (VICTORY_HOST_MAX_WAVE=32).
New test: two console waves of one group in loops of 4 and 8 rounds with
LDS shared across their halves, bit-exact on an RTX 4070 SUPER.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
PS_CompositeNMB (6318f669e4f17d65) posterizes light in some runs: every pixel
of its output is exactly one entry of its first 33^3 table (CS_LUT3DBlend4-
WithTonalAdjustments) run through the 64^3 ACES table, i.e. the first table
is read unfiltered (steps of 0.44 stops, green/magenta where the channels
step apart; ops2 frames 1513/1587/1657). Everything static is right: the
translated and the recorded root signature's sampler s1 is linear (filter
0x14), the view is a Texture3D of the 33^3 RGBA16F texture, the table's
contents are smooth, and the card filters such a texture (bound by table,
by heap index, with a point-sampler heap bound, left in UAV state).
With VICTORY_FILTER_3D=1 a level-0 sample of a 3D texture with a linear,
clamping immediate sampler is eight textureLoads weighted in the shader, so
the card's sampler is out of the path: a run with it on says whether the
sampling is what fails, and is the fix if so. Off by default; part of the
shader cache key. Test: both forms agree on WARP and the card.
examples/capture_probe: what a recorded frame bound for one pipeline (root
signatures, heap slots, constant words, 3D table contents), read from the
capture's files without a device.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The diagnostics breakdown counted every draw or dispatch of a pipeline
left out on purpose (make::left_out: CS_RaytracingResolve without the
ray-tracing structure builder, CS_ScreenProbes_ActivateRays) as "being
made": such a pipeline is never queued, so its host pipeline is never
made. In gameplay that was some 630 indirect dispatches a frame
("dropped 632.0/frame without a host pipeline: being made") while the
queue was empty in every frame ("0 being made"): the ray-tracing
resolves, one indirect dispatch per material (329 distinct resolve
programs bound in run 155824, their first binds in the second the
first indirect signature was dropped). No world draw is among them.
- make::missing names the reason ("left out on purpose: ...").
- The frame line counts them per frame, direct and indirect together
("N of all these left out on purpose: ray-tracing passes without the
structure builder"), in release builds too.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The texture queue made no new host copies from 90 % of the card's budget
on; in play (2026-11-26 16:52 run) it said "no room" at 9,526-9,881 MB
weighed against 9,519-9,583 MB, with 1,060 MB of 10,600 left free. The
line is now the budget less 768 MiB or 5 % of it, whichever is more, and
never under 90 % (92.8 % here: about 290 MB more for textures; 95 % on
24 GB cards; 90 % from 7.5 GB down). The idle sweep moves with it: none
go 2 % under the line, those idle 5 s go down to 5 % under it, those idle
1.5 s from 5 % over it (88, 85 and 95 % at a line of 90 %, as before).
VICTORY_TEXTURE_ROOM_PERCENT set: a flat percentage, as before.
The pass's 5-second timing line found its four timed parts a third of
the pass (16:52 run, 11:24:35: 3,175 ms in 5 s, 1,038 of them staging
uploads, 95 the rest of the four); re-checks are 1 %, so they are not
capped. The line now also times making host copies (creation and
residency) and making the slots' views, and gives the rest.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The 588 "failed" bake sources of the first runs (3,720 sources in 256
bakes) were null views: slot 1 and others hold views of no resource,
which small numbers among the bake's words name all the time, and
is_texture_view counts them (no buffer behind them). They have no host
copy to make, so they were counted as refused. Now they are not
sources at all.
A real failure now says why (the first 64, a warning with the view):
the host refused the copy, the staging buffer was deferred, uploads are
refused after the host ran out of memory, or no upload was recorded (no
console layout, an XOR mode, no staging buffer). Whether an upload was
recorded is told by upload_from itself (UPLOAD_STAGED), and a source
whose upload the pass recorded on the bake's list already counts as
brought up to date (it was counted as failed or uploaded twice).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A frame timeline of the first gameplay area had our listing, records and
landing threads woken and not running yet for 4-11 ms of the chain the
present came out of. The switch sets the priority of every thread that
asks for the fast cores. Not on by default: four bench runs (helper
builds running beside them) were within the noise.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The pass over textures picked by index took the due slots and the census
under the queue's lock, sorting some 40,000 slots there: 1-5 ms a pass.
Every descriptor copy of the title's recording threads notes its slot in
the same queue (`queue_texture`, under the slot's own lock), and a frame
timeline of the first gameplay area showed them, and the heap-view
threads behind them, waiting that long. One look at the slots under the
lock now gathers the due ones and the census; the order is made after.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
`card_dirty` ran once per submission (about 28 a frame) over every copy
in the card's memory (some 3,900 in the first gameplay area) to find the
few dozen whose CPU side changed: 2.5 % of the submitting thread in a
gameplay profile. A copy now goes on a list when its `touched` flag is
set, and the walk takes that list; the full list is pruned of copies let
go whenever it doubles.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The texture queue makes no new host copies while in use + kept for
buffer copies + kept for render targets reaches 90 % of the card's
budget. The target reserve (VICTORY_CARD_ROOM_FOR_TARGETS_MB, 3,072 MB
less the targets made) never expired: at 1440p targets level off at
2.1-2.9 GB, so 160-990 MB stayed kept for targets that never came while
thousands of textures waited (diag run 16:28, 10:59:54: 8,722 MB in use
+ 836 kept for targets against a line of 9,527 MB: no room). Now once
targets hold half the reserve or more and have not grown by 64 MiB for
VICTORY_CARD_ROOM_FOR_TARGETS_SETTLE_MS (20,000; 0: kept, as before),
nothing is kept; growth of 64 MiB brings it back.
Release builds logged no term of the room test after the world loaded.
The 5-second texture line now gives them (in use, free texture blocks,
kept for buffer copies and for targets, the line, room or not), and where
the pass's time goes (looks again at uploaded slots, mapped-memory
queries, host-copy digests, making copies and staging), since the pass
hits VICTORY_TEXTURE_STAGE_MS every frame for about 20 textures.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The uploads before a bake must read title memory as it is (`exact`), so
while the runtime remapped title memory they waited for it to finish,
even with VICTORY_TEXTURE_NO_WAIT=1: 808 of 866 ms of texture refreshes
a frame in a cutscene second (diag run 2026-11-26 15:58). Now such a
refresh reads the texture whole through the kernel first: that read
needs no lock, gets every byte as title memory holds it at that moment,
and fails where a page is away; only then does it wait, as before. The
frame line counts both. VICTORY_EXACT_NO_WAIT=0: always waits.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The title bakes characters' skin and decorations once into textures of
its own (PS_BakeDecorations_*, PS_DecorationBlend_*); what a bake reads
wrong stays for good: coloured specks over a character's skin, already
in the G-buffer. Their native code picks the skin texture at byte 0x20
of the constants at table 1 and each decoration's textures from its
304-byte record of the structured buffer at table 1, records [0x78, 0x7c)
of the constants. The pass before a bake serves due slots newest write
first within a budget, refuses new host copies while the card has no
room (holding them back for about four seconds), and does not look at a
slot served before unless something told of a change, so a source could
still show a stand-in (another texture of the same kind) or old bytes.
Now every slot the bake's constants and records name is checked right
before the bake: a slot not made from its present view, a texture with
no host copy, or a host copy not filled from the bytes title memory holds
now is uploaded on the bake's own synchronous list, whatever the card's
room and the pass's budget, and published with the others. A log line per
bake that found such a source (and totals at bakes 1, 2, 4...) says how
many and why. VICTORY_BAKE_SOURCES=0: as before.
Also a diagnostic: a texture the title places inside (not at the start
of) the memory of a texture the host writes is said once per kind of
pair; such a view is filled from title memory the host never writes.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
VICTORY_NATIVE_1440P=1 (scene 2560x1440) or VICTORY_RENDER_1080P=1
(scene 1920x1080 scaled up by the title) patch the retail image's SDR
display mode, scanout reservation, temporal scene scale and Settings
viewport load before it is mapped, each checked against the stock
bytes; the patched image is cached apart from the stock one. The
frontend's legacy 4K projection gets its viewport on the 1440p target.
Ported from DexNom/VIctory (GPL-3.0-or-later), native 1440p part only.
Series X on an RTX 4070 SUPER, the opening's cutscene: median frame
77 -> 67 ms, 95th percentile 506 -> 401 ms (bench x-nowait vs
x1440-vol, with the volumetric light also on).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
CS_TransmissionVolumetrics_Tiled and _Tiled_LocalLights (GTA VI 1.0.2.1)
are wave64 programs in groups of 64 with an LDS read and write in one
lane-branch region: no form but the widened one translates them for a
32-lane host, so on NVIDIA their dispatches were dropped and there was
no volumetric light or fog. They join the two kernels the widened form
is already chosen for by digest. On an RTX 4070 SUPER: the pack's
untranslatable wave64 programs 26 -> 24, the opening and its first
gameplay area run with the volumetric light and no device loss.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Each pair (kind of view, texture format, view format) is said once, with
the host's casting support: shader and unordered access views that
`fits` gives the texture's own format, and render target views made in
another format than their typed host copy. On an RTX 4070 SUPER both
CastingFullyTypedFormatSupported and RelaxedFormatCastingSupported hold,
and the opening of GTA VI makes one such pair (a UNORM render target
view of an sRGB texture): not the cause of its posterised shading.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
On cards with a budget of 12 GiB or less the copies of title buffers in
the card's memory were capped at 512 MB, and windows outside buffers had
no card room unless asked for. On an RTX 4070 SUPER (budget 11,229 MB)
the rest, 5.7 GB, was read by shaders over the bus: the opening's six
heaviest compute passes took 20-42 ms each and gameplay ran at 3 fps.
The cap is now 18% of the budget (512-2048 MB) and windows get 9% of it
(at most 1024 MB) from 8 GiB budgets on: those passes take 0.2-0.4 ms
and the release build runs gameplay at 21-25 fps.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
VICTORY_FRAME_INTERVAL_US paces frames at another interval than the
title asks (it asks 33.333 ms); VICTORY_DISPLAY_REFRESH adds a refresh
rate above 60 Hz to the display mode list. VICTORY_KEYS_FILE lets a
driver script press the stand-in pad's buttons while the title runs.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
What 53abe45a ("wip wide") brought in: opt bit 64, smem's loads through
raw_dwords, its test and switch test as they are there (the global loads of
this tree were wide already). Yard capture, turn by turn: 18.47 -> 18.45 ms
(12 loops) and 18.23 -> 18.16 (5): nothing, so not on. With the bit off the
code written is that of before.
Not run yet: scalar_buffer_loads_read_the_same_dwords_one_call_or_four and
the gpu tests on the second merge of local/next (2be0515c); the diagnostics
build of 393e74fb finished.
Belobug ae75a66a is this tree's own opt.rs (both from the fork at ba8697aa)
without its first-lane pass; 7263339c is a trace: nothing to take.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Belobug (76387c2d) found draws flickering because the records past a list's
budget were not the same ones from frame to frame. Whether ours are refused
is not known: the count says it (atomics only when there is something to
say). Off by default; the records' order and costs stay what they were.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Theirs compares the handles, which a title may write other views behind;
here the views themselves (resource, host texture, description) are compared.
A call with the same ones saves a host view per target and the driver's call.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Until the list next writes title memory, as for refreshes: up to 64 KiB of
fill less for every repeat. How often this title binds one was not measured.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Two queries for an interface, three locks and a name looked up at every
change of pipeline; now one lookup by address.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Dispatches declare the same few ranges again and again: 4,003 to 5,550
steps a frame of fork-b1-fast, each a flush of its copy's pending refreshes
and two locks on the thread that submits (the snapshots alone 1.7 to 2.0 ms
a frame). The ranges and their order stay what they were.
Co-Authored-By: Claude Opus 5.5 <[email protected]>