FG snapshots: a host list gives its kept input snapshots back on reset (#1978 follow-up) #4298
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!4298
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-4297"
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?
@CubeB on GitHub · 2026-11-30 18:20 UTC · original
CubeB:pr/fg-snapshot-release-main→main· +4 −0 · 1 files · 1 commits · closed without mergingFollow-up to #1978, merged today (2026-11-30 14:12Z).
What is wrong
Deferred::clear()(crates/victory-gpu/src/host.rs) resets every per-list record exceptfg_snapshots.HostList::keep_fg_snapshotpushes anArc<FgSnapshot>for each frame-generation input snapshot a list writes, and pooled host lists are reset and reused, not dropped, so each list keeps every snapshot it was ever given.With
VICTORY_FRAMEGEN_SNAPSHOT=1the snapshot pool then runs dry about 30 s into a run: the log showsall input snapshots are in flightand the fallback to unsnapshotted inputs on nearly every frame (so_far=32768in a 30-minute run), so the setting stops doing anything after start-up. I reported this on #1978 earlier and opened the same fix against its branch (SkivHisink/VIctory-NVIDIA#1); #1978 has been merged since, so this is the fix againstmain.Fix
One line in
Deferred::clear():self.fg_snapshots.clear();besideself.kept.clear().HostList::resetruns only after the list's last submission has finished, and the present path holds its own clone, so the GPU is done with the snapshot when the list lets go of it.Testing
cargo build --release --locked -p victoryandcargo test -p victory-gpu --lib -- --test-threads=1pass there, and a 70-minute play session on an RTX 5070 Ti ran without a crash with it in the build; frame generation was loaded but stayed off in that session, so the fix itself has not been exercised in play yet.main+ this commit) I have not built it; the change is the four lines shown.no input snapshot free/all input snapshots are in flightlines stop after start-up.🤖 Generated with Claude Code
Deferred::clear() reset every per-list record except fg_snapshots, so a pooled host list held each Arc<FgSnapshot> pushed by keep_fg_snapshot for as long as the list lived. The pool ran dry about 30 s into a run ("all input snapshots are in flight"), and VICTORY_FRAMEGEN_SNAPSHOT=1 stopped doing anything after start-up. HostList::reset runs only after the list's last submission finished, and the present path holds its own clone, so the release is safe there. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01JzsiBtxAuHxjYfCpTzVV3h@tyr0nsur on GitHub · 2026-11-30 18:41 UTC · original
I checked the reset path with a synthetic D3D12 snapshot on Windows 11 / RTX 4060. After a closed recording is reset, main (
e1251c31) still has two strong references (the test and the list). Withfe9cc1cf, it has one. The ten Streamline unit tests passed with the regression added. The test is available as a cherry-pick. Test commitFor the same-description reuse path,
proxied_queuereturns the native queue behind the same Streamline proxy used to create the swap chain. The D3D12 Streamline contract documents that its default mode blocks the presenting queue until the DLSS-G work completes. The test covers release of the list's reference after reset. An in-game run with snapshotting enabled would still be needed to measure pool recovery under frame generation. Queue setup · NVIDIA guidefe9cc1cfddto8bad0a6ae3@andrewpozdnakov7-jpg on GitHub · 2026-12-01 17:35 UTC · original
There are now two field reports with a consistent cutoff this change can be tested against. In #5008 on an RTX 3070 Ti, FG at 2× switches off eight frame indices after it switches on with DLSS Quality, with the snapshot exhaustion warning in between. Both #5017 logs show the same eight-frame cutoff with Performance at 6× and Quality at 5×. Log comparison
Changing #5008 only to DLAA removed the warning and produced extra frames. That provides a workaround and a control. The open verification for this patch is whether the original Quality case releases and reuses snapshots and produces extra frames with #4298 applied. The existing reset test verifies the reference drop, which is one part of that check.
@andrewpozdnakov7-jpg on GitHub · 2026-12-01 18:24 UTC · original
The maintainer added the same
fg_snapshots.clear()reset tomainina82703f0. The commit also explains the test-build regression. Alias mode 2 started using snapshots for aliased depth or motion vectors, which made the eight-entry pool exhaustion show up with default play settings. Commit on mainThe v2026.12.01.01-test download still predates that commit. The remaining field check is the original DLSS Quality route on a build that contains it. The two checks are sustained extra frames and no recurrence of the snapshot exhaustion warning.
@trustno1-coder on GitHub · 2026-12-01 18:44 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