fix(vk): DLSS Frame Generation through Streamline is given the picture from before the HUD (#1075) #3202
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/mods
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!3202
Loading…
Reference in a new issue
No description provided.
Delete branch "pmwork-personal/Longshot:fix/dlssg-sl-hudless"
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?
Summary
#2933 gave NVIDIA DLSS Frame Generation through NGX the picture from before the HUD, so the frames it makes leave the
hearts, the minimap and its arrow, and the button prompts where they are (#1075). DLSS FG through NVIDIA Streamline
(#2456) did not get it: Streamline's DLSS-G makes its frames from the swapchain image, the HUD in it, and can move the
HUD with the scene. Jiro113 asked for the same here.
Streamline takes a HUD-less colour (
kBufferTypeHUDLessColor), and its guide wants it in the swapchain image's ownform: the same size or extent, colour space and post-processing. This gives it that:
framegen_hud_before, HumanBean's, as for FSR 3.1 and NGX) is also made while Streamline'sDLSS-G makes the frames, and
do_presentmakes the picture's sampled view for it where its own present needs none(SDR at the window's size).
framegen_hudless_for_dlssgcopies the frame's crop into an image of its own, makes the HUD-less picture from it with the passes NGX's uses
(
hud_source; in Native HDRhudless_pq), then takes it the way the picture just went: the window's scale pass, theHDR pass, into the picture's place in an image of the swapchain's size and format (black beside it, as the bars).
dlssg_hudlesstags it on the frame's token witheOnlyValidNow, so Streamline copies it in the present's commandbuffer, with the back buffer's extent (told again with it, as the two must be the same). A game frame without one (a
menu, a movie, a reduced Output resolution, a mod's output effect on the picture, which would run twice a present, an
sRGB view of the picture, the Insert menu open) removes the tag, so last frame's is not used, and while the present
cannot use a copy none is made; the picture's size is still kept then, so a size changed meanwhile (the Output
resolution back to full) is seen when that ends.
place too.
RX_VK_DLSSG_HUDLESS=0gives the swapchain image alone, as before. UI recomposition (kBufferTypeUIAlpha) is notasked: a follow-up if the HUD-less picture alone is not enough.
On the RTX 5090 here, main's Streamline DLSS-G already kept the minimap and the hearts in place in the frames it made
(Testing), as #2933 found for NGX. So this gives DLSS-G the input Streamline asks for, with no harm seen and a small cost
(Measurements); whether it removes a smear on other GPUs needs those GPUs (Still to test).
Read first:
gpu/vk/vk_framegen.cppframegen_hudless_for_dlssg, thengpu/vk/vk_dlssg.cppdlssg_hudless, thengpu/vk/vk_replay.cpppresent_image_with_trial(the call) anddo_present(the view), thentests/test_dlssg_hudless.py(the Streamline part).See #1075.
Testing
Tested:
tests/test_dlssg_hudless.pyruns the realframegen_hud_before,hud_source,hudless_pqandframegen_hudless_for_dlssgwith spies for Vulkan and the present's passes, with Streamline making the frames: thecopy before the HUD made; the HUD-less picture made from a frame copy of its own, then through the scale pass (and in
HDR the HDR pass, with or without the scale pass) into the picture's place in an image of the swapchain's size and
format, black beside bars; the usual SDR present without the scale pass; a crop at an offset; none without a copy
since, with no view, with DLSS-G paused or not asked, with the Insert menu open, or with a mod's output effect on, and
that copy never taken by a later present; the copies and the HUD-less picture back after a reduced Output resolution
is turned off, and after the picture's size changed while an output effect was on (each fails on
a6805b86); Native HDR's 10-bit copy encoded under the HUD;RX_VK_DLSSG_HUDLESS=0(arun of its own). It fails on main
a87eb850("Streamline's DLSS-G making the frames: the picture is not copied beforethe game draws its HUD") and passes here.
tests/test_dlssg.pychecks the tag (the HUD-less buffer,eOnlyValidNowin the present's command buffer, the back buffer's extent with it, sl::Extent's field order, the tag removed when
none), its place in the present, and
do_present's view. The fixtures that cuthud_sourceor the present followthe new arguments and calls.
tests/run_all.py, Windows, llvm-mingw, 8 at once): maina87eb850835 passed, 10 failed, 59 skipped;this branch (
efbace64) 840 passed and the same 10 failures (test_dlssg,test_no_game_title,test_parity_gates,test_present_acquire_ahead,test_present_geometry_trace,test_present_held_image,test_present_image_free,test_sync_watch_event,test_turf_budget,test_ui_renderer), none only here (test_present_aspectandtest_present_aspect_vulkanpasswith the stand-ins added).
test_dlssgfails on main at "vk_draw.cpp reads the Upscaler row's setting"; its otherchecks, the new ones among them, pass here. The renderer builds with DLSS and Streamline (
dev.py vk), no warnings.Streamline, the Graveyard (the minimap and the hearts on screen), the camera turned by the control bridge, the screen
recorded (ffmpeg's Desktop Duplication: a 2138x900 window, as in fullscreen it sees only a few of a game's frames),
the window in front (Streamline pauses DLSS-G while it is not: the counter then says 60 FPS, Base 60).
vk: Streamline DLSS Frame Generation: given the picture from before the HUD (HUD-less colour, ...), thenof the last 600 game presents 600 with DLSS-G on, 600 of them given the HUD-less picture, nothing refused. Over the 24 recorded frames with the most camera motionthe minimap stays in place, its edges clean, the floor moving behind it; only the view cone turns.
RX_VK_DLSSG_HUDLESS=0), SDR: DLSS-G made frames too (91 FPS at that moment); the minimap the same:in place, edges clean.
Native HDR: the HUD-less picture under the HUD encoded as HDR10 (PQ of Rec. 2020 at paper white 400 nits), the HUD-less picture in the HDR10 swapchain's format, 600 of 600, nonerefused; the minimap and the hearts in place with no edge or colour step.
Still to test:
the game: turn the camera by the minimap and the hearts with
RX_VK_DLSSG_HUDLESS=0and without, expecting the HUD inplace without it and the 600-present line counting the HUD-less picture (by hand, Streamline's runtime beside the
game)
Measurements
Verdict: with Streamline's DLSS-G making frames (the game window in front), the HUD-less picture costs about
0.7 ms a game frame at 5120x2160 (median 14.66 against 13.98 ms, 68.4 against 71.6 fps: -4.5 %), every run with it
below every run without, and about 0.4 GiB of VRAM (+398 MiB of the game's dedicated memory), about what its images give
(nine of 42 MiB at this size). On this GPU main's path already keeps the HUD in place, so here it is cost without a seen
gain.
RX_VK_DLSSG_HUDLESSships on, asRX_VK_DLSS_FG_HUDLESSdoes for NGX (#2933): DLSS-G gets the inputStreamline's guide asks for, for the GPUs and scenes where the HUD smears;
=0turns it off.Setup: Windows 11, RTX 5090, driver 621.47, Streamline 2.14.16;
dev.py ab --env RX_VK_DLSSG_HUDLESS=0 --framegen --set HOS_WINDOW_NOACTIVATE=0 --warmup 40(one build, the switch set against unset;HOS_WINDOW_NOACTIVATE=0so eachgame window opens in front, as Streamline pauses DLSS-G while it is not); fullscreen 5120x2160, DLAA, DLSS FG 3x through Streamline, Native HDR (paper white 400), uncapped, V-Sync off; Hyrule Field (child);
60 s each after at least 40 s of warm-up, A, B interleaved, three each, nobody at the PC. Each run's window was in front
from before its measured 60 s to its end (the game log's
hid: game window ...lines; in the three runs whoseStreamline
sl.logwas kept, DLSS-G enabled before the span and no pause in it). VRAM: Windows' per-process counter(GPU Process Memory, Dedicated Usage) every 3 s, the median over each run's measured 60 s.
46ae5b43(main's path:RX_VK_DLSSG_HUDLESS=0, in this PR's build)efbace64test_dlssg_hudless.py(Streamline part; main @a87eb850)Earlier, with DLSS-G paused (that A/B's windows opened behind; a 2138x900 window, SDR, DLAA, on main
a87eb850): 8.88 against 9.11 ms median, about 0.2 ms, the passes alone at about a sixth of the pixels.Risks
dlssg_active(), DLSS-G making frames); NGX's, FSR 3.1's and the renderer's own framegeneration run as before (
hud_sourcetakes the frame as a view and format now; its passes are the same).an image of the swapchain's size (4 bytes a pixel); per frame a copy pass, the mask pass, the scale and HDR passes
again, a blit, and Streamline's own copy: about 0.7 ms a game frame and 0.4 GiB at 5120x2160 (Measurements).
Insert menu open, a reduced Output resolution. Where a crop of the picture is scaled, the HUD-less copy is scaled
from its crop alone, so the 1 to 3 pixels along the picture's edges can differ from the swapchain image's (DLSS-G
keeps them in place, as HUD).
RX_VK_DLSSG_HUDLESS=0(a revert is enough too). Nothing changes in saves or settings.Checklist
Ready for review
main; the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named).main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
mainand passes here.gpu/vk/switches.def.tests/that reads changed source is updated, not weakened.Streamline; Linux: CI's renderer build, on the push)
mainand here, for a change that shows on screen. (main's path by its switch,in a comment)
docs/dev/reference/upscalers.md: DLSS FG through Streamline, The HUD)Assisted-by:/Co-Authored-By:trailers.Ready to merge
main, measured again or a comment says why the numbers still hold.Credit: Jiro113 (DLSS FG through Streamline, #2456, and the ask), HumanBean (the HUD copies and HUD-less colour for FSR
3.1, #1103, #1464, #1487, #1538, which #2933 and this hand to DLSS-G).
Co-Authored-By: Claude Opus 5.5 [email protected]
🤖 Generated with Claude Code
Tested in game: Windows 11, RTX 5090, driver 621.47, Streamline 2.14.16, DLAA, DLSS FG 3x through Streamline, the Graveyard: SDR and Native HDR at a 2138x900 window in front; the log gives DLSS-G the HUD-less picture on 600 of 600 game presents, none refused; the minimap and hearts stay in place in the recorded frames; main's path (RX_VK_DLSSG_HUDLESS=0) compared
The minimap in the frames on screen while the camera turns (Windows 11, RTX 5090, DLAA, DLSS FG 3x through Streamline, the Graveyard, a 2138x900 window recorded with ffmpeg's Desktop Duplication). Each sheet is the 24 recorded frames with the most camera motion, in order; made frames and the game's own among them.
Main's path (

RX_VK_DLSSG_HUDLESS=0), SDR: the minimap already in place here.This PR, SDR (the counter at 180 FPS, Base 60):

This PR, Native HDR at paper white 400: the minimap and the hearts, no edge round them.


@review
Recommendation: Request changes. HUD-less capture can remain disabled after an output effect is turned off and the picture size has changed.
The change supplies Streamline DLSS Frame Generation with a HUD-less image in swapchain form. It adds image allocations and per-frame GPU work; the reported RTX 5090 runs show a median 0.23 ms frame-time increase with DLSS-G paused, while both paths kept the HUD in place.
Blocking (1): must change before merging.
gpu/vk/vk_framegen.cpp:1917: Suppressing capture while sl_unused is set can prevent the stored picture dimensions from ever updating. (more on the line) Do: Allow capture to probe or update the picture dimensions after the disabling condition changes, and add a test that changes size while capture is suppressed and then resumes it.Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)
gpu/vk/vk_framegen.cpp:2024: The cost with Streamline actually generating frames, including its copy and the additional VRAM, has not been measured. (more on the line) Do: Measure repeated switch-off and switch-on runs with DLSS-G active at a representative display resolution, including frame times and VRAM, on affected RTX hardware. (@fixdoes its part first: Avoid redundant image copies or repeated scale passes where the same output can safely be reused.)@fixcan do L1 and L2.Questions (1) (not confirmed from the code; they don't hold the recommendation)
gpu/vk/vk_dlssg.cpp:845: On a Streamline DLSS-G setup that reproduces the HUD smear with the switch off, does turning it on remove the smear?Checks: Still running: 11 checks.
More: does it help, other systems, switches, what was read
Does it help: Unproven. The game-free test shows the new capture and tag path is exercised, but on the RTX 5090 the minimap and hearts were already stable with the switch off. The reported three-pair measurement went from 111.8 to 109.4 median FPS and 8.88 to 9.11 ms median frame time; its spread overlaps and DLSS-G was paused.
Other systems: The new work is gated to Streamline DLSS-G, but hud_source is shared with NGX and FSR 3.1. The PR reports an RTX 5090 Windows windowed run in SDR and Native HDR; a GPU reproducing the original smear, fullscreen, and performance with DLSS-G actually generating frames remain untested. Linux and Windows renderer checks are still running.
Switches: RX_VK_DLSSG_HUDLESS is added as a kill switch, default on, with a switches.def row and documentation. Whether on is the right default remains unproven: the reported hardware showed no visible benefit and the active-generation cost has not been measured.
Reviewed:
a6805b869bagainst46ae5b43d3: Read the repository rules, standards and PR template; reviewed the full production diff, commit messages, changed test and documentation diffs, and the surrounding HUD capture, Streamline tagging and present paths. The large production and test files were read selectively around the changes and their callers, not in full. Recorded runs were reviewed from the PR and comments; linked images could not be inspected.; nothing run (a code review).Checked and fine:
Testing: No code or tests were run for this review. The PR reports game-free checks and Windows RTX 5090 runs; Forgejo CI is still running.
Overlaps and merge order: Not checked; network access is unavailable.
Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.
@ -1876,3 +1915,3 @@return;std::lock_guard lk(hud.mu);if (hud.failed) return;if (hud.failed || (!framegen_on() && hud.sl_unused)) return; // (Streamline's present could not use it: none)L1 (blocking): Suppressing capture while sl_unused is set can prevent the stored picture dimensions from ever updating.
When: Enable an output effect so a present sets sl_unused, change the presented picture size while the effect is enabled, then disable the effect. framegen_hud_before still returns before updating hud.pw and hud.ph; the present sees those old dimensions differ from sw and sh and sets sl_unused again, so subsequent frames never provide HUD-less colour.
Do: Allow capture to probe or update the picture dimensions after the disabling condition changes, and add a test that changes size while capture is suppressed and then resumes it.
@ -1898,0 +2021,4 @@}// (as vk_replay.cpp present_image_with_trial takes the picture: the scale pass, then the HDR pass, else the picture)const VkImage scaled =allow_scale ? framegen_scale(cmd, hud.hudless.view, hud.hudless.image, w, h, nullptr, rect.w, rect.h, native_pq)L2 (should fix): The cost with Streamline actually generating frames, including its copy and the additional VRAM, has not been measured.
When: The reported A/B ran with the windows unfocused and DLSS-G paused, so it cannot show the combined GPU and memory cost for players using frame generation.
Do: Measure repeated switch-off and switch-on runs with DLSS-G active at a representative display resolution, including frame times and VRAM, on affected RTX hardware.
Thanks for the review.
L1, fixed in
efbace64:framegen_hud_beforenow keeps the picture's size before it returns for a present that cannotuse the copy. The same lock-out had a more common way in, too: a reduced Output resolution makes the picture smaller
than the presented one, and once the setting went back to full the copy's reduced size was kept, so the HUD-less
picture never came back. Now a size changed while the copies are held off (a reduced Output resolution, a mod's output
effect, no view of the picture) is seen once that ends, and the copies and the HUD-less picture come again on the
second present after it. The copies retired at a new size meanwhile are freed at the present.
tests/test_dlssg_hudless.pyhas both cases (an output effect on, the picture from 2560x1440 to 3840x2160, the effect off; a reduced Output
resolution turned off): each fails on
a6805b86and passes onefbace64.L2, not measured yet with DLSS-G making frames. Streamline pauses DLSS-G while the game window is not in front, and
dev.py ab's game windows are not in front, so its A/B measures the passes' own cost only (the PR says so). The memorythe PR adds, from the images it makes (none on main under Streamline, none with
RX_VK_DLSSG_HUDLESS=0), at 3840x2160:when the picture is RGBA16F;
of it (it is tagged valid only now): 33 MB.
That is about 300 MB (about 430 MB with an RGBA16F picture); at 2560x1440 about 0.44 times that. A frame-time and VRAM
measurement with DLSS-G making frames needs a run with the game window in front and nobody at the PC (the switch off and on, three runs each, frame times
and VRAM); it follows in this PR when run. The description is updated for
efbace64.Question (does it remove the smear where there is one): not answered on this PC. On the RTX 5090 main's Streamline
DLSS-G already keeps the HUD in place, so the PR's "Still to test" asks for a run on an RTX 40 or another GPU that shows
the smear, with and without
RX_VK_DLSSG_HUDLESS=0, the game window in front.@review
Recommendation: Approve. The code is ready: only testing is left. The size recovery fix addresses the capture lockout, but the cost while Streamline is generating frames remains unmeasured. The reported RTX 5090 comparison also did not show the original HUD smear, so the player-facing benefit remains unproven. Recommend approval; not approved on the forge.
The change supplies Streamline DLSS Frame Generation with a HUD-less picture, intended to keep HUD elements stationary in generated frames. It adds image copies and rendering passes; the reported paused-generation comparison costs about 0.23 ms per game frame and an estimated 300 MB at 4K.
Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)
gpu/vk/vk_framegen.cpp:2024: The cost with Streamline actually generating frames, including its copy and the additional VRAM, has not been measured. When: The reported A/B ran with the windows unfocused and DLSS-G paused, so it cannot show the combined GPU and memory cost for players using frame generation. Do: Measure repeated switch-off and switch-on runs with DLSS-G active at a representative display resolution, including frame times and VRAM, on affected RTX hardware. (@fixdoes its part first: Avoid redundant image copies or repeated scale passes where the same output can safely be reused.)@fixcan do L2.Since the last review (on
a6805b869b)Resolved: L1 (Suppressing capture while sl_unused is set can prevent the stored picture dimensions from…)
Still open: L2 (The cost with Streamline actually generating frames, including its copy and the additional…)
Checks: Still running: 11 checks.
Also noticed (1; not asked for, not blocking)
More: does it help, other systems, switches, what was read
Does it help: Unproven: on the RTX 5090, the HUD stayed in place both with and without the change. The PR reports a median frame time of 8.88 ms without the feature and 9.11 ms with it, measured with DLSS-G paused; the cost and benefit while it generates frames remain unmeasured.
Other systems: The changed path targets Streamline DLSS-G. The shared HUD capture and masking code also serves NGX and FSR 3.1; the reported game run covers Windows and an RTX 5090, while Linux build checks and other affected hardware runs remain pending.
Switches: RX_VK_DLSSG_HUDLESS is added, default on; setting it to 0 restores the previous Streamline path. The default's benefit and cost during frame generation remain unproven.
Reviewed:
efbace64feagainst46ae5b43d3: Read the changed framegen capture, retirement and present logic, the changes since the prior head, the new recovery test cases, AGENTS.md, CONTRIBUTING.md and the pull request template. The remaining changed files and full base diff were not read in full; the PR's recorded runs were reviewed from its description and comments.; nothing run (a code review).Checked and fine:
Testing: No commands that build or run project code were executed. The author reports game-free tests and Windows RTX 5090 SDR and HDR runs; CI is still running.
Overlaps and merge order: Not checked; network access is closed.
Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.
L2 from the review, measured with Streamline's DLSS-G making frames: at 5120x2160 (fullscreen, DLAA, DLSS FG 3x
through Streamline, Native HDR, uncapped, Hyrule Field) the HUD-less picture costs about 0.7 ms a game frame (median
14.66 against 13.98 ms; 68.4 against 71.6 fps, -4.5 %; every run with it below every run without) and about 0.4 GiB
of VRAM (+398 MiB of the game's dedicated memory, about what its nine images of 42 MiB give at this size).
The first A/B could not show this:
dev.py abopens each game window behind the one in front(
HOS_WINDOW_NOACTIVATE=1), and Streamline pauses DLSS-G while the window is not in front. This one setHOS_WINDOW_NOACTIVATE=0(a window that still opened behind was brought to the front during its warm-up), and eachrun's window was in front for its whole measured 60 s: the game log's
hid: game window ...lines, and Streamline'ssl.log(DLSS-G enabled before the span, no pause in it) in the three runs where it was kept. The table, the setup andthe VRAM method are in the description (Measurements).
On this RTX 5090 main's path already keeps the HUD in place, so here this is cost without a seen gain.
RX_VK_DLSSG_HUDLESSstays on, asRX_VK_DLSS_FG_HUDLESSis for NGX (#2933), for the GPUs and scenes where the HUDsmears;
=0turns it off. Whether it should ship on where no smear shows is the maintainers' call.WIP: fix(vk): DLSS Frame Generation through Streamline is given the picture from before the HUD (#1075)to fix(vk): DLSS Frame Generation through Streamline is given the picture from before the HUD (#1075)Recommendation: Approve. L2 is resolved: the reported run measures both frame time and dedicated VRAM while Streamline generates frames. The change supplies the intended HUD-less input, although its visual benefit on a system exhibiting the smear remains unproven. Recommend approval; not approved on the forge.
Streamline DLSS frame generation receives a picture from before the game HUD, processed to match the swapchain. This adds image copies and rendering passes, with a measured cost even on the tested GPU where the HUD was already stable.
Since the last review (on
efbace64fe)Resolved: L2 (The cost with Streamline actually generating frames, including its copy and the additional…)
Checks: Still running: 11 checks.
Also noticed (3; not asked for, not blocking)
More: does it help, other systems, switches, what was read
Does it help: Unproven as a visual fix: the RTX 5090 test showed a stable HUD both with and without the change. The author's three interleaved runs at 5120×2160 with DLSS-G active measured median frame time rising from 13.98 to 14.66 ms, FPS falling from 71.6 to 68.4, and dedicated VRAM rising by 398 MiB.
Other systems: The new path runs with Streamline DLSS-G on supported Windows NVIDIA systems. The shared HUD source also serves NGX and FSR 3.1; their calls were adapted, but the reported in-game run covers Streamline on an RTX 5090 only. Linux renderer CI is still running.
Switches: RX_VK_DLSSG_HUDLESS is added and defaults on; setting it to 0 restores the previous Streamline input. The default incurs the measured cost where no visual gain was observed, so its benefit on affected hardware remains uncertain.
Reviewed:
efbace64feagainst46ae5b43d3: Read AGENTS.md, CONTRIBUTING.md, the pull request template, and gpu/vk/vk_dlssg.h. Reviewed the relevant HUD capture, processing, tagging and present code and the reported measurements; the remaining changed files and diff were skimmed, not read in full. No docs/review-checklist.md was present.; nothing run (a code review).Checked and fine:
Testing: No commands that build or run the project were executed. The author reports game-free checks and Windows RTX 5090 SDR and Native HDR runs; the listed CI checks have not finished.
Overlaps and merge order: none found
Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, as pmwork-personal took it out of WIP. Nothing was run; a maintainer decides.
HumanBean referenced this pull request2026-12-05 02:51:13 +00:00