Commit Graph
688 Commits
Author SHA1 Message Date
readmet3xt-labandClaude Opus 5.5 175d62fc6b Merge agent/dlss: DLSS Frame Generation on Series X with the colour without the interface, Streamline timing line (VICTORY_FRAMEGEN, off by default)
Runs from the main path (chain z1): z-fg-a/b with VICTORY_FRAMEGEN=1: gameplay 43.3 / 38.3 ms, cutscene median 47.8 / 41.1 ms, 0 s over 100 ms (z-base: 39.3 / 43.5 ms); first in-game run y-fg-a (cold shader cache) stalled for that reason only.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-27 01:25:20 +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 2c5054fa79 docs: frame generation's colour without the interface on Series X, new switches, the checks of the first run in the title
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-27 01:03:42 +05:30
readmet3xt-labandClaude Opus 5.5 b8aadfae24 FidelityFX: said when the title's own upscaler is not made (frame generation without DLSS at 1440p)
VICTORY_FRAMEGEN=1 without VICTORY_DLSS=1 leaves the upscaling to the
title's FidelityFX, whose shipping FSR4 is made for 1920x1080 only; at
another output its context is not made and the title fails at its first
upscaling. The log now names the cause and the switch to add. Logging
only.

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 a83bc910a7 Merge agent/mapping: title views kept in the books alone until the title's CPU touches them (VICTORY_SOFT_VIEWS, off in the code)
Runs from the main path (warm shader cache), same build, 2026-11-27 00:40-01:02:
- VICTORY_SOFT_VIEWS=copies (m-copies, -b, -c): cutscene median 39.2 / 39.3 / 40.9 ms, p95 57 / 51 / 52 ms,
  0 seconds over 100 ms in each; gameplay 35.4 / 36.4 / 34.7 ms.
- switch off (m-base, -b, -c): cutscene median 66.6 / 63.3 / 66.0 ms, p95 181 / 102 / 167 ms, 20 / 4 / 11 seconds
  over 100 ms; gameplay 60.1 / 72.6 / 35.6 ms.
- streaming log (m-base vs m-copies, ~140 s): the title's page-mapping copies 35.1 s -> 2.0 s; unmaps 322,253
  (31.9 s) -> 155,387 (10.1 s); maps 419,724 (19.4 s) -> 219,805 (6.6 s); 242,583 views noted without a Windows
  view, 1 made real. No device removal, no faults; fixed frames as before.
- VICTORY_SOFT_VIEWS=pool does not help yet (157,364 of 199,786 made real, 150,484 of them asked by our GPU side).
The launcher sets VICTORY_SOFT_VIEWS=copies.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-27 01:03:28 +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 4732b4676b Merge agent/texpass up to f668b99: texture pass split line, census fix, staged-texture questions only at title addresses
Runs y-texA-a/b (this branch) vs y-base-a/b, y-texB (VICTORY_STAGED_ASK_ALL=1 = old cost), 2026-11-26 23:20-23:47:
asking Windows whether a staged texture is all there cost 271 ms per whole run with the old behaviour, 91-189 ms
with these commits: a real but small saving, not the 400-700 ms per 5 s expected. The pass's "rest" did not drop
beyond run-to-run noise (whole-run sums 14.9-21.3 s vs 16.3-18.2 s). The new split line shows where it goes:
slots shown after their upload or flipped 5.0-7.0 s per run, telling the queue what came of each slot 4.0-5.6 s,
waiting for the queue's lock 3.8-5.2 s by the pass and 33-44 s by other threads. Gameplay frame unchanged
(33.8/34.0 vs 33.2/33.5 ms); fixed frames match. 4c58bf2 (VICTORY_TEXTURE_FRAME_MS) is left out: run y-texC no
better.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-26 23:52:23 +05:30
readmet3xt-labandClaude Opus 5.5 6b3960daf2 Staged textures at title addresses: whether all is there, from the runtime's views
The texture pass's question whether a staged texture's memory is all there
is still put to Windows for textures made at an address the title mapped
(the console's usual placed textures; a question per 256 pages). The
runtime's views of physical pages answer it where they cover the memory, as
they already answer `mapped_bytes` for placed views: one look, under a
microsecond where Windows took 3 us (350 KB), 135 us (22 MB) and 647 us (22 MB,
1 MB there) (look_costs on this PC). Windows is asked only where no view
lies. `VICTORY_MAPPED_BY_VIEWS=0` asks Windows, as for `mapped_bytes`;
`VICTORY_STAGED_ASK_ALL=1` still asks Windows of every texture.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-26 23:06:49 +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 36c4c3746c Texture pass: ask whether a staged texture is all there only at title addresses
`texture::staged(_, ask)` asked Windows whether every page of the texture's
memory is there (QueryWorkingSetEx per 256 pages, and a one-byte read of each
page not in the working set) for every texture object the pass took: 20,000 to
57,000 every 5 seconds, most of them slots read through tables, which the pass
only marks done. A whole run found 66 not all there. The pass's unattributed
time followed their count: rest = 400 ms + 12.7 us x tabled slots per 5 s over
the run's lines (coolfox-20261126-223059, e.g. 17:02:57 57,760 -> 1,136 ms,
17:03:58 17,786 -> 629 ms). Measured here (pass_costs): 18-111 us for 1-16 MB
resident, 0.9-15 ms when the pages had been trimmed.

Only a resource made at an address the title mapped can lose its memory while
it lives; a committed resource's memory and a heap's are allocated and zeroed
whole when made. So the question is asked of those alone
(`resource::at_title_address`); `VICTORY_STAGED_ASK_ALL=1` asks of every
texture, as before. Expected: the cutscene's 846 ms "rest" per 5 s drops by
about 13 us x the tabled slots (400-700 ms), gameplay's ~690 ms by ~250 ms.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-26 22:58:37 +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-labandClaude Opus 5.5 2f81d0c85b VICTORY_WC_NO_BACK_MIN_KB: only copies at least this large leave shader writes on the card
With VICTORY_WC_NO_BACK=1 for every write-combined copy, cutscenes on the
4070 SUPER went near black (run xd-wcnoback): small results the title reads
back came back stale. 3,245 write-combined copies, median 4 KB, 82 of 1 MB
or more, 7 of 16 MB or more (largest 90 MB). Leaving only copies of 1 MB or
more on the card keeps the image (fixed frames equal to the plain run) and
the saving: with DLSS Quality, gameplay 38.3 -> 33.3 ms, cutscene median
47.3 -> 36.3 ms, p95 205 -> 142 ms, title's busiest thread 57 -> 47% of a
core (runs xd-base-b, xd-wc1m; 16 MB: 35.3 ms, xd-wc16m).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-26 22:24:42 +05:30
readmet3xt-labandClaude Opus 5.5 4fcaebdb5a DLSS on Series X at 1440p: the title's FSR4 context made at the shipping sizes
The title's shipping FSR4 carries only the Series S fixed-resolution quality
tables (1280x720 in, 1920x1080 out). At the 1440p output with the FidelityFX
path patched in, its context creation failed ("Shipping FSR4 configuration
mismatch"), our hook saw no context, and the title divided by zero at its
first upscaling (0xc0000094, runs x1440-dlssq, -dlssq2). With DLSS taking the
upscalings, the context is now made at the shipping sizes and DLSS gets the
sizes the title asked for; a dispatch DLSS does not take on such a context
runs no upscaling instead of the title's FSR4 at a size it cannot do.

Run x1440-dlssq3 (VICTORY_DLSS=1, quality, 1706x960 -> 2560x1440): 1.00 DLSS
upscalings a frame, none failed; gameplay 43.8 -> 38.1 ms, cutscene median
50.3 -> 41.3 ms, p95 319 -> 108 ms against x1440-base2.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-26 22:01:02 +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 24d6bbb876 VICTORY_FSR_PATH=1: the title's FidelityFX path with its own upscaling, for comparing with DLSS
The image is patched to the FidelityFX path at VICTORY_DLSS_MODE's scale
as for DLSS, without Streamline: on Series X what that path looks like
and costs by itself, so that a fault seen with DLSS can be put on the
path or on DLSS.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-26 20:25:34 +05:30
readmet3xt-labandClaude Opus 5.5 33f1c647eb docs: DLSS and DLSS Frame Generation setup, switches, how it works, limits
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-26 20:22:58 +05:30
readmet3xt-labandClaude Opus 5.5 d11233aa22 The title's FidelityFX calls through ours, its FidelityFX path on Series X (from DexNom's fork)
With VICTORY_DLSS=1 or VICTORY_FRAMEGEN=1 and Streamline available, the
executable's imports of amd_fidelityfx_loader_xbox.dll (ffxCreateContext,
ffxDestroyContext, ffxQuery, ffxDispatch) are bound to ours, which call
the title's own DLL for everything and give an upscale dispatch to
victory_gpu::streamline: DLSS takes it (the title's is not called), or,
with frame generation alone, its inputs are noted and the title's runs.
The title's upscaler context stays its own, so its upscaling runs again
on any frame DLSS does not take; each reason is logged once.

Series X never uses that path by itself: no Series X run (stock or
1440p) loaded amd_fidelityfx_upscaler_xbox.dll, every Series S run did.
The renderer selection (title+0x7e9421) takes the FidelityFX path,
renderer 7, only on a Series S (title+0x75140 tests the device type for
6); Series X takes renderer 6, the title's own temporal pass. The title
sizes the FidelityFX path's scene itself (title+0x28ef69a: its scale
times the output size), not through ffxQuery. So with DLSS or frame
generation available, native_1440p::prepare_upscaler patches renderer 7
in and the scaled branch to VICTORY_DLSS_MODE's scale (dlaa 1, quality
2/3, balanced 0.58, performance 1/2, ultraperformance 1/3; noted as the
FidelityFX quality mode), and the temporal scene scale to the same, with
the 1440p output kept (images/native-1440p-upscaler-<mode>-sdr) or on
its own (images/upscaler-<mode>). Each instruction is checked against
the stock bytes first; the test does so with the retail executable.
Without Streamline the image is patched as before.

`victory upscaler-check [--device] [--present]` checks Streamline, DLSS
and frame generation on this PC without the title.

The FidelityFX description layouts and the image patch of the FidelityFX
path are ported from DexNom/VIctory (crates/victory-hle/src/modules/
fidelityfx.rs, apps/victory/src/native_1440p.rs prepare_fsr_4k,
GPL-3.0-or-later); here the title's DLL keeps serving the API and the
1440p output stays.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-26 20:22:58 +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 2393ebb0ee Merge agent/guards: write faults without the guards' lock (VICTORY_FAULT_UNLOCKED), hot blocks rest (VICTORY_GUARD_HOT), fault book reader
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-26 20:07:54 +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 d900cb8bf5 scripts/faultbook.py: reads the books of write faults (VICTORY_FAULT_BOOK)
Per book: faults a frame under the guards' lock (waiting, holding) and
without it (VICTORY_FAULT_UNLOCKED), by thread; blocks by the number of
frames they faulted in, and those that fault in three frames of four
(what VICTORY_GUARD_HOT would leave open); the time from a block's taking
to its next fault (what a longer VICTORY_GUARD_REST would leave out); the
busiest places in the code. Standard library only.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-26 19:59:30 +05:30
readmet3xt-labandClaude Opus 5.5 71fb27233d Blocks the title writes again and again rest longer (VICTORY_GUARD_HOT=<ms>; off)
Nearly every block a frame makes read-only is written again and faults:
321 to 1,017 blocks made read-only and 323 to 331 guard faults a frame in
play (logs coolfox-20261126-155824 and -172435), each fault a change of
protection on a title thread and each guarding one on ours, under the
guards' lock. With VICTORY_GUARD_HOT=<ms> a block that a write fault
opens within that time after its last rest ended rests that long
(VICTORY_AB naming it turns it on and off; 50 ms when no time is given).
A block that rests is told as written at every asking, as for
VICTORY_GUARD_REST, so no write is missed: it is copied at each refresh
that takes it while it rests. The entries of a range whose mapping
changes are forgotten.

Test: a block written again soon after it rested is left open and told
at every asking at both views, and guarded again when its rest is over.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-26 19:59:30 +05:30
readmet3xt-labandClaude Opus 5.5 3f55056817 Write faults open guarded blocks without the guards' lock (VICTORY_FAULT_UNLOCKED=1; off)
Of 281 ms the title's threads spent in the write-fault handler over 14
frames of play, 252 ms were waits for the guards' lock (timeline tl.190;
tl.130 and tl2's tl.185 the same): faults queued behind other faults and
behind refreshes guarding, up to 5 ms, while a fault's own work took 8
microseconds at the median.

With the switch a fault takes the block's bit in OPENING (whoever finds it
set waits up to 100 microseconds for that fault, then goes the locked
way), tells the other views of the page as written when the block is
guarded with them (ALIASED, a mirror of Guards::aliased: TOLD and BESIDE
set, PUBLISHED cleared), clears the block's PUBLISHED, sets its BESIDE,
changes the protection itself and queues the block. The next holder of
the lock settles the guards' notes before anything else (guards ->
settle). Until then the holders of the lock treat OPENING and TOLD blocks
as written and leave them as they are (guard), publish takes its bit back
if it finds one, and protect_alias does not count an OPENING block as
read-only for another view. OPENING's doc comment gives the argument.

Also: BESIDE is forgotten when the mapping of a block changes (the block
is told as written then anyway; a bit left behind kept a hole mapped at
the address from being known by its bits). asked_for! moves to switch.rs
for both files. Diagnostics: the line of the trackers' lock waits counts
faults opened under the lock (waiting, holding), without it, and those
that went the locked way after all; the fault book has What::Unlocked.

Tests: the single-thread tests whose writes fault, again with faults
that take no lock; the many-askers test with all and half the writers'
faults taking no lock; a fault settled by the next holder; what holders
do with an unsettled block; eight threads faulting on the same blocks at
once through two views; ranges of bits cleared.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-26 19:59:20 +05:30
readmet3xt-labandClaude Opus 5.5 6e08fb3103 Merge agent/indirect: consecutive ExecuteIndirect calls joined (VICTORY_INDIRECT_MERGE, off by default), candidates counted in release
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-26 19:44:57 +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 c0f627e4b5 Merge agent/shaders-cost: host-wave meetings only where LDS order needs them (02384a60), cheaper meetings
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-26 19:30:26 +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 89cfae291b Console waves' meetings: cheaper, fewer, and none where LDS order does not count
CS_DefragHeap_ComputeRelocations took 11.9 ms of GPU time a frame with
the pair meetings of ce383f8 (run 184458, the card's time by command).
Three changes, all for console waves meeting on their own
(`with_pair_meetings`: the digest list, VICTORY_WAVE_WIDE=1):

- LDS order (`LdsOrder`): the program cut at its s_barriers; an access
  needs the host waves of its console wave to meet only when a plain
  ds_write stands in a piece it can reach or be reached from. Atomics
  among themselves and reads of what an earlier piece wrote need none.
  In ComputeRelocations the relocation pass (reads, ds_cmpst loops,
  ds_add_rtn) and the copy pass after it lose every meeting, and their
  per-lane loops are no longer taken wave-wide: 8 branches widened
  instead of 18, 50 meetings in the code instead of 138. Reads near an
  LDS atomic are not taken as alike in every lane.
- A meeting: the first lane of each host wave counts it in (one atomic
  per host wave, two a meeting), the wave polls the counter with one
  shared load behind a fence. Before: an atomic per lane to arrive and
  per lane per poll.
- An exchange is one meeting: two buffers per console wave, taken in
  turn by the count of meetings (a half writes one only after the
  meeting its partner's reads of it came before). Before: two meetings.
  A first-lane read exchanges "has a lane" and the value at once.

Other programs translate as before (900 compute programs, the same DXIL
with VICTORY_HOST_MAX_WAVE=32); ComputeRelocations validates. Tests: the
two console waves' loops still bit-exact on the RTX 4070 SUPER; a new
test for the LDS order.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-26 19:24:19 +05:30
readmet3xt-labandClaude Opus 5.5 717687b43f Merge agent/perf: write-combined title memory without write-back (VICTORY_WC_NO_BACK), in mapped VRAM (VICTORY_WC_BAR)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-26 19:15:50 +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 dfe9acca03 Merge agent/textures: page-mapping copies counted once, VICTORY_MAP_RUNS (one view per run of pages), bake sources over host-written tables counted right
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-26 19:14:06 +05:30
readmet3xt-labandClaude Opus 5.5 9cb55c71fe Page-mapping copies: count them once, measure runs, map runs in one view (switch)
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]>
2026-11-26 19:11:27 +05:30
readmet3xt-labandClaude Opus 5.5 2983a71161 Bake sources: views over host-written textures are not failures
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]>
2026-11-26 19:11:27 +05:30
readmet3xt-labandClaude Opus 5.5 672442b710 VICTORY_LEAVE_OUT: pipelines of named shaders left out in every build
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]>
2026-11-26 19:04:21 +05:30
readmet3xt-labandClaude Opus 5.5 02b255d25b Merge agent/image2: pipelines with static samplers kept out of the pipeline library; ambient stand-in without feedback (switch)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-26 18:27:31 +05:30
readmet3xt-labandClaude Opus 5.5 8cf0a75267 VICTORY_AMBIENT_ONCE: the lighting stand-in without its own light fed back
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]>
2026-11-26 18:25:01 +05:30
readmet3xt-labandClaude Opus 5.5 7fa0e958e8 Pipelines with static samplers are not loaded from the pipeline library
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]>
2026-11-26 18:19:07 +05:30
readmet3xt-labandClaude Opus 5.5 ec3696f61f Texture queue: due() for tests only
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-26 18:14:12 +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 4f4970974f Wave64 groups of several console waves on 32-lane hosts: host waves meet per console wave
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]>
2026-11-26 17:38:46 +05:30
readmet3xt-labandClaude Opus 5.5 6a58b96835 Merge agent/image: VICTORY_FILTER_3D (3D table filtering in shader code), capture probe
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-26 17:24:39 +05:30
readmet3xt-labandClaude Opus 5.5 d246d10802 VICTORY_FILTER_3D: colour-grading tables filtered in the shader (experiment)
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]>
2026-11-26 17:23:04 +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 33687f9fe0 Merge agent/textures: null bake sources left out, texture room line from the budget
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-26 17:12:21 +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 082ebaf3b8 Bake sources: leave out null views, say why a real one fails
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]>
2026-11-26 17:08:48 +05:30
readmet3xt-labandClaude Opus 5.5 dfb76df595 Merge agent/textures: bake sources, exact refreshes without waiting, target reserve
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-26 16:51:20 +05:30