DLSS: frame generation's state read past the card's memory budget counts too (#1482) #856
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/856"
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 kibagami-nc on 2026-11-28T07:50:37Z.
Its first part is in main (
e1406af1): an upscaling recorded past the card's memory budget (slEvaluateFeaturereturning 39) counts as done. That was merged from the first commit. What's left here is the second part, rebased onf9dfb76f.What happens
slDLSSGGetStatereturns 39, "warning: out of VRAM", with the state read, as the evaluation does. sonokweii found it while testing this PR (RTX 5060 8 GB, driver 610.88, frame generation 3x, past the budget): every sampled call gavecode=39 … presented=2 generate_max=5.Both of its calls in
streamline.rstake 39 as a failure:let most = if code == 0 { state.num_frames_to_generate_max.max(1) } else { 1 }cuts 3X to 2X, though the state says 5:if code == 0. So past the budget, every per-second line reads0 frames shown by it, and the F3 panel's shown frame rate stays at the rendered one, while the state sayspresented=2.The change
state_read(code): 0 and 39 mean the state was read.most_generated(code, max): the card's most from such a state, or one.Tests
streamline::failing_tests::frame_generation_state_read_past_the_budget_counts: 39 reads the state, errors don't, andmost_generated(39, 5)is 5, not 1.cargo test -p victory-gpu --lib --lockedonf9dfb76f: 590 passed, 44 ignored.--all-targets, default and--all-features): nothing new against main's own findings.Not run with the game here. With a card past its budget and frame generation 3X, the lines to compare are
DLSS Frame Generation switched … times=3(where it said 2) and… frames shown by it.No game files, dumps or extracted data are included.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by sonokweii on 2026-11-28T21:17:05Z.
Tested
374806con an 8 GB card (RTX 5060, driver 610.88, Streamline 2.14.16 / NGX 310.9.16), merged locally on923e38ctogether with #1444: Series S, DLSS Quality to 1080p, frame generation 3x, about 4 minutes in the world, release build.The upscaling part works. With the card past its budget, no DLSS line counts a failure any more (0 of 242 lines; 202 of them with the card past its budget):
The same 39 comes back from
slDLSSGGetState, and the twoget_statecalls instreamline.rsstill take it as a failure:In
present_begins,let most = if code == 0 { state.num_frames_to_generate_max.max(1) } else { 1 };cuts 3x to 2x, though the state it got says 5:After the present, frames are counted only
if code == 0. From 21:08:28 to the end, all 10 sampled state calls gave 39 withpresented=2, yet all 191 per-second lines read 0, andFG_PER(soshown_per_frame()) stays at 1:Accepting 39 like 0 in both spots, as
evaluated()does for the evaluate, would ask for the 3x set in F1 and count the frames Streamline reports. If 2x past the budget is meant, the "more frames asked than this card generates" message is misleading there.This also corrects part of what I wrote in #1482: on
923e38c, the "0 frames shown" past the budget is at least partly this counting (an earlier923e38csession: 39 withpresented=2in 25 of 30 state samples, the rest 1 or 3).f4608f0has the sameif code == 0but does not log the state call, so I can't tell there.Unrelated to this PR as far as I can tell: this session rendered at 5-6 fps (4.6-8.0), with 45-80 ms a frame copying back 8-9 MB (
5.7 fps, 174.0 ms/frame (139.4 preparing: ...; 7.5 on the GPU; 75.1 copying back 8.6 MB)). It showed up once on923e38cwithout this PR too (DLSS Performance), while another923e38csession from the same save ran at 13-16 fps with 10-13 ms.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by kibagami-nc on 2026-11-28T21:51:46Z.
@sonokweii, thank you, both confirmed and fixed in
a77efe7d. The branch is also rebased on main (d4b5d517).slDLSSGGetStatebehaves like the evaluation: it returns 39 with the state read, which is what your sampled lines show (code=39 … presented=2 generate_max=5). Both of its calls now take 39 like 0:frames shown by itand the F3 panel should show the generated frames.New test
frame_generation_state_read_past_the_budget_counts: 39 reads the state, andmost_generated(39, 5)is 5, not 1.cargo test -p victory-gpu --lib: 552 passed, 0 failed.If you have another session past the budget, the lines to compare are
DLSS Frame Generation switched … times=(3 with 3X asked, where it said 2) andDLSS Frame Generation: … frames shown by it.