Bound the DXR cache of decoded meshlet indices #4579
No reviewers
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!4579
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-4578"
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?
@tyr0nsur on GitHub · 2026-11-30 23:07 UTC · original
tyr0nsur:codex/bound-dxr-meshlet-index-cache→main· +154 −13 · 1 files · 1 commits · closed without mergingRelated to #4315.
What it changes
The DXR meshlet path caches a committed upload buffer for each decoded index stream. Until the title frees the source address, cache entries can accumulate as the scene changes. The existing BLAS budget covers acceleration structures. These upload buffers are separate.
Bound the decoded index cache to 256 MiB of buffer allocation sizes, using the standard 64 KiB alignment for these committed buffers. At the limit, release the oldest entries from earlier frames and leave room for subsequent misses. A miss can still use its upload buffer for the recording when the cache is full of buffers used this frame. Hits update recency under the read lock. Skip caching a decode when the title freed memory since its lookup. Concurrent misses can share the winner's entry. A recording keeps its existing reference to the buffer and evicted entries are retired outside the cache lock.
Log the current cache count and bytes. The existing decoded-MB field is cumulative decode work and includes quant24 vertices as well as indices. #4315 shows budget pressure on a 5070 Ti, but its release log cannot identify this cache's live size or attribute the local VRAM growth to it.
How it was tested
cargo test -p victory-gpu --features diagnostics --locked --lib hwrt::tests:: -- --test-threads=1passed (21 tests). The staged asset-policy check passed.Checked for overlap
Developed with Codex and reviewed with Claude Opus 5.5.
8067b5451bto095040a7cd@TechnoStone on GitHub · 2026-11-30 23:53 UTC · original
Hi, this PR solves vram leakage with enabled DXR, but still game can crash after a short car/boat trip (without this commit it crashed as soon as leaving house/loading other save/starting new game)
9800X3D, 48 GB, 4070TiS
crashes.log
victory-nvidia-20261201-025054.log
@paales on GitHub · 2026-12-01 01:41 UTC · original
Written by 🤖:
Tested together with #4338, #4171 and #4144 on an RTX 5070 Ti 16 GB (#4338). No crash and no lost card in 6 runs with
VICTORY_HW_RT=1, 2 of them a save that ends on the boat (82 s). The meshlet index cache stays under its bound: at most 230 MB kept of 256 MB in the cutscene, 231 MB in the save. The cherry-pick onto #4338 conflicts in theHwRtManagerfields (shownbesideMeshletCache) and intitle_memory_freed; both sides stay.@tyr0nsur on GitHub · 2026-12-01 01:50 UTC · original
I checked TechnoStone's attached play log. The 15 meshlet-cache samples peak at 231 MiB of the 256 MiB cap. The last sample reports 190 MiB, about 2.3 s before the relay reports device removal (
0x887A0005). The closest DXGI sample, 82 ms before that error, reads 12,819 MiB local use against a 14,621 MiB budget. The log shows the cap holding through the sampled interval, with the run still ending in device loss.#4338 is relevant to that remaining failure. The six successful runs above tested it in a stack with other changes. The useful follow-up for this 4070 Ti SUPER report would be the same save and settings with this cache PR in both runs and only #4338 added in the second.
@trustno1-coder on GitHub · 2026-12-01 18:37 UTC · original
Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.
Pull request closed