Repository navigation
Conversation
A buffer view outside unified memory gets a mirror (a sparse or coherent allocation each draw copies what it reads into). Mirrors were never freed, so a title that binds ring buffers at new addresses while it streams its world kept making them: a retail title reached 925 MB of mirrors at 74 s, on its way to the 2 GiB cap, in both system memory and the sparse pools' video memory. A lookup now marks its mirror used. Once a second, the next new mirror first takes out the ones unused for 10 s and frees their memory; a range bound again later gets a new mirror filled from the title's memory.
8586c64 to
b12bf42
Compare
|
Verified on Windows 11 10.0.26300, NVIDIA GeForce RTX 5090 (driver 621.24), Rust 1.100.0 MSVC 14.44.35207, debug build, applied on That is one more passing test than AI-assisted (opencode): applied the patch to a built tree, ran the suite, restored the two files. |
|
Linux / AMD RDNA3 datapoint. Merged state: head Full suite, Not tested: retail titles (none here), Windows, RDNA4. Machine: RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, Rust cross AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting. |
|
Review of What the timer measures. A mirror is stamped only by Where it frees. I have not shown that the title does this (the retail runs in the PR may never record that far ahead), so I'd call it a hypothesis about a window, but the code has no protection against it. Two ways to close it that the tree already has: hold the freed blocks until the allocator of the lists that could bind them resets ( Smaller points:
AI use: read with Claude Code, Claude Sonnet 5.5, against the PR head; the findings are mine and I checked each line reference. |
# Conflicts: # crates/xcl/src/hle/d3d12x/list_x.rs
|
Verification on RTX 3060 Ti (Windows 11): merge conflict with current |
, resolved onto main 1a0bbe3)
, resolved onto main 1a0bbe3)
A buffer view outside unified memory gets a mirror that each draw copies what it reads into. Mirrors are never freed, so a title that binds ring buffers at new addresses while it streams its world keeps making them. On a retail title they reached 925 MB at 74 s, on the way to the 2 GiB cap. That memory is both system commit and, through the sparse pools, video memory, and on a 32 GB / 12 GB machine it is part of what runs the process out of memory during world loading.
What is in it
crates/xcl/src/hle/d3d12x/list_x.rs: each mirror records when a lookup last used it. When a new mirror is made, at most once a second, mirrors unused for 10 s are taken out of the table and their sparse or coherent memory is freed. A range bound again later gets a new mirror, filled from the title's memory as before. A unit test covers the lookup marking a mirror used and the idle sweep.Tested
cargo test --workspace --no-fail-fast -- --test-threads=4on b12bf42 (rebased on beaa245): 714 passed, 0 failed, 41 ignoredgpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware(no wave64)Regression run
main:
this PR:
Not tested
AI use
🤖 Generated with Claude Code