Repository navigation
Conversation
Credit crossducking/RAZDA4A-XEN 76b58130, vix0e0e/VIctory-LITE e66dcc25 and advantyx/VIctyx 7f5497c8. Preserve fallback dirty uploads through retirement and cover them with a GPU readback test.
|
On a 16 GB PC this PR fixes the shared-memory crash we get with the RT structure builder on. Setup. RTX 4070 Ti SUPER 16 GB, Ryzen 7 9800X3D, 16 GB RAM, Windows 11 build 26300. Native 1440p, Without it. Each run of this base died at 2-10 min. Shared GPU memory reached 6.5-7.4 GB of 7224, then either a command list close failed with 0x8007000E or the device was removed. Settings tried without this PR, all with the builder on:
With
Commit. It stays at 32-34 GB (it includes the card's 14 GB) with 0.3-0.5 GB of RAM free. The mirrors still use RAM, but Windows can now trim them instead of failing at the shared cap. Suggestion. Consider turning this on by default on |
|
The 10-minute pair finished, with captures: same base,
|
|
Test report for #1823 (head 6b85f68), merged Setup: RTX 3070 8 GB, driver 616.56, Windows 11 (10.0.26100), rustc 1.98.1. WARP runs use
Negative control: in
So the test catches a fallback that does not send the CPU's bytes. It also shows that only the two dirty ranges are
Both runs of each setting gave the same bytes. The increase with the switch off and the zero increase with it on
The extra passed test is the upcheck test; the extra ignored one is the measurement. The suites ran with my Not tested: the effect in a title. Tested with the help of Claude Code (Claude Opus 5.5). |
|
Linux/Wine follow-through on the RTX 4060 Laptop 8 GiB / 16 GiB host: I backported the private-mirror mechanism from Three isolated checks pass on physical NVIDIA hardware, Wine 11 / Linux 6.17 / NVIDIA 590.48.1 / stock assertion-enabled vkd3d-proton
A guarded title observation at 2026-11-29 02:47:08 UTC reached an actual captured cutscene with characters, geometry and colour. The capture remains local. Logical private mirrors reached about 1004 MiB; this is not residency. All 320 independent persistent-NVML memory queries completed, with max native query time 451 ms, and the original nvidia-smi safety guard remained active. The run stopped on global GPU use 6005 MiB at317.53 s, not a telemetry timeout or title crash. Kernel interval had no entries; no cgroup OOM. Minimum available RAM3737.7 MiB, scope peak9216 MiB with452 cap events. Earlier configurations did encounter telemetry deadlines; different input/cache/progress conditions prohibit claiming this patch alone fixed them. Performance is still poor: eight high-draw host reports had median2.25 FPS/460.1 ms per frame, with253 ms preparing and164.35 ms copying/refreshing101.15 MB. These are overlapping host counters, not GPU timestamps or a matched A/B. Scene-aligned I/O-full pressure remained roughly18–19%; controllable gameplay, native30 FPS and long-run stability are unverified. Useful implementation detail: this older fork already used CPU WRITE_BACK for shared buffers, so I am not attributing a CPU cache-mode speedup to VirtualAlloc. The current benefit under investigation is ownership/pageability and reduced driver-managed host memory, not disappearance of the mirror bytes. Our next controlled setting is the existing80% texture-admission line, with unchanged resolution, rendering exclusions, native-import prohibition and all safety limits. |
Fixes #1815
What it changes
VICTORY_CARD_CPU_HEAP=1gives the CPU mirror of a two-sided buffer ordinary pageable Windows memory. The GPU reads the submission’s immutable upload. Single-sided buffers,VICTORY_SEND_OWN=0, and the GPU upload checker retain their shared D3D12 resources. The switch defaults off. If the packed upload cannot be allocated, the fallback snapshots each affected shadow’s dirty ranges and retains those uploads through GPU retirement.The original design is crossducking’s RAZDA4A-XEN 76b58130, carried by vix0e0e in VIctory-LITE e66dcc25 and adapted by advantyx in VIctyx 7f5497c8. This port adds the fallback and a byte-exact GPU readback regression test.
How it was tested
RTX 5070 12 GB, Windows 11, driver 621.40. The isolated test uses only the GPU library and synthetic data. It allocates eight persistent 32 MiB CPU mirrors, writes every byte, verifies a sentinel in each, and samples the process's DXGI nonlocal usage before allocation and while the mirrors are live. It checks the private-byte accounting again after release. Each measurement runs in a fresh process.
VICTORY_CARD_CPU_HEAPBoth orders (off/on, on/off) gave identical byte counts. With the switch on, Windows accounts for the mirror as ordinary process memory. The table measures DXGI accounting only.
Gameplay context. In the earlier paired comparison on upstream
d4b5d517, both arms used the same 512 MiB upload segmentation. On Series S, 720p scene, DLSS Quality to 1080p, 2× DLSS FG and RT off, DXGI nonlocal usage at the engine's 240-FG-present checkpoint measured 6,540 MiB before and 4,572 MiB after. The two-minute settled samples averaged 26.52 and 27.04 base FPS at 4,172 and 4,131 draws/frame respectively. The evidence supports a shared-memory reduction; FPS remains inconclusive. The separate gameplay A/B on this exact branch stopped during the control run and produced no valid pair.Reproduce the standalone measurement in PowerShell:
cargo test --locked -p victory-gpupassed (551 passed, 44 ignored). The suite includes a GPU readback of two partial dirty ranges with sentinel bytes between them and a CPU source changed before submission. The ignored DXGI measurement above was explicitly run four times.victory-shader/src/emit/lower.rs(unusedcolour, manual checked division). The workspace test run reached the repository policy test, which rejects that same existing file at 667,523 bytes against a 655,360-byte limit.Checked for overlap
shadow.rs,host.rs,host/send.rs,host/upcheck.rs), and checked the triage map in Triage map of the open pull requests (main 63b902fe, 2026-11-28) #1138. GPU upload staging: reuse retired buffers before allocating a >1 GB submission snapshot #1383, GPU: reuse retired upload buffers for oversized submissions #1390 and GPU: reuse retired staging buffers for oversized uploads #1391 concern oversized per-submission upload allocations. This PR changes who owns the persistent CPU-side copy.