GPU: opt-in per-present drain on stage 3 (VICTORY_PRESENT_DRAIN=1) #3978
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!3978
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3978"
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?
@bemfavivaEC807E52 on GitHub · 2026-11-30 13:32 UTC · original
bemfavivaEC807E52:pr/present-drain→main· +56 −7 · 2 files · 1 commits · openSummary
Adds a minimal, opt-in
VICTORY_PRESENT_DRAIN=1switch (off by default) as a stage-3 workaround for #2185 (1-frame stretched/broken polygons under cross-frame overlap onv2026.11.29.01–v2026.11.29.05).What it changes
crates/victory-gpu/src/host.rs: Addspresent_drain()(OnceLock<bool>, opt-inVICTORY_PRESENT_DRAIN=1under stage-3late_free_present(); logs once at INFO when active and warns once if requested outside stage 3). InHost::present_placed, forcesslot = Nonewhen active so each displayed present takes the existing synchronousself.execute(&[copy])path (the same path screenshots already use), settling flights once per frame while leaving stage 3,queue::behind, thin translation,VICTORY_LATE_WAIT_LISTS=256, and DLSS/FSR frame generation active.crates/victory-gpu/src/queue/behind.rs: UnderVICTORY_PRESENT_DRAIN=1, defaultsVICTORY_SUBMIT_FRAMESto0for conservative safety while still honoring explicit overrides (e.g.VICTORY_SUBMIT_FRAMES=1).present_drain_forandpresent_backlogcovering defaults and explicit overrides.Why this helps (#2185)
VICTORY_LATE_WAIT=2stops the artifacts but disables DLSS/FSR frame generation (behind::started()requires stage 3).VICTORY_LATE_WAIT_LISTS=1keeps FG alive but settles ~16–17 times per frame (18.2 fps on RTX 4090).1.0settle/frame) and keeps 4x DLSS FG alive.Verification (RTX 4090, 9850X3D, 4K, Series X, DLSS Ultra Performance Preset L, 4x MFG, RT off)
cargo test -p victory-gpu --locked present_drain: 2 passed, 0 failed.VICTORY_PRESENT_DRAIN=1(defaultframes=0): 0 stretched polygons, 1.0 settle/frame, 4x FG active (23/24 -> 92/96,presented=4), ~21.6–24.3 fps (41.1 ms median).VICTORY_PRESENT_DRAIN=1+VICTORY_SUBMIT_FRAMES=1: 0 stretched polygons over ~6 min / 6,913 DLSS frames, 0 errors, 4x FG active (24 -> 96heavy indoor, up to29 -> 116at 33.0 ms median in lighter sections).VICTORY_PRESENT_DRAINunset or0): zero behavior change.019f18d879to61adeee44dView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.