gpu: give section aliases stable backing generations and mapping leases #377
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA#377
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@krofty on GitHub · 2026-11-27 21:41 UTC · original
GPU ownership and selective publication require one stable identity for the bytes behind registered buffers, raw-address windows and mapped aliases. The current fork's in-place census keys physical pages by a reusable section handle and offset; it has no allocation incarnation or mapping epoch. Its mapping notification occurs after MapViewOfFile3 has exposed writable bytes. Those facts are insufficient to authorize suppressing eager hashes/readback safely.
Port the already-written canonical backing identity and generation primitives from Codex's shared-storage work (Snaacky/ztrx#249) to the current NVIDIA implementation, with tightly scoped mapping/allocation hooks. Do not port its old capture implementation or assume its observed versions prove GPU ownership.
Acceptance for this foundation stage:
Follow-up dependency, deliberately separate from this foundation: a before-exposure CPU ownership/materialization gate outside Physical/registry locks. MapViewOfFile3 currently exposes RW bytes before the post-map notification; that race must be closed before any GPU-owned page is admitted. Separate writable section aliases make protected publication possible, but metadata versions alone are insufficient.
This is the next working stage under Snaacky/ztrx#249 toward30FPS. The preceding launch-batching experiment (#335/#358) removed about90% of maintenance dispatches but did not improve FPS, so it stays off. Target the repeated scans/roundtrip architecture instead of further small launch tuning.
Claim: Codex/krofty. Fresh checks cover both repositories. Snaacky's assigned raw-pixel issue146 and fork PRs295,194,60,55,44 remain protected; no author branch changes or merges. PR55's physical-number allocation policy is outside this stage; only lifecycle identity/notification hooks are intended. PRs stay open and unmerged. No private game data or identifiers will be published.
@github-actions[bot] on GitHub · 2026-11-27 21:41 UTC · original
Please attach both logs from the run that went wrong. Without them we can only guess. Paste
%LOCALAPPDATA%into the address bar of File Explorer to get there.%LOCALAPPDATA%\victory\logs\: the newestvictory-nvidia-play-<date>-<time>-<number>.log(fromvictory.exe) orvictory-nvidia-<date>-<time>.log(from the script launcher). The window shows its path at the start, on the lineLog: ....%LOCALAPPDATA%\VIctory\data\7952987A\crashes.log, and, if there is one from that run, the newestvictory-<date>-<time>-<number>.crash.login%LOCALAPPDATA%\VIctory\data\7952987A\temp\.Also say which GPU, Windows version (10 or 11)
@krofty on GitHub · 2026-11-27 22:12 UTC · original
Implementation submitted as draft #408: #408
The isolated and exact integrated code passed26 identity tests,8 census tests,38 guard tests, real native CPU alias/store/reuse coverage, physical-window lifetime and retirement-reader exclusion. Both affected crates pass ordinary cargo check. Diagnostics build300 passed through build.sh.
Fixed-world runs321/322 with observed tracking off/on both closed normally with no reported errors. Last three host intervals:47.6/48.6/47.6ms off,47.0/46.3/48.3ms on. Pictures retain expected geometry. This is compatibility evidence, not an FPS improvement or completed-frame qualification; no readback is suppressed.
RELEASED source implementation ownership after submission. The dependent certified GPU-page ownership/selective-publication stage will use this canonical identity layer. PR408 remains open and unmerged; no30FPS claim.
@wildheathen on GitHub · 2026-11-28 00:26 UTC · original
Some measurements that may help the stage that builds on this (GPU-owned pages, publication left out). I tried the two in-place paths that are already in
mainand measured what a heap opened on title memory costs on a discrete card. RTX 5080 16 GB (driver 621.24), Ryzen 7 9800X3D, 32 GB, Windows 11;main64d4931; Series X, 1440p, DLSS Quality.In the game (same diagnostics build, the same 3-minute scripted run, texture room 50 %, no frame generation; medians in the world):
VICTORY_PORT_CONSTANTS=1(the 185 MB 32-bit heap in place)VICTORY_INPLACE=1(72 windows, 320 MB in place)No device removal, but the card becomes the limit (96 % and 84 % busy) and memory does not move beyond run-to-run noise.
Why, on the card alone (a compute shader doing the same loads and one store through a root UAV, best of three):
OpenExistingHeapFromAddress1, 64 MiB heapSo shaders read the PC's memory 60 to 90 times slower than the card's, in place or not, and a heap in place adds about 0.4-0.6 ms to every submission that uses it, whatever its size. The constants ring and the skinning output are what shaders read most, which is why moving them out of their copy in the card's memory costs so much.
What the openings themselves do on this driver (it differs from the notes at the top of
inplace.rs, which were taken on the software adapter):OpenExistingHeapFromAddress1takes a committed part of a view of ours of a section made reserved (asxmemmakes the pool), soSEC_COMMITis not needed for that path. It locks the part's pages at once (64 MiB: 15-18 ms, working set and shared GPU memory both +64 MB). Other views of the same pages can be written, made read-only and unmapped while the heap stands.OpenExistingHeapFromFileMappingon a committed section locks all of it at once (2 GiB: 112 ms, +2,048 MB working set and shared; 3 GiB: 359 ms) and refuses 4 GiB and 6 GiB (0x80070057), so the 6.09 GiB pool cannot be one heap.From a census of the copies alive in the world (152 s): of 112 M buffer views made, 108 were off their elements; the title made about 3,300-3,600 remap/unmap calls a second, 600-750 of them on pages under a live copy; write-watch askings for copies of windows and buffers took 197 ms a second against 1.7 ms a second for textures.
My reading: on a discrete card, title memory in place cannot replace the copies in the card's memory for anything shaders read a lot; the saving to look for is in finding what changed more cheaply. The two tests are small and I can put them in a PR if they are useful (
card_parts_of_a_reserved_sections_view_and_a_pool_sized_section,card_cost_of_shaders_on_memory_in_place, both ignored by default).@trustno1-coder on GitHub · 2026-11-28 00:44 UTC · original
Thanks @krofty and @wildheathen, noted. I'll look at #408 when I get back to pull requests.
@trustno1-coder on GitHub · 2026-11-29 19:51 UTC · original
Closing this one because it was reported on a build from before v2026.11.28.03 (more than 4 releases ago) and has had no activity since v2026.11.29.01. A lot has changed since then.
If it still happens on the latest release, please open a new issue with the play log and crashes.log from that run. Thanks for reporting!