VICTORY_TEXTURE_BACK=1 makes a new committed read-back buffer for every copy-back (~966,000 in 21 min); on Linux/NVIDIA that churn runs the driver out of DMA mappings #1340
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#1340
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?
@anon31-006459 on GitHub · 2026-11-26 17:09 UTC · original
Setup: Linux (Pop!_OS 24.04, kernel 7.2.15), RTX 3070 Ti 8 GB, NVIDIA 595.104.02 (open kernel module), Ryzen 7 3700X, 32 GB RAM, Proton Experimental 11.0-20261112. Fork main
ac25549+ the #1820 recipe +TEXTURE_BACK=1, Series S.What happens:
texback::recordcallshost.read_back_buffer(total)(aCreateCommittedResourceon a read-back heap) for every copy-back, and the buffer is released afterland(). In a 21-minute session in the prison (run 16), the log's counter reachedtexture readback landed copied=965888. During such sessions the kernel logsNVRM: intermapRegisterDmaMapping: Failed to insert new mapping nodeandgpu_vaspace.casserts, followed byXid 31(MMU fault,FAULT_PDE) and0x887A0005(runs 15 and 16).Caveat: in an overnight run with
TEXTURE_BACK=0the mapping errors still came once the PC's free memory ran low (first at 3.4 GB free, 31 of them at 0.4 GB). So the churn is a contributor, not the only cause. The same insert failures are a known bug of NVIDIA's open kernel module (VIctory #844, NVIDIA/open-gpu-kernel-modules#1540).Suggested fix (have a patch, ~90 lines in
texback.rs): keep read-back buffers of up to 16 MiB by power-of-two size, as the staging pool does, and give one back only after itsland()ran (the list that wrote it has run).VICTORY_READBACK_POOL=0gives the old behaviour, andVICTORY_READBACK_POOL_MBcaps what is kept (256). It builds and the texback, shadow and plaincopy unit tests pass under Wine. In the game: run 17 (with this and a free-memory-driven idle-list cap) held the PC's memory shared with the card flat at about 6 GB with no mapping errors. It still ended about 6 minutes into the world on anXid 31read fault with no insert failures before it, so there is a separate fault too. Happy to open a PR if wanted.AI-assisted (Claude Code, Claude Opus 5.5); numbers from runs on my machine. No game data.
@rafaconvaitis on GitHub · 2026-11-26 17:25 UTC · original
I found the same automatic readback path in Cool Fox
c3e5c37on Windows, RTX 4070 12 GB. The 25-minute Series S boat run loggedcopied=187392intexback::landand reached both package markers with no device removal. The counter is for successful landings. In Cool Fox,list::detachanddetach_partscan append the same recorded list more than once, andread_backsvisits each reference. Separate counters for new resources, pool hits and landings would make the allocation comparison more precise.A lifetime case worth covering in the proposed PR is repeat execution of the same closed list. The recorded copy destination should stay leased until its final in-flight use and list reset or retirement. Marvisak/VIctory#2818 is a useful comparison for the explicit readback path, which ties reuse to list reset.
@rafaconvaitis on GitHub · 2026-11-26 18:06 UTC · original
The fenced automatic-readback pool is now available as a Cool Fox backport. The focused test passes on Windows/WARP and RTX 4070. It executes the same closed D3D12 recording twice, checks a different recording's texel as well, and verifies reuse only after the original list resets. https://github.com/DoubleGhosty/cool_fox/pull/27
With the pool enabled at a 128 MiB idle cap, one Series S Windows integration run reached 9,600 completed readbacks. Its separate counters showed 51 successful new resources, 9,550 reuses, zero allocation failures, and a peak idle buffer width of 14.5 MiB. That verifies reuse on this Windows run. A matched pool-off run and the Linux failure case still need separate validation.