Memory line: tell dead render-target copies from held ones (#791) #803
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!803
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-803"
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?
@kibagami-nc on GitHub · 2026-11-28 06:21 UTC · original
kibagami-nc:diag/target-copies-census→main· +77 −5 · 2 files · 1 commits · merged 2026-11-28 19:39 UTCAdds the counters CuteBooty suggested in #791. They tell dead render-target host copies apart from the ones the title still holds, before any policy is picked.
Why
The host copies of textures the host renders to or writes are released only when the title releases its texture. The sweep never takes them, by design. On an RTX 3070 8 GB, they grew from about 197 MB to about 1.6 GB over a session, and late in the session interiors came up black (#791).
The census line can say how many there are and how big they are. It cannot say whether they are dead weight or targets the title holds, and that decides what a fix can do.
The change
Diagnostics only. Nothing changes outside the counts.
targets_censusalso counts, of the copies the host renders to or writes:TARGETS_ATalready holds the newest target at each address, andsupersededcompares against it.PLACED_TEXTURESones were asked.TARGET_TEXTUREScounts two things since the start: title textures the host renders to or writes that the title made, and those it released.The memory line prints the four numbers after the existing census. A line now ends like this:
(The figures here are an illustration, not a measurement.)
TARGETS_ATis copied before the textures' lock is taken, so the census never holds both locks together.How to read it, per #791:
Tests
resource::tests::a_target_with_a_newer_one_at_its_memory_is_superseded. It makes a target, then a second target at the first one's memory (create_at_address). The older one counts as superseded, the newer one does not, and another address does not. Both count as made, then as released.supersededalways answers no.cargo test -p victory-gpu --lib --locked: 454 passed. With--features diagnostics, theresourcetests pass (22).--all-features) shows nothing in the changed files. Main's own lints are in #665.Not run with the game here.
Checked by others
CuteBooty ran these counters on an RTX 3070 8 GB (Series S, DLSS performance), in one unattended run that stood still for 11 minutes after world entry. Read with the guide above:
A play session through new interiors is next on that card.
@Dukestar69 on GitHub · 2026-11-28 07:10 UTC · original · approved these changes
Tested locally merged onto
main(63b902f).cargo xtask policypassed (294 files ok).cargo test -p victory-gpu --lib resource::passed (21 passed; 0 failed).cargo test -p victory-gpu --features diagnostics --lib resource::passed (22 passed; 0 failed, including the newan_alias_source_is_held_after_the_title_releases_ittest).Clear diagnostic separation between superseded/dead copies and live held alias sources. LGTM.
Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
@CuteBooty on GitHub · 2026-11-28 09:25 UTC · original
I ran this in the game on an RTX 3070 8 GB (driver 621.24), a Ryzen 7 5800X3D, 32 GB and Windows 11 build 26200. The build was main
63b902feplus my local patches, with this PR applied as is (diagnostics feature). Settings: Series S, DLSS performance, no frame generation.Setup: four unattended 12-minute runs on the same save. Each loaded the save and then stood still. The run order was without, with, with, without this PR.
Result:
Every number of the two runs with the PR lies within, or below, the range of the two runs without it. These runs show no consistent increase that could be put down to the census. That is four runs standing still, not a measurement of a small cost.
What the new counters said is in #791 (#791). In short, standing still, the title holds its targets. Made minus released was flat at 1184, and only 4.6% of the copies' MB had a newer target at their memory. Not mapped was 0.
(Unattended standing-still runs without frame generation. Measurements and text prepared with my AI assistants, Claude Code and Codex. No game files.)