GPU: support multi-frame generation (3X-6X) on RTX 50 by sizing swap chain buffers and options (#1233) #1271
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1271"
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?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by dheerajc8073 on 2026-11-28T16:48:04Z.
Summary
Fixes #1233. Resolves an issue on NVIDIA GeForce RTX 50 series graphics cards (Blackwell architecture, e.g. RTX 5060 Ti, RTX 5080) where selecting multi-frame generation multipliers higher than 2X (
VICTORY_FRAMEGEN_X=3..6) in the F1 menu clamped presentation down to 2X (1 generated frame per engine frame).Root Cause Analysis
On RTX 50 series GPUs supporting DLSS Multi-Frame Generation (MFG) up to 6X (up to 5 synthesized frames per engine render), requested frame generation multipliers 3X through 6X were being prematurely constrained due to two interconnected limitations:
DlssgOptions& Query Guard instreamline.rs:slDLSSGGetStatewas called with anullpointer forDlssgOptions. The Streamline DLSS-G runtime expects a populatedDlssgOptionsstruct containing valid swap chain parameters (num_back_buffers), viewport dimensions (color_width,color_height), and generation flags (DLSSG_RETAIN_RESOURCES_WHEN_OFF) to report the hardware's multi-frame generation capabilities.let most = if code == 0 { state.num_frames_to_generate_max.max(1) } else { 1 };forcedmostto 1, clamping any requested multiplier down to 2X.host.rs:const BUFFERS: u32 = 2.DXGI_SWAP_EFFECT_FLIP_DISCARDmode, generating and queueing up to 5 synthesized frames per engine frame (6X multiplier) requires a sufficiently deep buffer queue. Sizing at only 2 back buffers starves the swapchain pipeline, resulting in presenter stalls, dropped presentation slots, or driver fallback to standard single-frame generation.Key Changes
Host DXGI Swap Chain Sizing (
crates/victory-gpu/src/host.rs):pub const BUFFERS: u32 = 8).Populate
DlssgOptionsBefore Querying State (crates/victory-gpu/src/streamline.rs):options.num_back_buffers = crate::host::BUFFERS,options.num_frames_to_generate = generated,options.flags = abi::DLSSG_RETAIN_RESOURCES_WHEN_OFF, and viewport dimensions prior to querying state.&optionsintoslDLSSGGetState(&viewport, &mut state, &options).Guarded Multi-Frame Capability Resolution (
crates/victory-gpu/src/streamline.rs):num_frames_to_generate_max = 5, preserving 3X, 4X, 5X, and 6X.num_frames_to_generate_max = 1safely clamps multipliers > 2X down to 2X.options.num_back_buffersreferencescrate::host::BUFFERS.Regression Unit Tests (
framegen_tests):swapchain_buffer_count_prevents_starvation: VerifiesBUFFERS >= 8.dlssg_options_num_back_buffers_matches_host_buffers: VerifiesDlssgOptionssynchronizes with host swap chain buffers.framegen_multiplier_mapping_and_clamping: Tests multiplier clamping (0 turns off, 1 -> 2X, 2..6 preserved, >6 clamped to 6X), generated frame counts (wanted.max(2) - 1), RTX 50 multi-frame preservation (up to 5 generated frames), RTX 40 clamping (1 generated frame), and query fallback resilience.Verification
framegen_testscovers all multi-frame generation paths, multiplier ranges, and capability queries.Closes #1233.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Aniseto on 2026-11-28T18:01:57Z.
Ran the frame-generation multiplier test at
04a98cbon an NVIDIA Blackwell desktop part:Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, Rust 1.98.1 (48a229cea 2026-09-01, pinned by
rust-toolchain.toml), MSVC 14.44.35207, DXC 1.9.2609.5 (shared env), debug build.The test passes on a card from the RTX 50 family: multipliers 3X-6X are preserved, the generated-frame count is
wanted-1, 2X is the floor, values above 6X clamp, and the capability-query fallback is handled. This is a CPU-side mapping test; it does not show Streamline actually producing the extra frames in a title. The PR has no comments yet, so this is the first datapoint in the thread and the first from an RTX 5070 Ti.Not tested: a retail title, presented-frame counts with MFG 3X-6X, a paired smoke run, the full workspace suite, AMD and Intel GPUs, native wave64 hosts, Wine, release profile, game data.
AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by tippythetaidum on 2026-11-28T18:26:03Z.
Tested on an RTX 5080 (driver 621.14) + Ryzen 7 9800X3D, Windows 11 26200, 1440p 280 Hz monitor. This PR is cherry-picked onto
9300875with #393, #1014, #1197 and #1264. Series X 2560x1440, DLSS Performance, DLSS frame generation 4x.On this card, 4x was not clamped to 2x before this PR. The Streamline line already showed 4 frames per present ("15 presents with it on, 0 off, 60 frames shown"). But with 2 back buffers the present call held the presenting thread for most of a frame:
Before, the frame rate sat at exactly 14.0 rendered / 56 shown in every scene, on a 60 Hz and on a 280 Hz monitor alike. With the PR the rendered rate follows the scene (10 to 20 in the world here, about 40 to 64 shown). No errors, and the picture looked right in a daytime drive.
In heavy outdoor scenes (11,000 draws a frame) the rendered rate didn't go up much, because the submitting thread sets it there. The stall itself is gone.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by ColorC on 2026-11-29T03:25:02Z.
Complementing @Aniseto's RTX 5070 Ti unit-test verification and @tippythetaidum's RTX 5080 4X run with live retail-title RTX 5070 Ti 16 GB measurements covering both 4X and 6X, sustained 90s pacing (
p99/p99.9), and the fullscreen/focus condition.Hardware & Test Environment
621.1.0(32.0.16.2101), Windows 1110.0.26200, Streamline2.14.16/ NGX310.9.162560x1440, DLSS Quality,VICTORY_FULLSCREEN=1,VICTORY_TEXTURE_ROOM_PERCENT=80, same opening save seed & warm shader/pipeline cache (45swarmup +90scapture window).Controlled Results
presents onframes shownmain(9ce3cf9,BUFFERS=2)2Xstatus 0x0but no synthetic frames emittedmain + #1271(single-variable,BUFFERS=8)4Xstatus 0x0, 0 crashes (*first-start 14 fps cap whenVICTORY_WARMUP_RESTART=0)#1271(90s warm window)4X103.0 fpsavg)25.5 fpsmedian,p99 61.8 ms(1% low 16.2),p99.9 113.3 ms, VRAM peak13.2 GB, 0 crashes, no pink tint#1271(90s warm window)6X138.5 fpsavg)23.4 fpsmedian (140.4 fpsshown median),p99 94.8 ms,p99.9 232.3 ms, VRAM peak14.0 GB, 0 crashes, visually cleanAdditional Findings on Blackwell (RTX 5070 Ti)
#1271(BUFFERS=8) andstatus 0x0, running windowed or unfocused fell back cleanly to1.00xpassthrough (frames shown == presents). SettingVICTORY_FULLSCREEN=1with foreground focus consistently unlocked exact4.00xand6.00x.2,078 -> 12,468frames), 6X held exact6.00xwith 0 crashes and no pink tint or obvious ghosting; 4X had tighter base tail latency (p99 61.8 ms/p99.9 113.3 ms) than 6X (p99 94.8 ms/p99.9 232.3 ms).