DLSS Preset M / K are broken #17
Labels
No labels
accessibility
autorelease: pending
autorelease: tagged
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
needs measurements
question
testing wanted
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot#17
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Longshot version
2.1.0
What kind of problem
Low fps or stutter
What happened
Preset L and M seem broken.
Once you switch from Preset K to L the VRAM increases for a moment extremly but then comes down to a normal level that is still under 11500 GB.
GPU Power Draw increases by 36%
FPS Drop by 20%
This doesnt happen for me at Ultra Performance Mode there everything works very normal.
Preset L / M normaly use 200-300mb more VRAM and decrease performance by 4% if you have no GPU headroom left.
I have GPU headroom left and my VRAM doesnt seem full except for the short moment in the beginning.
Where in the game
Kokiri Forest Balcony
How often
Every time
Graphics card and driver version
RTX 5070 NVIDIA 617.42
CPU, RAM and operating system
5700X3D 32GB Win 11
Changes from the defaults
No response
Other software hooked into the game
No, nothing hooked in
longshot_log.txt
hookshot_log.1
Screenshots or video
Preset K DLAA

Preset L DLAA

Preset K DLSS Ultraperformance

Preset L DLSS Ultraperformance

Before you send it
Taking a look at this (llun's agent; RTX 5080, Windows 11).
From your log so far, at 3440x1440 DLAA: GPU time is about 10.9 ms a frame with K and 15.3 ms with L, and DLSS's own memory goes from 189 MB to 631 MB, with a peak of 1419 MB right after the switch, while the model row passes M on its way to L (a feature is made for each, 11 frames apart). I'll check which part of that is how Longshot drives DLSS and which is the model's own cost (as measured on an RTX 3060 Ti in https://github.com/NotRexed/Hookshot/issues/2836), and reproduce it on an RTX 5080.
@llun wrote in #17 (comment):
Its too late I dont know if you said that or the post said that but a 3060 runs Preset L and M worse than a 5080 will.
3000 series scales worse on M and L so my comment of it being a 4% cost compared to Preset K only applies to 4000 and 5000 series RTX.
@Schiggy fair point, the 3060 Ti was only for context: RTX 30 cards run L and M worse, so here are your own RTX 5070's numbers from your log instead (same spot, GPU time a frame):
L's extra cost grows with the pixels DLSS gets, about 0.8–0.9 ms per million in both rows, so DLAA at 3440x1440 gives it nine times the input of Ultra Performance. The few-percent figures you've seen are probably from upscaling modes, where the input is a quarter of the output or less. That points at the model's own cost at DLAA rather than something Longshot passes wrong: the preset, the sizes and the flags in your log all look right. I'll check that on an RTX 5080 at DLAA with K, M and L before saying it for sure.
What does look like ours is the memory jump right after switching. The model row goes K → M → L, so picking L made an M feature on the way, and NVIDIA's runtime holds a dropped feature's memory for a few seconds: 1419 MB at once against 631 MB for L alone, on a card that was already close to its limit. I'm testing a fix that waits until the row has stopped on a model before making it, and I'll post before and after numbers.
@llun wrote in #17 (comment):
I see but is GPU utilization not showing the full picture here ?
Because my GPU is not nearly 100% maxed out and yet I lose FPS majorly.
I thought my GPU overhead would catch that increased cost.
@Schiggy measured on an RTX 5080 (Windows 11, driver 621.24) at your settings: 3440x1440, DLAA, Kokiri Forest, 4 runs.
So the same shape as yours: L costs about 20% of the fps and about 40% more power than K at DLAA, on a 5080 too. That part is the model's own work at DLAA's input size, and it is the same with the fix below.
On utilization: you're right that it doesn't show the full picture. Here it only went from 74% to 81%, yet the frame got about 3 ms longer, the same as DLSS's extra GPU time. In Longshot a frame's GPU work isn't overlapped with the next frame's preparation: the frame is presented only after DLSS has run, and the next one isn't started until then. So any extra GPU time lands on the frame time even though the GPU sits idle at other moments in the frame. Utilization counts those idle moments; fps doesn't. With a game that overlaps frames, the headroom you see would absorb it. That overlap is being worked on separately (frame overlap), not in this issue.
The memory jump at the switch was ours, and it's fixed in #39: stepping K → M → L no longer makes M's feature on the way. VRAM rises about 0.64 GB instead of about 1.2 GB for the first seconds after the switch (DLSS's own memory 813 MB instead of 1419 MB), and L → M → K about 0.15 GB instead of 0.8 GB.