Repository navigation
Conversation
The pool's 64 MB blocks held ~1 GB of holes on an RTX 5060 8 GB: out of VRAM from 1:51, DLSS failing, device lost at 8:25 (trustno1-coder#597). Pool off on the same PC: no out of VRAM, no crash, world fps median 15.5 -> 17.8. `victory play` sets VICTORY_TEXTURE_POOL=0 when the playing card (hardware_adapter) has 8 GB of its own or less, before the F1 menu's and --set's switches, which still win. play-foxhound.ps1 does the same from the display adapters' registry memory. pool.rs is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 316c8b8cdc4f05483da4fde9067a58537851c749) (cherry picked from commit aa36a0a91f65c00d3d519d0eecd6b9e42a4dc342)
…tors at normal As a number (1) the value was also given by cores::ask to the eight list translators, level with the submitting thread; helpers_raised's doc and its i5-12400F measurement want them below the helpers. A user's value still wins. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 8c3b3ccf8f897265ed8c14cb7bc73642f5fee503)
…BMIT=1, off by default) A submission waits some ten deep in the VICTORY_ASYNC_SUBMIT line before the submitting thread prepares it, and refreshing the copies its lists read was the largest part of that preparing (14.7 ms a frame in the world, 41 ms in a new area; docs/refresh-ahead-study.md). With the switch a thread of ours, victory-refresh-ahead, takes each submission once its lists are translated and refreshes its copies up to the first step that writes title memory. The submission still asks and refreshes as before, and finds those pages taken. Phase 1 takes only copies on the CPU's side, write-watched or guarded, never written by shaders, with no range shaders may be writing. Safety: - The line claims a submission just before it unfolds it (where its host lists are taken out of our lists), outside the line's lock. The thread then leaves it alone, and the line waits for it to stop if it is working on it. Until then the recordings it holds keep our lists and their host lists. - A copy's new `refreshing` lock is held by Shadow::update and by Shadow::gpu_writes (where a copy becomes one shaders write). The thread try-locks it and checks the copy again under it. - The thread never takes jobs from the shared helper pool (shadow::alone), so it cannot wait for a job that waits for the lock it holds. Without the switch no lock is taken and nothing is posted. One line per frame says what was refreshed, found unchanged, left to the submission, and how many submissions the line reached first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 41c4aa3751ff00d4391d1cd0d5e8974bddf3e729) (cherry picked from commit e6bb19a0bbae29bb816e7a69c4b8d854f80b7494)
…CPU's own copy Guarded view memory is left to the submission. The submitting thread opens a block's guards before it copies into title memory there, and a refresh beside it could guard the block again in between and never hear of that copy. The kernel's dirty bits see every write made in the CPU, so the switch also needs VICTORY_SAFE_COPY (on by default), not the kernel's own copy. Also fixes the frame line's text. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 0c5bc93936ffda1f9ed942644b279122f6d2de6d) (cherry picked from commit 95ec197047966c1f503bf1d7c2f903fb8aefa3d3)
…y too, and why copies are left out Play log 20261128-230735: in a scene change the thread refreshing at the title's submit took 70-130 copies a frame out of some 5,000. It left the rest to the submission because they are copies in the card's memory (3,755 of them). The submission's own refreshes already run on the kept threads (5,000-10,000 a frame "on several threads"). - VICTORY_REFRESH_THREADS=<n> (2 to 8; 1 by default, as before): a submission's copies are spread over n threads of this module's own. The threads never take the shared pool's jobs (shadow::alone), and the line's claim still waits until none of them is at the submission. - VICTORY_REFRESH_AT_SUBMIT=2: copies in the card's memory too. Their CPU side is brought up to date, and what changed is noted to go up from the submission (Host::card_before), as the submission's refresh does. A copy is left to the submission if it has its bytes from before (compared on the card, declared or looked at through views picked by index) or was ever landed in, or if VICTORY_UPCHECK is on. - The `refreshing` lock is now also taken by Shadow::writing (ranges shaders may be writing, declared also through picked views without gpu_writes) and by card_make_before. The check under the lock thus sees every way a copy becomes one the card writes. - The frame line splits what is left out (written by shaders, in the card's memory, guarded views, not write-watched, busy) and the time (walking the steps, looking whether anything is new, refreshing, the longest refresh). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 3c8b9f7ce4708370d3a9abb39481dba3d2cc02f2)
…refreshes at submit took it Play log 20261128-232925 had two copies stale three refreshes in a row (loose windows of 4 MB, on_the_card=false). Nothing in the line said whether the refresh at the title's submit had touched them. The line now gives: - the copy's watch state: 1 the kernel's write watch, 2 none, 3 guarded; - how many refreshes at the title's submit took it so far; - whether the refresh that found it stale was one; - and the thread it ran on. Phase 1 takes only kernel-watched copies (watched=1), so watched=3 or ahead_refreshes=0 clears it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 32bba05e3ead1fa38423025c4700712b5dea4096)
…memory not waited for, wider refreshes at submit
Four switches, all off by default:
- VICTORY_BURY_ASIDE=1: what finished submissions held is let go of on a
thread of its own (victory-bury). At 00:02:08 and 00:02:50 the relay spent
590-980 ms a frame in "the rest" of its landing, which is bury() and the
message queue, while the card was 5-9% busy. The submitting thread waited
470 and 835 ms for that landing ("waiting for flights"). The landing line
now gives bury's share of "the rest".
- VICTORY_WAIT_RESIDENT_UPLOADS=0: upload-heap buffers are made resident with
their creation, not made resident and waited for. The wait is for slots of
our descriptor heaps that lists sent earlier may read; no slot shows upload
memory. A new line per frame gives the waits for new memory (made resident,
mapped) by the thread that waited: submitting thread, list translators,
relay, helpers, others of ours, the title's.
- VICTORY_REFRESH_WHOLE=1: the refreshes at the title's submit walk all of a
submission's steps, not up to the first that writes title memory. Those
steps run after the line's claim, and the kernel's dirty bits, the guards'
faults or the journal see what they write, so the submission copies those
pages again. At 23:56:40 the walk saw some 860 of 10,273 refreshes.
- VICTORY_REFRESH_GUARDED=1: guarded view memory too. A write of ours there
after a refresh guarded the block again faults into the guards' handler,
which comes first also inside safecopy, notes the block and lets the copy
go on.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit b4d55b7b47437ff73c9b8fd233dc5c96a1da230d)
…s play-foxhound.ps1 does victory.exe play now sets VICTORY_WINDOW_KB=1024 VICTORY_WINDOW_TAILS=1 when the PC has 16.5 GB of physical memory or less, unless the menu or --set names them. On a 16 GB PC with an RTX 5060 8 GB the game committed 17 to 18 GB and paged up to 270,000 times a second. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…en 5 9600X, 16 GB) scripts/bench.py compares play logs side by side; scripts/bench-run.ps1 plays the same start once per variant; scripts/mem-watch.ps1 samples victory.exe's memory every 5 s. The docs hold the test plan, the runs A to G, the study of refreshes at submit and the threads census on 6 cores. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…copy moved, and where refreshes go Play log 20261129-103901: one copy stale three refreshes in a row, refreshed by victory-refresh-ahead-3. It was a 4 MB window of title memory outside buffers, kernel-watched, at 0x98bc00000. Its block 0x98beb0000 is the one found stale in play log 20261128-232925 too, where the refresh at submit was phase 1 only (no VICTORY_REFRESH_WHOLE). All three copies found stale so far are such windows. Nothing in the journal's paths explains it. - The refreshes at the title's submit leave windows outside buffers to the submission (VICTORY_REFRESH_WINDOWS=1 takes them as before), counted on their line. - The stale warning says whether it is the same copy each time, and whether the copy or title memory moved since the last refresh that found the block so. If the copy moved, something other than a refresh wrote it (the card, in place or through an undeclared view). If title memory moved, a write went unnoticed. - A frame line gives the submission's refreshes on all threads: copies looked at for something new and the time of it, against copies refreshed and theirs. In this log the latter look like most of the 19 ms (some 940 copies, 34.6 MB a frame), not the 8,000 checks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The frame line's "dropped without a host pipeline" counts every draw, mesh dispatch and dispatch not run on the host, whatever stopped it: in a new area (run 20261128-235457) 2,300 to 2,900 a frame with no pipeline being made. Each failure point now notes its cause on its thread and the drop counts under it: no pipeline bound, left out, being made, a shader that does not translate, refused by the host, another kind, binding, no free slot for a root view, index buffer without a host copy, the ray-tracing builder off, other. Always on: one thread-local write per prepared draw, one atomic add per dropped one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…issing without it, the binding failures Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…NVIDIA, compacted sizes answered) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
For the memory line (paging in play log 20261129-110820: 18 GB private on 16 GB of RAM). live_bytes() gives the copies alive and their bytes in the PC's memory and on the card. Of each it gives what only serves to compare: snapshots in use (a new counter, SNAPSHOT_BYTES) and the snapshot buffers kept for reuse, and on the card the pieces' hashes. The refreshes' frame line says them too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… gaps a lost line break left Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…is unwritten The pass over textures picked by index spent 959 ms of a 5-second line (23:54 run of 2026-11-28, RTX 5060 8 GB, on a list-translating thread) reading whole textures and hashing them to learn that the host copy holds them still. When the bytes are found the same, the write-watch asking made before the read is kept with what the host copy held (texture, first level, hash, memory, bytes). Later, while no page of that memory is noted written after that asking, the answer is "same" without a read. Memory the watch does not know (writes() None: views) is read and hashed as before, and so is any copy whose level, hash or memory changed. (Run 2026-11-29 10:39: the part fell to 0-200 ms a 5-second line.) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…MARGIN_MB, off by default), idle textures make way, 5-second line of the card's use On an RTX 5060 8 GB with frame generation the 80 % line leaves frame generation's memory free a second time once it runs (2026-11-28 23:07: 5,106 MB in use against a line of 4,970 MB, textures waiting in 79 of 88 records). VICTORY_TEXTURE_ROOM_MARGIN_MB=N, from the first frame frame generation shows on: the line is max(the line without it, budget - N), and the idle sweep lets textures idle 5 s go down to 5 % under the line so that the room goes to those the title asks for now (1.5 s only within N/4 of the budget). A share that moved with frame generation lost the device (23:29 run); the margin does not move. Beside the room line every 5 s: the card's use split into host textures (the title's, others), card copies of title buffers and the rest; how many copies the sweep let go were made again within 10 s; and how many of texture::unchanged's answers came from the write watch. (c9c5354 already lets the render-target reserve go on 8 GB cards: VICTORY_CARD_ROOM_FOR_TARGETS_MB is no longer needed.) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ults, the PC's commit, the card's two groups, what the title asked) Run 2026-11-29 11:08 committed 18 GB privately on a 16 GB PC. A second line after procmem's: sections shared (the title's physical pages), the private working set, page faults a second, the PC's commit and free memory, the card's memory in use and the PC's memory the card uses (D3D12 resources count in the private bytes wherever they are), and what the title asked of XMemVirtualAlloc since the start: committed, placeholders (16,594 MB in 256 calls and 16,384 MB in one were these, no commit of their own), other reservations. A marked place for shadow::live_bytes() once the refresh port brings it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ry lines Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Test on this branch (v2026.11.29.01 + this PR): run H, 12 min 17, closed normally. RTX 5060 8 GB, Ryzen 5 9600X, 16 GB of RAM. What the player saw
What the log says (
Next
|
The frame line now says "dropped N draws or dispatches" and the room's budget gains "; ... after face headroom, ... in texture copies": the old patterns matched 1 of H's 98 world lines and none of its 135 room lines. Both formats are read, with a self-test line of each; "memory now: committed" lines give a committed-memory maximum where they exist. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…dex let go docs/textures-h-cause.md: the pass over textures picked by index stops at its time every run (VICTORY_TEXSPK_PASS_MS=8) with 12,780 slots due, slots looked at before are served ahead of sampled ones, and slot eviction let go of 0 textures in 12 minutes (all picked by index, SAMPLED_EVICT=0) while ~930 MB were marked by no shader. Both off by default: - VICTORY_DUE_HOT_FIRST=1: slots a shader sampled lately go before those looked at before (Due::ordered_by, tested). - VICTORY_COLD_EVICT_S=<s> (10-110): slot eviction trusts the marks as SAMPLED_EVICT does, but only for textures unmarked that long. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
I ran the requested Memory attributes with DLSS Frame Generation 2×I was stuck in one place at about 0.2 FPS for just over five minutes. I closed the game normally and attached all 17
Class 2 accounted for about 71% of the host-copy bytes at exit and recorded substantial writes after upload, even in this stationary sample. Follow-up with Frame Generation offI ran the same executable again. The only effective settings changes were
With FG on, the recurring five-second queue waits began just after DLSS FG activated. Streamline’s actual Present call took about 0.4 ms. With FG off, the longest reported queue wait in the matched window was 482 ms. This was one run per setting, with different draw counts. Disabling FG removed the recurring five-second stall in this comparison, while private memory remained high. The underlying queue dependency is still unclear. AI-assisted with Codex. |
|
Thanks a lot @DrDarkDK for the run and the careful write-up, including the FG on/off comparison. Here is the same test on the author's PC, for a second data point.
The other 11 classes hold no host copies (class 1 is 16.7 GB live, class 12 is 4.0 GB). What both runs say:
On the FG stall at 0.2 fps: frame generation works on this 5060 (about 20 generated frames/s in run K), so your Series X / |
…(VICTORY_MEM_ATTRS=1, off) Two runs at 7742762 (an RTX 4070 Ti 32 GB and the author's RTX 5060 16 GB) put 71-79 % of host copies under one 16 GB PAGE_NOACCESS | PAGE_GRAPHICS_NOACCESS placeholder. Pages XMemMapPhysicalPages maps there take the reservation's protection (GDKX docs), so the title sets the real one later: the title's VirtualProtect now repaints its range under a class of its own. XMemAlloc keys keep the object type when the allocator is Direct3D's (id 128), to tell static resources from dynamic, staging and tiled ones. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Pushed e0b7a85: the memory-attribute counter now sees what the big placeholder really holds ( Following the two runs above:
Tests: Same request as before, now on e0b7a85: play at least 5 minutes in the world with your usual switches plus |
|
| class | live | refreshed | refreshed ÷ live |
|---|---|---|---|
| 7 | 185 MB | 112,010 MB | 605× |
| 4 | 1277 MB | 24,853 MB | 19× |
| 18 | 1632 MB | 12,986 MB | 8× |
| 3 | 1614 MB | 2,015 MB | 1.2× |
| 0 and the rest | 197 MB | 105 MB | — |
class 7 alone is 73% of everything refreshed on the submitting thread, on 185 MB
of memory — a 605× amplification. It is protect 0x1 with 4K pages and the 32-bit
flag, so it is not one of the write-combined classes and it does not fit the shape
you were looking for: the CPU writes 112 GB into it. Something about a small
4K-page 32-bit block is costing as much refresh as everything else together. I do
not know what it holds; that is the question I would ask next.
Your "large host copies, almost nothing written" shape is class 0, not the
write-combined ones: 92 MB of host copies, 80 MB uploaded once, 24.5 MB written
after — but 104.6 MB refreshed, so it is being refreshed more than it is written.
At 92 MB it is not where the time goes.
The write-combined classes are hot. class 4 writes 24,636 MB after upload and
class 18 writes 12,695 MB, so neither can skip watching on this title. Their host
copies (216 MB and 290 MB) are also far smaller than their live bytes (1277 MB and
1632 MB) — most of what they hold is never copied at all.
The five classes that read all zeros hold 185 MB between them (9, 15, 5, 14, 13,
plus 11, 16, 6, 17 below them). All are XMemAlloc with 2, 4, 16, 2 and 3
allocations respectively — so few, and possibly late in the run, that a zero here
may mean "not touched" rather than "never needs watching". Together they are 0.3%
of the refreshed bytes.
The rest of the frame, for context
From the same log, so you can compare against your 16 GB run:
the texture queue's room: 6169 MB in use - 0 MB free in texture blocks
+ 144 MB kept for card copies + ... against a line of ...
textures picked by index: 25708 slots, 20522 of them due
the pass over textures picked by index, in the last 5 seconds: 1172 ms in all
the texture queue's lock in the last 5 seconds: taken 50826 times
textures with levels on demand: 1172 alive, 57 MB of the card given to 633 levels
11 fps, 87.3 ms/frame, 5834 draws/frame (one window, not a median)
the pass over textures picked by index: 1172 ms in the last 5 seconds — a
fifth of the wall clock spent in the texture pass, with 20,522 of 25,708 slots due
and 0 MB free in the blocks. That matches the queue pressure you and I both see on
8 GB.
Limits
One run, one scene, my own switches. The block above is a mid-run 5 s window and
not an exit block, so the byte figures are what moved in those five seconds, not
what moved over the whole run — the class 7 amplification in particular would be
worth confirming against an exit total. I did not run with frame generation off,
so I cannot separate its share. The frame line in the excerpt is one window's
figure, not a median.
|
I added an opt-in loading screen for the first 3D scene in 36c6eba. Enable it with In a local RTX 5060 8 GB / 16 GB RAM trial on the The two targeted tests and the staged asset policy passed on the PR branch. The setup and results are in the test notes. |
|
37bce66 uses the GDKX sampler-feedback model to prioritize indexed textures that shaders sampled recently. When the regular texture pass hits its VRAM budget, these slots move ahead of background checks. Rechecks keep their fingerprints and the existing VRAM, RAM and per-pass limits still apply. Set The release built and 73 descriptor tests passed. Both local sessions reached gameplay and closed normally. In the matched 45-second opening-scene windows on RTX 5060 8 GB, warnings about textures changing after upload went from 4 to 0 and skipped prelude uploads from 1 to 0. Median rendered FPS was 5.6 vs 8.1, and median buffer-copy time was 80.4 vs 60.8 ms/frame. Both windows had eight queue samples blocked by the VRAM budget. This was one run per build with different scene timing and draw counts. It does not establish a causal FPS improvement or confirm that all visual texture problems are resolved. The settings, method and limitations are in the test notes. |
…view over a copied texture, GDKX contracts Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/placed-view-hero-lead.md: the two "HERO LEAD" lines of the run of 2026-11-30 00:29 were other textures in reused memory (a BC6H cubemap at a BC7 texture's start, a BC1 texture inside a BC3 one): filling them from the copied texture would show its texels in another format. The 30 "changed after its upload" were the title writing texture memory, which VICTORY_PAINTED_EVERY already covers. VICTORY_HOST_WRITTEN_REUSE=1 (off by default): such a view makes the copied texture's address forgotten, so that a later view laid out as it was reads its own memory and not the old copy (host_written_like). The line for reuse is said apart from HERO LEAD. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…missed copy Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
A/B of RTX 5060 8 GB, Ryzen 5 9600X, 16 GB of RAM. One binary built from 45 s window from the first 5 s line with at least 2,000 draws (
What this says, and what it does not:
Over the whole of run 1, two "HERO LEAD" lines turned out to be memory reused by another texture (a 6-face BC6H cube map at the start of a 1-face BC7, and BC1 blocks inside a BC3), not a GPU copy the view missed. Filling those views from title memory is right. The real risk is a later view with the old layout at the same address being sent back to the old copy. A fix, Next run on the same binary: |
|
Same binary, same reference cache and save, same preset as the A/B above, plus Why it was off. What the log shows with the switch:
Limits. One run of 2 min 29 with 60 s in the world. The 45 s window starts at world entry, where streaming dominates, and does not show the gain yet; the steady-state lines above do. The camera was still, and the runs it is compared with were played by hand. A longer unattended pair (with and without, same start) comes next. What to watch. The buffer now has one home, the title's memory, but our CPU steps at submit read from it (9,799 constant-buffer fills a frame, 3.3 MB, and 6 buffer copies) without waiting for submissions still in flight, and buffer views that are not on an element of the buffer's host copy still get exact copies of their own. Neither showed up as a stale copy in this run. If they do, a targeted fix is written ( Edited: do not turn this on. A longer pair (next comment) shows the GPU time going from 3 to 50 ms a frame and the median frame rate halving, because the shaders then read this heap from the PC's RAM. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Correction to the comment above: I ran a longer unattended pair on the same 37bce66 binary: same reference cache and save, Enter sent from 10 s until the title left its waiting screen, 180 s with the camera still in the world, closed by its window (
What it does show is where the CPU cost goes: about three quarters of the steady-state copy time is this one heap. The next step is to keep the shaders reading VRAM and take only the copy work off the CPU: the in-place heap stays as a source, and the bytes the title wrote since the last submission are carried into the card copy by the GPU's copy engine ( |
…ad the heap from system RAM) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… another texture takes its memory (VICTORY_HOST_WRITTEN_REUSE=1, off) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ate lows (p10 6.5 -> 16.7 fps) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Pushed 504d07a (fast-forward from 37bce66): one texture fix off by default, and the write-up of tonight's measurements
The steady-state lows rise sharply, which means far fewer long frames. World entry is no better in this single pair. The rise of late texture changes from 5 to 150 is not explained yet: it could be more frames uploading more, or uploads ordered against refreshes that now run beside. It needs checking before this switch can be recommended, so please treat it as experimental. If you try it, the Also from tonight, all in the doc: the |
Fixes #597.
Changes
Tests on RTX 5060 8 GB, Ryzen 5 9600X and 16 GB RAM
Over the first 7 min 31 s of runs H and I on v2026.11.29.01, median FPS was 12.3 with this PR and 10.3 with the stock release. Submit-thread time was 94.5 versus 120.1 ms per frame. Each configuration was played once and the routes were similar. Run J, with 4 MiB copy windows, produced 12 stale-copy warnings and one DLSS VRAM warning.
git diff --checkpassed. The repository-wide asset policy flags an existing sequence of hexadecimal literals incrates/victory-loader/src/heap_sites/frame_users.rs. That file is identical on the base.