DirectStorage: report page-destination writes where the pages are mapped (missing cell walls) #571
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork!571
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-571"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@arminkhaleghirod on GitHub · 2026-11-25 02:18 UTC · original
dstorage-page-writes→main· +131 −1 · 2 files · 1 commits · closed without mergingFixes the missing cell walls, ceiling and floor from #62, and black blocks on textures that stay for the whole run.
DirectStorage requests with
PAGE_DESTINATIONare written through our own view of the physical pages (write_physical/ the page window). Unlike plain-address requests, they never calledkernel_will_write. So the title's own addresses for those pages never saw the write: no guard fault, no write-watch entry, no remap of index-picked textures. When the title maps the pages before the stream lands, the host copy keeps its old bytes for the rest of the run.xmemkeeps an index from each section page to the title addresses it's mapped at (updated inmap/unmap).shown_atlooks them up.dstoragereports it at every one of those addresses, for both the buffered and the in-place window path.VICTORY_DSTORAGE_SHOWN=0turns it off.Credit: @Yorivel found this cause on #62 (branch
fix/dstorage-page-destinations-notify, cell drawn 3 of 3 on an RTX 4090). Upstream VIctory fixed the same thing inc75fdba, insidexmem::write_physical. Taking that instead is fine too.Tested on an RTX 4080 (Series X): before, about 3 runs in 4 had sky where the cell walls should be, plus persistent black blocks on clothing. With this the walls are drawn.
victory-hlexmem/dstorage tests pass (26, one new), and clippy adds nothing new.@ghost on GitHub · 2026-11-25 04:15 UTC · original
AI-assisted (Claude Code). Counts and observations only; no game data.
A data point from a 32-lane card: RTX 5080 16 GB, Windows 11, diag build, Series X profile,
VICTORY_SHADER_LOOP_LIMIT=256, warm caches, scripted Enter until 70 s, then no input. This PR merged ontomain(c96b4f2), nothing else.Cell walls, by launch
2119b0e-based (six launches from yesterday, several with #156)mainc96b4f2c96b4f2+ this PRSo the same picture as on the 4080 and 4090: sky where the walls should be in most launches before, walls in every launch that reached the room with this.
Two things I saw that I cannot tie to this PR either way
Frame time is unchanged (3.6-3.8 fps in the room).
@Speartone on GitHub · 2026-11-25 04:34 UTC · original
An independent port of c75fdba's page-write reporting (Marvisak/VIctory) looks the views up after the write and by slice, not by page number. That covers a view mapped while the pages are being filled, a page number freed meanwhile, and a write that fails half way. The first two are tested. I have not compared every detail with this PR.
Synthetic tests: victory-hle 97, victory-gpu 113 pass on an RTX 5080, with the switch on and off. Limit: a title write through one of two views of a page is seen at that view only. Actual GTA VI gameplay has not been tested.
AI-assisted (Claude Code, Claude Opus 5.5). No game data.
@ghost on GitHub · 2026-11-25 04:37 UTC · original
AI-assisted (Claude Code). Counts only.
A follow-up that may matter for where else these writes go unseen: with the copy-back settings from before
c96b4f2, the walls are missing again even with this PR.Same card and build as above (RTX 5080,
c96b4f2+ this PR), four more launches of 300 s withVICTORY_RELAY=0 VICTORY_WIDE_BACK=0 VICTORY_CARD_BUFFERS_MIN_MB=16 VICTORY_CARD_BUFFERS_MB=512 VICTORY_LATE_WAIT_LISTS=128:c96b4f2, with this PRI did not separate the five switches, so I cannot say which one it is. It reads to me as a second path by which the host copy keeps old bytes, one that the relay thread's copy-back happens to cover. With the defaults the PR does what it says here.
@yualk on GitHub · 2026-11-25 05:09 UTC · original
Independent same-binary check on exact
ec57c536c6, Windows MSVCdiag, RTX 5070 Ti and explicit WARP. An ownedPAGE_DESTINATION | MEMORY_SOURCEDirectStorage request wrote 1,024 bytes of a 64 KiB physical page. Both mapped CPU aliases saw the newa7bytes in both switch positions; their tails and a separate same-shaped page stayed unchanged.Two already-published indexed SRVs and the decoy warmed at
[35,35,69]. WithVICTORY_DSTORAGE_SHOWN=0, the fenced shader reads stayed[35,35,69]. Default consumed the notifications with no upload in the notice frame, then performed exactly two real uploads at the next eligible frame. A DXC cs_6_6ResourceDescriptorHeapLoad from the unchanged slots returned[a7,a7,69]on both adapters. Periodic hash rechecks were disabled. No republishing, replacement backing, comparison of the five copy-back switches, or title-world/FPS claim. Test used only authored data; no game assets attached.@Alm0stSurely on GitHub · 2026-11-26 06:34 UTC · original · edited 2026-11-26 06:45 UTC
I split out the card-buffer budget from the five copy-back settings above on an RTX 5080 / GE-Proton11-6, using a ZTRX-derived build with mapped-page write reporting. One run at each cap, same executable, shader-cache seed and menu inputs. The minimum buffer size stayed at 16 MiB, with card windows disabled.
The individual placement messages recorded the same ten buffer lengths in the same order. Both runs ended at the same title breakpoint with over 6 GiB of VRAM still free at the last active sample. Raising this cap alone did not change buffer placement on these runs. Neither run reached the cell, so this does not isolate what restored the walls on Windows.
I then held the cap at 1024 MiB and changed only the minimum eligible buffer size from 16 to 1 MiB. Successful placements went from 10 to 100. At the Written By credit, CPU comparisons of shader-written buffer copies fell from 447.9 to 26.6 MiB/frame. At Character Art they fell from 339.7 to 26.9 MiB/frame. These counters measure bytes compared on the CPU. Page-query time increased at both credits, from 1107 to 1420 ms/frame and from 911 to 1098 ms/frame respectively.
The 1 MiB run stopped during the opening credits. One run per setting, with the same credit visible but potentially different camera shots. We have no in-world FPS measurement for this comparison.
AI-assisted with OpenAI Codex (gpt-6.2-astra).
Pull request closed