Commit Graph
175 Commits
Author SHA1 Message Date
shawn 9fed8976af Frame meter: log the frame times' spread (median, p95, p99, longest, frames over 50/100 ms)
The frame-rate line is an average and hides stutter: 30 fps can be even 33 ms
frames or 20 and 80 ms ones. One line each time the frame-rate line is made, in
every build, under its own target (victory_gpu::frame_times), so that
VICTORY_LOG='warn,victory_gpu::frame_times=info' keeps it alone. It found a
hitch every 1.5 s on an RTX 5070 Ti (median 30.7 ms, p99 60, worst ~100) that
the frame-rate line did not show.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit 5f3c0a42a6e2dc734d75a4d7a3a0ef95e9df6e3e)
2026-11-27 17:29:37 -08:00
DexNom e205498c64 GPU: a background fence wait reports what went wrong instead of carrying on
Two helper threads wait on the host fence with `SetEventOnCompletion` and
`WaitForSingleObject`. Both ignored a failed call: the late helper then went
straight to the landing step with nothing run, settling flights off a value
the card never reached, and the relay slept 1 ms and tried again. A removed
device was worse than either: `GetCompletedValue` answers `u64::MAX`, which
compares greater than every target, so every wait and every landing check
passed at once while the card had run nothing.

`wait_host_fence` checks the completion call, the wait's result and the
fence value, and fails with a named context; `fence_reached` treats
`u64::MAX` as "never reached". The relay's device-removal read is checked
too, before it lands anything.

Ported from DexNom/VIctory d036cea (pull request #1366), GPL-3.0.

(cherry picked from commit 671e25f9850abca01266bab096fed096b7fd0606)
2026-11-27 17:29:36 -08:00
c1cbdc9d11 Save sharing in the F1 menu, restarts keep their options, DLSS fixes, monitor's card
- F1 EXPORT SAVE writes the save as one zip into the game folder's Saves
  folder; IMPORT SAVE lists the zips there to pick from. An import is put
  in place at the next start, and the save there before is zipped first
  ("backup before import ..."). Zips made by hand are taken too: with a
  folder around the save, or starting inside the saves folder. The game's
  own settings (SettingsProfileSettings) are never exported or imported:
  the player keeps theirs.
- A restart from the F1 menu keeps the options the game was started with
  (#197).
- DLSS picked in the F1 menu fetches NVIDIA's files at the next start,
  even after an earlier "no", and the menu says so (#514).
- When the driver refuses nearly every DLSS upscaling, DLSS and frame
  generation are turned off for the run.
- FSR 3 frame generation is made ready only with DLSS upscaling on: the
  title's own FidelityFX check stopped the game otherwise (#331, #459).
- RTX Ada, Blackwell and RTX PRO workstation cards count as cards with
  DLSS frame generation.
- On a PC with two cards the game plays on the card the monitor is on, and
  the preload's pipelines are kept per card.
- The warm-up restart comes after 10 seconds.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-authored-by: DueTonight <[email protected]>
Co-authored-by: mikan123pro <[email protected]>
2026-11-27 16:58:02 -08:00
trustno1-coderandClaude Opus 5.5 64d4931b3d Water light on, PS4 pads, F1 menu saves at once, long-session memory, memory switches
Rendering and memory (GPL-3.0 code ported in; credits in the source):
- Water: 64-lane compute programs on 32-lane waves keep each wave
  together through loops and set up shared memory from the first
  thread, so the water's tiled light no longer leaves dark blocks. It
  runs by default now (VICTORY_WATER_LIGHT=0 leaves it out; an empty
  value, an earlier version's saved OFF, runs it). Also cloud tiles and
  the screen probes' ray activation.
- Placed views: their padding cleared as before; folding a buffer
  view's first element into its address is VICTORY_PLACED_FOLD=1, off:
  with it on, clothing and caps swapped to other variants for single
  frames in the boat cutscene.
- Texture sweep: textures whose copy was let go leave the looks until
  used again. Static samplers made first, in one order. Small buffers
  made ahead of the first 3D frame.
- play mode: VICTORY_TEXSPK_PASS_MS=8, VICTORY_PASSES_HOT=1,
  VICTORY_HELPER_PRIORITY=1.
- Memory switches, all off: VICTORY_SLOT_EVICT, VICTORY_ALLOCATOR_TRIM,
  VICTORY_BUDGET_PACK (and VICTORY_LIST_POOL_IDLE_S).

Input: DualShock 4 (0x05C4, 0x09CC, 0x0BA0 adapter) read over HID, USB
and Bluetooth, beside the DualSense; PlayStation pads rumble, and stop
when the game ends (issue #352).

F1 menu: every change is saved at once; it saves to
victory-settings.txt in VICTORY_HOME or %LOCALAPPDATA%\victory however
the game was started (no more "NO SETTINGS FILE").

Warm-up start: its 30 s count from the first frame of 100 draws or
more, not from the start: waiting at the title screen restarted it too
early and the next run still sat at 14 fps.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-27 15:03:27 -08:00
trustno1-coder c5f7528bbf Merge PR #88: no arena storm when the low range is full; reserve the arenas' room at the start 2026-11-27 11:45:55 -08:00
trustno1-codeandClaude Opus 5.5 10862a6d87 Windows 10 runtime, F1 preload fix, AMD FSR download, warm-up restart, MFG Unlocker notice
- Windows 10: every pipeline was refused (E_INVALIDARG) and the game closed within seconds, because
  Windows 10's own Direct3D 12 stops at shader model 6.5 and the translated shaders are 6.6.
  victory.exe now exports D3D12SDKVersion = 614 and D3D12SDKPath = .\D3D12\. Where the GPU runs
  below 6.6, `play` offers Microsoft's D3D12Core.dll (Agility SDK 1.614.1, from nuget.org; pinned
  SHA-256 and Microsoft signature checked) into D3D12 beside the exe, then checks again and stops
  with a clear message if it still can't. `victory get-d3d12` does it by hand. The host logs its
  shader model and runtime file. Windows 11 keeps using its own newer runtime.
- F1 > PRELOAD SHADERS: the restart passed the script launcher's -Preload to victory.exe, which
  refused it, and the window closed at once. It now sets VICTORY_PRELOAD=1, which both launchers
  read, and a failed restart keeps its window open.
- AMD FSR 3 files: offered for download where FSR 3 would be used (`victory get-fsr`,
  Get-AMD-FSR.cmd, scripts\get-amd-fsr.ps1; pinned hashes, AMD signature).
- First start of a new victory.exe: it ran at a flat 14 fps for the whole session and normally from
  the second start on. The first start now plays 20 s with a notice, marks that exe under
  %LOCALAPPDATA%\victory\warmed and restarts by itself once (VICTORY_WARMUP_RESTART=0: not done).
- RTX 20/30 with DLSS frame generation running (MFG Unlocker as winmm.dll beside the exe): the
  start notice says it is unlocked by a mod, and the log names DLLs beside victory.exe.
- README: the above.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-27 10:43:30 -08:00
YorivelandClaude Opus 5.5 30b979ee48 Memory by address: no arena storm when the low range is full; reserve its room at the start
With the structure builder on (VICTORY_BVH_BUILDER=1), memory::ready asks
for another arena at every build dispatch while the spares are low. Once
upload::reserve could find no 64 MiB gap in [4 GiB, 2^37), nothing
remembered it: every one of thousands of dispatches a frame searched the
address range again under the MEMORY lock (the recording threads ~70 % in
the kernel under VirtualAlloc2), frames took 7 to 32 s, and the title's
own hang watchdog (the store to 0 at +0x23cf683) ended the run.

- Memory::another: after a failure, none is tried again before the next
  frame; the reason is logged (no room, or its copy could not be made),
  and a reservation whose copy could not be made is given back.
- upload::reserve_early, at host creation: 50 reservations of 64 MiB in
  the low range, with write watch, when the builder is on
  (VICTORY_LOW_EARLY_MB, 3200; 0 off). An arena commits one of them before
  looking for room. Separate pieces, not one 3.2 GB reservation: as one,
  the submissions' write-watch askings walked across all arenas in single
  runs, about 2 ms a frame more.

RTX 4090, prison area, ray tracing on, frame generation off:
- before: stuck at 19 arenas, ~280-650 pages a frame read as zeros,
  watchdog crash 1-3 minutes in;
- after: 28 arenas, ~18 pages a frame once settled, no watchdog crash,
  22-28 fps (30 cap) after the first minute.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-27 19:50:17 +02:00
trustno1-coderandClaude Opus 5.5 29d8dbf7d9 AMD FSR 3 frame generation for cards without DLSS frame generation; start notice; F1 preload
- FSR 3 frame generation (AMD FidelityFX 2.x DLLs, never in the repository:
  VICTORY_FIDELITYFX_DIR or a fidelityfx folder beside victory.exe), 2x at most,
  with the HUD-less picture so the HUD is not doubled. Series X needs DLSS upscaling.
- F1 menu: FRAME GEN TYPE (auto, DLSS, FSR 3); PRELOAD SHADERS; unset rows read NOT SET;
  save and restart opens its own console window.
- A notice at the start (30 s on the picture, and in the console): the GPU, which
  frame generation runs, and why not (DLSS off, NVIDIA files missing, or the card).
- victory preload / --preload; warm keys its work to the program's path.
- Logs are named victory-nvidia-...; README: what each card supports, first.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-27 09:06:36 -08:00
CuteBootyandClaude Fable 5.2 aec85efb10 fix(gpu): raw buffer views stay inside their buffer (VICTORY_RAW_VIEW_CLAMP, on; =0 restores)
raw_at / raw_uav_at: a range past the buffer's end is shortened to the
whole dwords that fit; an unaligned start, or one with no whole dword left,
becomes a null view. The meter line counts the cuts (past end, shortened,
sub-dword, unaligned) for SRVs and UAVs. On by default;
VICTORY_RAW_VIEW_CLAMP=0 gives the old descriptors.

Original author: lichenlang89 (fxceless/victory-fork pull request 1266,
dd5e8c9e). Ported by hand from CuteBooty/victory-8gb, same code and tests;
the counters go into this tree's meter line in host.rs.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-27 00:56:48 -07:00
trustno1-coderandClaude Fable 5.2 35c156087e Open water without dark blocks; the F3 stats panel in every build
Water: on hosts of 32-lane waves the water's two tiled light programs
(water_shading:CS_TransmissionVolumetrics_Tiled 5dc3b25986622949 and
_Tiled_LocalLights 6f225b641c5b0708) translate in the wave-wide form only,
and in that form leave whole tiles of open water dark (around boats, along
shores, under bridges) at about 15 ms of the card a frame. They are left out
there (pipeline/make.rs); VICTORY_WATER_LIGHT=1, or WATER LIGHT in the F1
menu, runs them as before. Runs on a copy of a save on the first boat ride,
RTX 5070, Series X 1440p DLSS Quality: 25 fps with the blocks before, 30 fps
without them after; the water is darker and bluer without that light.
fxceless/victory-fork's README of 2026-11-27 names the same two programs and
form.

Stats panel: host/panel.rs is built without the diagnostics feature too (the
recording time is counted in diagnostics builds only), has a frame generation
line, and is switched by F3 or by STATS PANEL (F3) in the menu, live. The FPS
line at the top is hidden while the panel shows.

README: both, and where the panel is.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-26 20:39:26 -08:00
trustno1-coderandClaude Fable 5.2 22c6be2e76 F1 settings menu, frame generation 2x-6x live, no frame rate cap, FPS line
On readmet3xt-lab/foxhound 02fc18a, which becomes this fork's base.

- host/menu.rs: the F1 settings menu, in every build (it was in the
  diagnostics build only): DLSS mode and model, frame generation, frame
  rate cap, console profile, picture size, the light estimates and the
  main speed switches. Saved to victory-settings.txt, applied by the
  launcher at the next start; "save and restart" from the menu. The title
  gets no keyboard while it is shown (gameinput.rs).
- host/font.rs: the dot letters, moved out of the diagnostics panel so
  that the menu has them in every build.
- streamline.rs: VICTORY_FRAMEGEN_X=2..6, the frames shown for each one
  rendered (no more than the state says this card generates); 0: ready
  but off. The amount and off/on change while the title runs
  (set_framegen, from the menu). Result 39, "warning: out of VRAM", is
  taken as set: asked again at every present it showed no generated
  frame at all (1,828 times in one run on a full 12 GB card).
- The frame rate at the top left of the picture while the menu is closed:
  frames rendered a second, and with frame generation those shown
  (VICTORY_FPS_LINE=0: not). The window's caption says both too.
- scripts/play-foxhound.ps1: applies what the menu saved; -FrameGenX;
  -Fps defaults to 1000 (no cap: VICTORY_FRAME_INTERVAL_US=1000); frame
  generation is made ready at every start with Streamline so that the
  menu can switch it (-NoFrameGenReady: not), with a share of the card's
  memory held back for it (VICTORY_TEXTURE_ROOM_PERCENT 80 on, 86 ready);
  NVIDIA's files are looked for in nvidia-sdk\ here; builds the layer when
  it is not built. scripts/play-nvidia.ps1 is the same launcher under
  this fork's old name.
- Get-NVIDIA-DLSS.cmd / scripts/get-nvidia-sdks.ps1: fetch the eight
  NVIDIA files that are loaded (about 70 MB) out of NVIDIA's Streamline
  release into nvidia-sdk\ (git-ignored). They are NVIDIA's, under
  NVIDIA's licences, and are not part of this repository.
- README for this fork; foxhound's own is kept as docs/README-foxhound.md.

Measured on an RTX 5070 (Series X, native 2560x1440, DLSS Quality,
opening rooms): mostly 26-30 frames a second rendered; in Streamline's
own check 2x, 4x and 6x show exactly 2, 4 and 6 frames for each one
rendered.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-26 19:41:59 -08:00
localandClaude Opus 5.5 9075710d14 Renderer port 1: the title's 32-bit graphics heap used in place (VICTORY_PORT_CONSTANTS=1, off by default)
The title's routine at image+0x1e86440 reserves 185 MB of graphics memory
below 4 GiB, splits it into five pieces, takes all their physical pages
in one XMemAllocatePhysicalPages and maps them in order: one stretch of
one section. Its 174 MB buffer at 0x34e10000 (the ring of constants, and
what the skinning passes write through one view of all of it) had a host
copy in the card's memory, ~17 MB a frame sent up in ~600 pieces, shader
writes fetched back and compared, and ~6,000 constant fills a frame.

With the switch the stretch is mapped once more at an address of ours and
opened as a host heap there (OpenExistingHeapFromAddress1); title buffers
and windows in it are buffers placed in that heap, the existing in-place
form of a host copy: nothing tracked, sent up, fetched back or compared.
The title's own views stay free to change; when it maps other pages
there the region is forgotten. A line on the frame-rate report counts
the CPU fills and buffer copies of ours that still read or write it.

Replay (play-1125-0127, heap in the PC's memory): the title's own work
+~3 ms on the card; the 30 ms added there are our compare passes, which
do not run over memory in place.

Ported from Belobug/VIctory-Belobug-AMD 86dc109 (author: local); conflict with heap_marks in host.rs kept both.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-27 02:07:40 +05:30
readmet3xt-labandClaude Opus 5.5 f1edd66379 Merge agent/submit: submitting thread's work (time split in release, host lists reused, a submission's batch kept, spread work wakes only the threads it needs; on) and heap-record switches VICTORY_HEAP_SYNC_FIRST, VICTORY_SYNC_IN_PLACE, VICTORY_SPANS_QUICK, VICTORY_SYNC_FINE, VICTORY_HEAP_SYNC_AT_SUBMIT (off; the last three ported from Belobug/VIctory-Belobug-AMD 15ab94e, a284ca7, 673be0e+a609a2f)
The helper was stopped before its final report (user asked for all work in the main branch); its branch was
clean and on a906dcc. Built and tested at this merge; not yet measured in the game.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-27 01:28:17 +05:30
readmet3xt-labandClaude Opus 5.5 2ff3e4a3a0 Merge agent/texqueue-ports: texture queue lock work (marks, batched tells, split lines; on), VICTORY_TABLED_REREAD and VICTORY_QUEUE_HOST_TEXTURES (off); ports of Belobug/VIctory-Belobug-AMD c278f0d, 4cd2d13+91018a5, 5d6bd84 (VICTORY_POOL_SMALL, VICTORY_SHOW_NEW_LATER, VICTORY_PRELUDE_UPLOADS; off)
Chain z1 (from the main path): A (new defaults) gameplay 33.9 ms p95 34.7, cutscene 38.8 ms p95 55; B (VICTORY_QUEUE_MARKS=0 VICTORY_QUEUE_BATCH=0, the old behaviour) gameplay 39.5 ms p95 54, cutscene 40.4 ms; C (TABLED_REREAD=1) 37.2 / 40.2 ms; D (QUEUE_HOST_TEXTURES=0) 36.4 / 41.8 ms.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-27 01:25:20 +05:30
readmet3xt-labandClaude Opus 5.5 d2e24b3bc3 VICTORY_HEAP_SYNC_AT_SUBMIT=1: the heaps' records asked for at the title's submit
Ported from Belobug/VIctory-Belobug-AMD 673be0e and a609a2f (renderer
port 7, its heaps' records part; the journal in 64 parts, which shares
the switch VICTORY_PORT_JOURNAL there, is not taken). There the lane
waited 4.5-5.2 ms a frame for the heaps' records and port 7 took 2.4 ms
off it. Here the submitting thread waited 2.7-5.8 ms a frame for them
(release run 233354).

A round of the heap-sync thread is asked for when the title submits
(Lane::push, round_after), so it runs while the submission waits in the
line (12-15 are in it when one is added), and the submitting thread waits
for that round (begin_sync_heaps_after), or for a later one if a wait of
its queue that was met in memory went since (the queue's floor in the
line), or a step of ours wrote, or may have written, a heap's title
memory while preparing an earlier submission (heap_marks::prep_wrote:
buffer copies into a heap, copies at their place, our own steps). Added
here: a submission that waited for flights to land begins a round of its
own after the wait, as without the switch. With the switch off nothing
is marked, asked or counted. VICTORY_HEAP_SYNC_FIRST applies only to a
submission without a mark.

Not behaviour-neutral in timing: a record the title writes for a
submission after submitting it (or after a wait behind which the
submission stands was met) is left to a later round, as the console's
card could miss it too. Off by default. The frame line "the heaps'
records asked for at the title's submit" gives the wait per frame, the
rounds asked at a submit, the preparings that found theirs asked earlier
or had to ask, and those that wrote a heap's memory. Tests: the round
given begins after the call (heap_marks), and the line's marks with
waits and parts taken along (queue::behind).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-27 01:11:03 +05:30
readmet3xt-labandClaude Opus 5.5 66f7e545e3 VICTORY_HEAP_SYNC_FIRST=1: a submission's round of the heaps' records begun as it takes the lock
The round that mirrors descriptor records the title copied into its
heaps as bytes runs on a thread of its own, begun after the submission
planned its steps done on the card and looked at flights, and waited for
at the end of the preparing. That wait was 2.7-5.8 ms a frame of the
submitting thread in release run 233354 (heaps' records line, "ms waited
for"), 5% of its samples in profile-y-prof60 (SyncedHeaps' drop), while
the planning ahead of the round's start took 2-4 ms a frame.

With the switch a submission sent ahead begins the round as soon as it
holds the submission lock, so it runs beside that planning too. A
submission that waits for flights to land (settle or relay wait) begins
another round after the wait, as the round began there saw what they
landed; the first is then not waited for.

Not behaviour-neutral in timing: the round reads the heaps' pages earlier
by the planning's time. A record the title writes for a submission after
submitting it is left to the next round (the console's card could miss
it as well). Off by default. The frame line "the heaps' records begun as
a submission took the lock" counts the rounds begun first and those begun
again; the heaps' records line's "ms waited for" shows the gain.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-27 01:11:02 +05:30
readmet3xt-labandClaude Opus 5.5 19720fee01 A submission's batch kept for the next one; one walk for the spans asked and looked at
Every submission (28 a frame) made its Batch anew: the table of pending
refreshes by copy, the staging buffers seen (with the standard hasher),
the copies refreshed ahead; and three walks over its steps each built a
hash table of the copies from nothing: the spans of the one write-watch
asking, the spans of copies shaders may be writing (stale_under_flights),
and refresh_front's copies. In profile-y-prof60 hash tables growing and
inserting under Host::submit were 2.4% of the submitting thread
(reserve_rehash and HashMap::insert), heap allocation and freeing more.

Now the Batch is kept per thread, emptied with its room, for the next
submission. The per-copy spans of all refreshes are found in one walk
(Batch::copy_spans) and serve the asking (the copies asked ahead, as
before), the stale check behind flights (the copies with writes pending,
as before) and refresh_front, which takes the copies' references from
them instead of a table of its own. The staging buffers seen use the
address hash.

Behaviour-neutral: the same ranges are asked about (in another order;
the asking sorts them), the same spans are looked at in the same order,
the same refreshes are made. On by default, no switch.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-27 01:11:02 +05:30
readmet3xt-labandClaude Opus 5.5 a7b86676e7 New host lists for the title's lists left open for its next reset
At every submission each of the title's lists gets a new host list, from
the pool of landed lists (reset when they landed) or newly made: open and
empty. It was closed at once on the submitting thread, so that the
title's next call on its list, a reset, found it closed, and that reset
then reset allocator and list once more. About 200 empty closes a frame
on the submitting thread (HostList::close under list::detach, 3% of its
samples in profile-y-prof60, about 1 ms a frame) and 200 needless resets
on the threads that translate lists.

Now the new host list is left open and marked with its title calls and
epoch; the title's reset finds it so and skips the D3D12 reset (the rest
of the reset, scratch memory, states, steps, is done as before). If the
title submits the list again without a reset, the host list is closed
when it is taken to run, as before. If anything was recorded into it
before the reset (its title calls or epoch moved), it is closed and
reset as before.

Behaviour-neutral: the lists that run on the card are the same (these are
empty either way). On by default; VICTORY_FRESH_OPEN=0 closes them at
once as before. The frame line "new host lists for the title's lists
left open per frame" counts them, the resets that had nothing to undo and
those closed after all.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-27 01:11:02 +05:30
readmet3xt-labandClaude Opus 5.5 ed252ec962 The submitting thread's time split on the frame line in release builds too
The split of a submission's preparing (write watch, title bytes under
flights' writes, the lists' steps and their refreshes, card copies, the
waits for the heaps' records, sending) was counted in diagnostics builds
only. It is now counted in every build, some forty clock reads a
submission, and logged every second as "preparing per frame, the
submitting thread: N ms in its submissions: ...", with the time after
each sending (the flight noted, landed lists reset and given back). The
line of the thread that does the line says what it spent taking
translated lists out of the line (new host lists closed for the title's
lists), which is outside its "worked" time. Diagnostics builds print the
same line in place of their old first split line; their other split
lines are as they were.

Behaviour-neutral: counting and logging only.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-27 01:11:02 +05:30
readmet3xt-labandClaude Opus 5.5 91df493ead VICTORY_PRELUDE_UPLOADS=1: title textures uploaded on the list's prelude, decided at submission after the check (off)
Ported from Belobug/VIctory-Belobug-AMD 5d6bd84 ("Upload title textures in
submission prelude to fix frame-order & flickering"), where it is the only
way. A list records the upload of a title texture it samples only if the
staging buffer was changed when the list was recorded; the check at
submission may then find the memory changed and detile it, and only the
next list that samples the texture uploads that: a frame late when every
list of the frame was recorded before the check (a video's ring of buffers
shows an older picture, a texture streamed in its last one). A candidate of
the flicker at scene loads (analysis 6.12).

With the switch, `texture::upload_from` records nothing in the list: it
leaves a `PreludeUpload` (staging buffer, host copy, levels on demand) with
the list, and its `Step::Texture` as before, so the checks run where they
ran. At submission, after the list's steps, the staging buffers left pending
are refreshed (`Batch::refresh_textures`), and each texture whose host copy
was never uploaded or whose staging buffer was detiled since its last upload
is claimed (`claim_upload`; once per change, whichever lists of the
submission sample it) and copied on the list's prelude (`HostList::prelude`):
aliasing barrier for a pooled texture's first upload, to the copy
destination state and from there to the state the list starts with. What
the list's own upload did after the copy (a host copy grown, levels on
demand given memory, what the host copy holds) is done at the claim.

Kept as before: bakes (they record their copies whatever the check finds)
and movie planes. Left out of the port: the texture store's prefill (this
tree has none), the fork's refreshes before every copy and run step (here
`title_written` flushes the textures due already), the fork's change of
`Step::Texture`'s payload (the upload is held beside it instead, so the steps'
other readers, `card_steps` and `place`, are untouched), and its panel
change (unrelated).

Off by default (not behaviour-neutral: when textures are uploaded changes).
Tests (from the fork): a claim per change, in the same submission; a ring of
three buffers never shows an older picture.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-27 01:08:54 +05:30
readmet3xt-labandClaude Opus 5.5 ee3fb5201a VICTORY_SHOW_NEW_LATER=1: slots show a texture made while earlier lists run only once those ran (off)
Ported from Belobug/VIctory-Belobug-AMD 4cd2d13 and 91018a5, where it is on
by default. Every device loss with the texture pool in that fork's report
(n08, n11, n15, steps-ab2, start-3, a user's play-1125-2107 without ray
tracing) was a page fault at the first byte of a texture in a block made
that millisecond, its title slot changed "at once" (`mirror`) while lists
sent before read that slot by index; VICTORY_SHOW_AFTER covers only some
paths (a draw's table, the texture pass's own uploads). We run the pool.

With the switch, `HostHeap::mirror` holds a slot whose new view shows a
pooled texture made while a submission begun before it may still run
(`pool::begun_before`: the submissions begun when it was made, noted in
`pool::made_now`) on what it showed, or the neutral texture if that cannot
stand for it (`keep_shown`), and flips it when every such submission has
finished (`FLIPS`, `texture_slots_flip`); a slot held back is held once, not
again at each draw or pass that reads it (`NEW_PENDING`, 91018a5). A line
says how many slots were held back since the start (with the switch on).
Also an A/B switch in diag builds (VICTORY_AB).

Off by default (not behaviour-neutral: a slot shows its new texture one or
more submissions later); with it off, `made_now` notes nothing more than
before and nothing else changes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-27 01:08:54 +05:30
readmet3xt-labandClaude Opus 5.5 5dda41ddff VICTORY_QUEUE_HOST_TEXTURES=0: records of textures the host writes are not queued for the texture pass (off)
A slot's record of a texture object the host renders to or writes (a
target, depth or unordered access texture) is queued for the pass over
textures picked by index like any texture. The pass takes such a slot,
finds nothing to bring up to date (it makes and uploads nothing for it) and
takes it out; the title writes such views into its tables' slots every
frame, so they come back, each time a take of the queue's lock, a place
among the slots due and a few microseconds of the pass (58,978 of 90,699
slots taken in 5 s of a cutscene found nothing to do,
coolfox-20261126-233017 18:02:23; 18ff932 says how many were such views).

With the switch, such a record takes the slot out of the queue as a buffer
view's does (`note_buffer`; with the queue's marks, without its lock when it
is not queued). Counted since the start in the lock line.

Off by default (not behaviour-neutral, though the pass did nothing for these
slots): fewer slots are due, so a pass reaches others sooner, the catch-up
budget (VICTORY_TEXTURE_CATCHUP, started by the count due; off in the
launcher) starts less often, and a bake's pass is asked for less often (it
runs when the queue's write count changed).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-27 01:03:43 +05:30
readmet3xt-labandClaude Opus 5.5 8625c3a00b VICTORY_TABLED_REREAD=1: a table read takes out a slot written after its frame's first read (off)
A slot draws read through a table leaves the queue of textures picked by
index at its first table read of a frame only (`tabled_in`, once per slot
and frame; and the draws of a recording tell of a record once,
`Listed::tabled`). The title rewrites tables' slots while it records: a
slot written after that read is queued due `TABLED_GRACE` (8) frames on, the
draws that read it later in the same frame leave it there, and the pass
takes it 8 frames later and finds it uploaded by those draws or nothing to
do: 17,000-58,000 slots in 5 s of a cutscene (coolfox-20261126-223059,
analysis 6.6; "read through tables" and much of "nothing to bring up to
date" in the pass's split line).

With the switch, such a later read takes the slot out when the queue's marks
(b5b7806) say it holds it, a lock-free look (without the marks it does
nothing: every read would take the lock), and the recording's gate lets a
slot the queue holds through, so the draw also makes the title's slot in
place as at a first read (`mirror_after`). Counted in the lock line: slots
taken out by a table read after the first of their frame, since the start.

Off by default (not behaviour-neutral): a shader that picks such a slot by
index then sees what the draw made of it at once, not what the pass makes 8
frames later; that lateness is a candidate of the flicker at scene loads
(analysis 6.12).

Test: written after its frame's first read, a slot waits for its grace
frames; a later read takes it out with the switch only.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-27 01:03:43 +05:30
readmet3xt-labandClaude Opus 5.5 4cee21f397 Texture queue's lock by place, the pass's shown, nothing and before parts (5-second lines)
The split line of 7d8d56a found, per run of ~150 s, 3.8-5.2 s of the pass
and 33-44 s of other threads waiting for the lock of the queue of textures
picked by index, and 5.0-7.0 s in "slots shown after their upload, flipped
or made at once" (coolfox-20261126-232343, -233017). Two more 5-second lines
say where:
- the queue's lock by place (`descriptor::queue_site`: the pass asking of or
  telling of a slot, taking the slots due, making slots due, noting a slot's
  record, table reads, stale views, else): the times it was taken, the waits,
  how long the places that hold it for many slots held it (the slots due,
  slots made due, stale views), and the times it was not taken (none yet);
- the pass's parts: slots made at once, shown after their upload and
  flipped (time and count); the slots with nothing to bring up to date by
  why (views of textures the host writes, no texture, the host's own
  texture) and how many of them the pass made at once; the work before the
  loops (slots made due, views made again and flips, taking the slots due).

A lock taken is counted by one relaxed add under it; hold times are timed
only at the places that hold it for many slots. Nothing else changes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-27 01:03:43 +05:30
readmet3xt-labandClaude Opus 5.5 8a9353817e Frame generation: where a frame's time goes in Streamline's calls, on a line every second
With VICTORY_FRAMEGEN=1 and presents through Streamline's swap chain:
"DLSS Frame Generation, time per frame: the presenting thread N ms
before the present call, N ms in it (the longest N ms), N ms after it;
of those N ms in the latency markers and N ms asking frame generation's
state; an upscaling recorded in N ms (N ms of it waiting for the lock it
shares with the present); the copy of the colour without the interface
recorded in N ms". Counting and logging only; nothing is timed without
frame generation.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-27 01:03:42 +05:30
readmet3xt-labandClaude Opus 5.5 1d0fa87f39 Frame generation on Series X: the colour without the interface, copied in front of the title's interface composite
On Series X the title blends its interface target over the frame itself:
one triangle (vertex 0602c2384acbb3b2, pixel a78d088fa55aa495), the last
draw into the texture it presents. With VICTORY_FRAMEGEN=1 the target is
copied into a texture of ours in front of that draw, at its place in the
title's list, and the present tags the copy as kBufferTypeHUDLessColor
(VICTORY_FRAMEGEN_HUDLESS=0: not). Log: the first copy, each other
pipeline that draws into a presented texture, and counts every ten
frame-rate lines.

Found reading the in-game path:
- Frame generation's constants get the camera's planes in order (the
  title names the far plane first; the projection took 10000 for the
  near plane of an endless range). DLSS Super Resolution's are as before.
- With Streamline's swap chain the system's Alt+Enter is not taken.
- Video memory is logged before the first present with frame generation
  on and 240 presents later.

upscaler-check: a stand-in colour without the interface is tagged with
--present; with a device the check ends with frame generation off, the
swap chain let go and slShutdown (VICTORY_CHECK_TEARDOWN=0: not): the
exit code is 0, where the process failed fast at its exit before
(0xC0000409, shown as 9). VICTORY_STREAMLINE_PRESENT=1 (off): with DLSS
and no frame generation our swap chain is Streamline's proxy of it, which
ends "presentCommon() was not observed" (the check runs it with
--present: 120 upscalings and presents).

With VICTORY_FRAMEGEN off and the new switches unset the title runs as
before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-27 01:03:42 +05:30
readmet3xt-labandClaude Opus 5.5 fb838e8251 Title views kept in the books alone until the title's CPU touches them (VICTORY_SOFT_VIEWS, off by default)
VICTORY_SOFT_VIEWS=1 (pool: the title's XMemMapPhysicalPages views alone;
copies: those of CopyPageMappingsBatchX alone): a view is noted in the
runtime's books and told to the GPU side as mapped, its addresses are one
placeholder of their own, and the host maps nothing. Each view of the host's
was a MapViewOfFile3 (45 us) and later an UnmapViewOfFile2 (93 us), both
behind a lock of the kernel's that the guards' protection changes take too:
445,503 maps (20.1 s) and 349,175 unmaps (32.6 s) in 143 s of run stream2,
359,969 mapping calls 23.8 s, 3,294 page-mapping copies 33.7 s, one of them
467 ms of a 608 ms frame (timeline tl.120).

Who gets the bytes of such a view, and how:
- DirectStorage writes pages by number through the section's own view, and
  page-mapping copies read the pool from the books: as before.
- The GPU side's reads of title memory (host::read, read_sparse) take them
  from the pages through the section's view (xmem::soft_read); a texture
  with such views is read through a copy, not in place; texture::committed
  takes such views for committed.
- The guards keep such a view in their books (watch::protect_here,
  protect_alias): no VirtualProtect, no question to the host. A write the
  runtime tells of, or one through another view of the page, opens it as
  before.
- Any touch of the memory itself (the title's CPU, a direct read of ours)
  faults; the GPU side's handler has the runtime map the view and the access
  is made again; the guards then open it and every other view of its page
  (title_memory_made_real). Our writes through the kernel, announced kernel
  writes, and the title's XMemVirtualQuery, XMemVirtualAlloc, VirtualFree
  and (with the switch) VirtualQuery and VirtualProtect ask first.

Why VICTORY_LAZY_VIEWS=1 ran at 2 fps (run xw-lazy, 2.4 to 3.4 GB of copies
a frame): a view guarded together with a lazy view of the same page was
never clean, because the host refuses to protect a placeholder
(protect_alias), so it was copied again at every asking; and every guarded
range made its lazy views real. Both are what the books replace here. Also
for both switches: a view is known as lazy before the GPU side is told of
it (a refresh in between noted the block absent), and its pages are
committed when it is noted (the GPU side writes them through its own view
of the section).

Counted: the streaming log's M line gets twelve more fields with either
switch (noted, let go untouched, made real; noted by mapping calls, by
copies; made real by a fault of the title's code, of other code, asked for
by the GPU side, by a call of the title's; reads served from the pages,
their KiB; such views now), and with VICTORY_SOFT_VIEWS the log has a line
of the same every 10 s, with the last faulting address and code.

Tests: xmem and host views_in_the_books_alone_are_read_from_their_pages, watch
a_view_in_the_books_alone_is_guarded_there. Not run in the game yet.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-27 00:32:01 +05:30
readmet3xt-labandClaude Opus 5.5 c1d1b4ee76 Texture queue census: slots waiting for a look again are not waiting for their memory
The census counted a slot uploaded whole and waiting for its looks again
(RECHECK_FRAMES 4, 12, 40, 120, 400 frames: in the queue up to 576 frames
after its upload) as "waiting for their memory", and its old write as "the
oldest". In coolfox-20261126-223059 at 17:02:04 the queue line said 19,277
waiting for their memory when the looks that had found memory not there
numbered 1,700 in the whole run (17:01:45: 6,842 vs 104; 17:01:59: 19,023 vs
471): nine in ten or more of them were uploaded textures waiting for a look
again, not streaming. They are counted apart now ("uploaded whole and waiting
to be looked at again"), and "the oldest" is of slots not uploaded yet.

A new 5-second line says how late first uploads are: slots served for the
first time at their first look, with the frames they had been due before the
pass took them (the pass's own lateness: its time cap), and slots served
after their memory was found not there, with the frames since their write
(streaming: mapping that came late).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-26 23:03:25 +05:30
readmet3xt-labandClaude Opus 5.5 0b651fa9a8 Texture pass: tell its "rest" apart (5-second line), waits for its locks
The pass over textures picked by index logged 846 of 1,408 ms (cutscene,
coolfox-20261126-223059) as "the rest". A second line now splits it:
telling the queue what came of each slot, reading the slots' records,
fingerprints after uploads and same-looks, handing first uploads to the
copy queue ahead, slots shown after their upload / flipped / made at once,
asking whether a staged texture's memory is all there, other checks; the
waits for the queue's and the views table's locks (by the pass and by other
threads, counted only when the lock was held: try_lock first); the work
before the loops (not in "all"); passes by kind (frame, early, bake) with
their time and how many stopped at their time or bytes; and the slots taken
by outcome.

The existing parts are summed in nanoseconds now: in microseconds each short
call lost what it took below the next whole one.

The pass reads the slot's view once for its placed and object checks (it
read it twice).

pass_costs (ignored test, a measurement): on this PC asking whether 1/4/16
MB of resident memory is all there takes 18/23/111 us, 0.9-15 ms when the
pages were trimmed from the working set; a fingerprint 3-7 us.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-26 22:56:37 +05:30
readmet3xt-lab 89dca0a59c Merge agent/dlss: DLSS Super Resolution through the title's FidelityFX dispatch (VICTORY_DLSS), DLSS Frame Generation (VICTORY_FRAMEGEN), both off by default; Streamline loaded at run time from outside the repo
Co-Authored-By: Claude Opus 5.5 <[email protected]>

# Conflicts:
#	crates/victory-gpu/src/host.rs
2026-11-26 20:26:47 +05:30
readmet3xt-labandClaude Opus 5.5 fc8b9caeb3 DLSS and DLSS Frame Generation through NVIDIA Streamline (switches, GPU side)
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]>
2026-11-26 20:22:46 +05:30
readmet3xt-labandClaude Opus 5.5 735a34f606 Merge agent/async: two host queues planned in dry run (VICTORY_ASYNC_QUEUE=plan), compute-queue time in the timeline
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-26 20:01:48 +05:30
readmet3xt-labandClaude Opus 5.5 fa88dc7c84 Two host queues: a plan for the title's compute queues (VICTORY_ASYNC_QUEUE=plan, off by default)
The gameplay frame is about 45 ms with the card busy most of it on about
11,000 small commands at 130-140 W of 220; a timeline (tl.190) had the
submission the title waited for stand 7.2 ms sent and not begun behind
other work on the one direct queue. The title runs part of its work on
compute queues of its own, which on the console overlaps its drawing.

The queue itself is not built: a D3D12 list runs only on a queue of its
own type, the type is fixed when the list is made, every host list is a
direct list, and what the layer records into the title's compute lists is
not all something a compute list may hold (textures shaders read are put
in both read states, 0x40|0x80; depth twins are copied through a drawn
pass). A submission cannot fall back to the direct queue once its lists
are compute lists. This is the half that can be had without that:

- host/two_queues.rs: Plan::place, the order between a direct and a
  compute queue: the queue each host submission would go to, the value
  signalled behind it, and the one wait put before it (left out where the
  queue waits behind that value already, or the submission has finished),
  for copies in the card's memory (sends and compares in one order), steps
  on the card, textures named on both queues, memory values a flight of
  the other queue writes (late_met_by), tile mappings, a texture's drawing
  state moved on the direct queue first, and submissions of ours.
- With VICTORY_ASYNC_QUEUE=plan (or =1, which says it is not built) the
  frame line "two host queues, planned per frame" counts submissions by
  the title queue's type, what keeps compute submissions on the direct
  queue, those that would go to a compute queue (with and without a wait)
  and the waits by reason. Nothing runs differently.
- The title queue's type reaches Host::submit (two_queues::for_title from
  the line's thread and the older paths; the queues' types by address,
  queue::kind_of); a value job in the line knows its queue.
- Diagnostics: the timeline's summary says how much of the card's running
  time was the title's compute queues' submissions (the most a queue of
  their own could run beside the rest).

Tests: the plan's order (eight cases). The two failures in indirect::tests
are as before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-26 20:00:25 +05:30
readmet3xt-labandClaude Opus 5.5 28f6e25210 Indirect executions joined (VICTORY_INDIRECT_MERGE=1, off) and counted
An execution of one record that follows another on the same host list is
recorded with it as one ExecuteIndirect of more records when nothing could
tell them apart: no title call that records into the list between, binding
calls between that set what was set (State::rebinds), no count buffer and
one record each, same kind and host pipeline, no clamp pass recorded for
it (batch slot or window hit), the run's last binding left the list's
epoch where it found it, and the record lies next to the run's last in the
same scratch buffer at the run's step (batch slot or window step; the run
is recorded with a signature of that stride).

The run's execution is held back on the HostList and recorded before
anything else: every title call that may record (list::host_list), the
clamp passes and bindings of later executions, and the list's close.
Calls that only change the binding (pipeline, heaps, tables, views,
constants, vertex and index buffers) no longer count as title calls and
record nothing; they count their real changes instead.

A release frame line counts every indirect execution by verdict, with the
switch off too: how many could join the one before them, how many were
joined, and what kept the others apart (first on the list, a title call
that records, count buffer or more records, kept alone, other kind or
pipeline, clamped, binding changed, root constants only changed, binding
that changed the list, record apart).

Tests: the merge rules (11), a HostList test that records held runs at a
title call and at close and runs each record once on the card, and two
new variants of the ignored bare_command_cost measurement (each draw an
indirect execution of one record; all records in one execution).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-26 19:42:52 +05:30
readmet3xt-labandClaude Opus 5.5 72a546b0f2 Merge agent/textures: lazy pool views (VICTORY_LAZY_VIEWS, off by default); mapping takes the remapping lock first
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-26 19:28:26 +05:30
readmet3xt-labandClaude Opus 5.5 f12996ca37 Lazy views of title pages (switch, off by default)
VICTORY_LAZY_VIEWS=1: the title's own mapping calls (XMemMapPhysicalPages,
and the scatter form a page at a time) note the view in the books and
tell the GPU side of it as before, and make its addresses a placeholder of
their own (a split; a VirtualQuery to make sure), but map the host view
only when something touches it. A view no one touched is let go with no
system call, and mapped again at the same addresses with none. The title
streams into its pool one call a page (365,000 calls, 25.7 s in 4 minutes
of run x1440-streamlog; 846 ms of 1.7 s on a cutscene's critical path,
timeline tl.120), DirectStorage fills the pages through views of its own,
and the page-mapping copies read the pool from the books alone.

A lazy view is made real (xmem::materialize, the books' lock only) by:
- any fault in it, the title's or ours (direct reads and writes, our safe
  copies and puts): the GPU side's fault handler, first in the process,
  asks before anything else and makes the access again
  (victory_gpu::use_lazy_views);
- the GPU side before what that handler does not see: reads and writes
  through the kernel (host::read, write_mapped, copy_mapped's title
  destinations), kernel writes the runtime announces (kernel_writing: file
  reads, DirectStorage memory destinations), guarding a range
  (watch::writes), and asking Windows whether memory is committed
  (texture::committed);
- the title's XMemVirtualQuery, XMemVirtualAlloc at an address, and
  VirtualFree, which then see a view as before.

Lock order: the remapping lock (victory_gpu::title_memory_remapping) is now
taken before the views' lock in every mapping call, so a reader that holds
the reading lock and faults into a lazy view gets the views' lock while a
mapping call waits for its lock (the old order, views first, would wait
for good). Page-mapping copies and side-by-side mapping map as before and
let lazy views go as their own. The streaming log's M line gets three more
fields with the switch: lazy views noted, let go untouched, made real.

Tests: lazy_views_are_mapped_when_touched (a read faults and maps it with
the pages' bytes; a write lands in the pages; untouched ones go without a
host view; a lazy view cut in two stays lazy at its ends; XMemVirtualQuery
maps it), a_reader_in_place_faults_into_a_lazy_view_while_a_mapping_waits.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-26 19:27:11 +05:30
readmet3xt-labandClaude Opus 5.5 50c15a145a Write-combined title memory: no write-back of shader writes, one mapped copy (switches)
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]>
2026-11-26 19:14:48 +05:30
readmet3xt-labandClaude Opus 5.5 5876706fb0 Merge agent/shaders: pipelines left out on purpose named; wave64 groups of several console waves on 32-lane hosts
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-26 17:39:29 +05:30
readmet3xt-labandClaude Opus 5.5 f149e26fea Name pipelines left out on purpose instead of "being made"
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]>
2026-11-26 17:14:53 +05:30
readmet3xt-labandClaude Opus 5.5 ff5d931657 Texture room line from the budget; time host-copy creation in the pass
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]>
2026-11-26 17:08:48 +05:30
readmet3xt-labandClaude Opus 5.5 21b040da07 Give up the render-target reserve once targets settle; log the room test
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]>
2026-11-26 16:47:19 +05:30
readmet3xt-labandClaude Opus 5.5 3cb7b8f1d0 Exact texture refreshes read through the kernel before waiting
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]>
2026-11-26 16:44:17 +05:30
readmet3xt-labandClaude Opus 5.5 cb191f38e4 Log views in another format than their typed host texture
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]>
2026-11-26 15:37:04 +05:30
codec_d 545f89019e Publish the pareto-residency Windows build and portable launcher 2026-11-25 22:33:14 -08:00
codec_d efeef1d65b Back off refused GPU pool growth and defer uploads under low commit 2026-11-25 16:07:37 -08:00
codec_d 3bcc96f9bb Port NVIDIA Wave32 lowering, smooth movie-plane uploads, XMA audio fixes, and 32GB RAM residency budgets 2026-11-25 15:31:19 -08:00
codec_d 45e90f4de8 Fix Series S two-plane black screen by reading RetailPlane at 72-byte stride 2026-11-25 14:55:26 -08:00
codec_d f5847e6248 Merge VIctory-7900XTX (0a43566) with RTX 5090 fidelity & 32 GB RAM optimizations: two-plane compose, fallback heaps, TablePlan, residency guard, 256 MiB DirectStorage, and WaitOnAddress fence wakes 2026-11-25 14:43:52 -08:00
local 7e945ed582 Merge commit '449830f6' into local/next 2026-11-25 15:57:35 -06:00
local 5aba66bced Merge branch 'day/shaders' into local/next 2026-11-25 15:57:28 -06:00