perf(gpu): default swap chain to triple buffering (VICTORY_SWAP_BUFFERS) #1193
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!1193
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1193"
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?
@champagneluv on GitHub · 2026-11-28 15:17 UTC · original
perf/triple-buffering→main· +39 −5 · 3 files · 1 commits · closed without mergingSummary
Why
With \late_free_present()\ (\VICTORY_RELAY=2, default in \play.rs) and tearing enabled, presents are queued ahead of completion. Using 3 back buffers instead of 2 avoids CPU/GPU stalls waiting for a back buffer to retire when multiple frames are in flight.
Verification
@Bj0rnis on GitHub · 2026-11-28 16:58 UTC · original
Verified
686a0fd0on RTX 5070 Ti 16 GB (Blackwell, driver621.24, Streamline2.14.16/ NGX310.9.16) + Ryzen 7 9800X3D, 32 GB RAM, Windows 11 (Rust 1.98.1).Automated checks
git merge-treevsorigin/main(9ce3cf9): clean.cargo test --locked -p victory-gpu --features diagnostics --lib(RTX 5070 Ti): 508 passed, 0 failed, 36 ignored (includinghost::swap_buffers_tests::defaults_to_triple_and_clamps_range).cargo clippy --locked -p victory-gpu --tests: 0 new warnings (only pre-existingshadow.rs:1708manual_is_multiple_of).victory.exe upscaler-check --device --present(2560×1440DLSS Quality + 2× FG):buffers=3): 180/180 FG presents, 360 frames shown,status 0x0, clean shutdown (swap-chain VRAM delta299 → 622 MB, +15 MB vs double buffering).VICTORY_SWAP_BUFFERS=2: 180/180 FG presents, 360 frames shown,status 0x0, clean shutdown (swap-chain VRAM delta299 → 607 MB).Live gameplay (
--release, Series X,2560×1440, DLSS Quality, RT off)buffers=3, FG off (~5 min, intro + ~9.9k-draw indoor room):swap chain: ... buffers=3 tearing=true; F1 menu displaysSWAP CHAIN BUFFERS < 3 (TRIPLE) >.~6.9kmedian draws): 27.9 fps median (33.9peak); heavy room (~9.9kmedian draws): 27.7 fps median (29.9peak), frame times34.3 msmed /45.5 msp95 /79.1 msp99 (53frames>100 ms).0crashes,0OOM,0refused presents.buffers=3, DLSS 2× Frame Generation ON (-FrameGen -FrameGenX 2, ~5 min):Streamline: our swap chain is Streamline's proxy+DLSS Frame Generation switched ... on=true times=2 code=0 result="ok".~0.85 msinPresent/3.1 mslongest).~10.1kmedian draws):24.5–27.0base fps → ~54 fps shown (VRAM 11.5 / 13.8 GB,p95 46.4 ms,p99 69.8 ms,25frames>100 ms), smooth and fluid with no flicker, black frames, or crashes.Not tested
VICTORY_SWAP_BUFFERS=2A/B (compared only against an earlierv2026.11.28.01buffers=2run), FSR 3 swap-chain path,VICTORY_SWAP_BUFFERS=4, and live window-resize (ResizeBuffers) stress. (cargo xtask policyhit the pre-existingbindings.inifailure onmain.)AI-assisted test run and summary.
Pull request closed