fix(vk): DLSS Frame Generation (NGX) is given the picture from before the HUD (#1075) #2933
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 milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!2933
Loading…
Reference in a new issue
No description provided.
Delete branch "pmwork-personal/Longshot:fix/dlssg-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, @Beanstalk -> the Test Farm), made again before a push.
The text before the review's changes: dlssg-hudless-1075-pr.before-review.md.
Before a push (his OK in this session only): the whole suite on the branch and main
468bb8d2, the reviewer subagent'sself-review of the whole diff (done), the pack built with the NGX SDK (done), then: git push --force-with-lease
fork fix/dlssg-hudless (our own branch), forge.py pr edit 2933 --body-file, a comment answering L1-L4.
Title:
fix(vk): DLSS Frame Generation (NGX) is given the picture from before the HUD (#1075)Summary
#1075 reports artifacts round the HUD with DLSS Frame Generation (the hearts, the minimap and its arrow, the button
prompts) at each turn of the camera, which the built-in frame generation does not make (RTX 5060 Ti, nightly-325). The
game draws its HUD into the same picture as the scene, after its gameplay upscale, and NGX's DLSS-G was given that
picture alone (
pBackbuffer), with the scene's depth and motion: under every HUD pixel the motion is the scene's. NGXtakes a HUD-less colour for exactly this (
HUDLess: the scene before any UI, the back buffer itself wherever no UI is).The renderer already makes that picture for AMD FSR 3.1 (
hud.hudless,shaders/fg_hud.comp), and with DLSS FG on therow too, because FSR 3.1 is DLSS-G's fallback for the sets it does not make (
fsr3fi::frames_wanted). It was neverhanded over. Now:
framegen_recordgives it todlss_fg_frames(DlssFgHud,hud_for_dlss_fg) whenhud_sourcemade it thispresent, and
dlss_fg_framesgives it to NGX aspHudless, at the back buffer's size and format. Not on a presentwithout a copy (menus, movies). Kill switch
RX_VK_DLSS_FG_HUDLESS=0. It does not follow FSR 3.1's ownRX_VK_FSR_FG_HUDLESS.framegen_hud_wanted(FSR 3.1 asked, or DLSS FG through NGX making the frames at amultiplier of 2 or more, a Fixed one or Auto's by DLSS FG (#2795), on a temporal upscaler:
dlss_fg_takes_hud), asked byframegen_hud_before,hud_sourceandvk_draw.cpp'supscale_picture. So DLSS-G gets the copy where FSR 3.1 is not asked too (RX_VK_FSR_FG=0, a GPU FSR3.1 does not run on). #2204 and #2831 widen the same gate: after this, each changes one line in one function.
HUD the copy was in no encoding the frame has.
hudless_pq(shaders/fg_hudless_pq.comp) encodes the scene under theHUD as HDR10, as the standards have it and as Longshot's own HDR10 output encodes a linear picture
(
hdr_encode.comp's Expanded mode with no highlight gain,vk_imgui.cpphdr10_of): Rec. 709's primaries to Rec.2020's (ITU-R BT.2087), 1 at the paper white (
HOS_OPT_HDR_WHITE, the white the game is given too), then per channelST 2084's PQ (ITU-R BT.2100) of the light over 10000 nits. Where no HUD is, the HUD-less picture is the presented
frame itself.
RX_VK_DLSS_FG_UIR=1(an attempt, off): NGX's UI recomposition asked at the feature's creation,and each set given the HUD alone as
pUI(shaders/fg_hud_ui.comp: how opaque each HUD pixel is,1 - Tfrom theHUD layer where its see-through amount is known, else 1; its colour premultiplied so that
ui + (1 - a) × hudlessisthe frame). DLSS-G then makes its frames from the scene alone and lays the HUD back over them. A feature with UI
recomposition wants the HUD alone with each HUD-less picture, so it is asked only for a set given the HUD alone: a set
without it (the UI pass or image not made, no copy this present, Native HDR, where no HUD alone is made) is made by a
feature made again without it, and after 6 such changes in a run it stays off.
...; N of DLSS-G's with the HUD-less picture (M with the HUD alone too)).On the RTX 5090 here, with this build's DLSS-G runtime, main's DLSS-G already kept the HUD in place in the made frames
(Testing): the reported fault did not reproduce. So this gives DLSS-G the input NGX asks for, as FSR 3.1 has it, with no
harm seen; whether it removes the reported artifacts needs the reporter's kind of GPU (Still to test).
DLSS FG through Streamline is not changed: its frames are made at Streamline's present, and its HUD-less and UI tags are
Jiro113's follow-up from #2456 (asked on #1075 whether they go here or in his own PR; no answer yet).
Read first:
gpu/vk/vk_framegen.cpphud_for_dlss_fgandframegen_hud_wanted, thengpu/vk/vk_dlss.cppdlss_fg_frames(thepHudlessblock), thentests/test_dlssg_hudless.py.See #1075.
Testing
Tested:
Checks:
tests/test_dlssg_hudless.pyruns the realframegen_hud_before,hud_source,framegen_recordanddlss_fg_framestogether with spies for Vulkan and NGX. It fails on main018dd2efat its first case ("DLSS-G is givenno HUD-less picture (pHudless) though hud_source made one this present") and passes here in its three runs (default,
RX_VK_DLSS_FG_HUDLESS=0,RX_VK_DLSS_FG_UIR=1):pHudlessis the mask pass's HUD-less copy at the back buffer's sizeand format; none on a present without a copy; given with FSR 3.1 not asked; nothing copied at the renderer's own Auto or with
DLSS-G not making the sets; in Native HDR given in RGB10A2, encoded from this frame's pictures at the paper white, and none when
that pass was not made; UI recomposition asked and
pUIgiven only with its switch, and not asked for the Native HDRfeature; with its switch, a failed UI pass gives the HUD-less picture to a feature made again without UI
recomposition (with it again once the HUD alone is back), and the HUD alone coming and going leaves it off after 6
changes. Broken copies of the fix (the
hand-over,
pHudless, the gate, a stale copy, the switches, the Native HDR pass's inputs, paper white and gate) eachfail it with their own message.
tests/test_dlssg_hudless_pq.pyandtests/test_dlssg_hud_ui.py(new) check the twoshaders' maths as C++ (
rec2020against BT.2087's matrix worked out from the BT.709 and BT.2020 primaries and D65,and against
hdr_encode.comp'sto2020andhdr10_of's digit for digit;pq1's constants againsthdr_encode.comp's andpq1against ST 2084 from its rational constants;pq_encodeagainst that encode in doublesto a tenth of a code; the UI's alpha and
ui + (1 - a) × hudless) and their headers against glslang16.6.0.
test_fsr3fi_hud_mask.py,test_fsr3fi_hud_capture.py(a DLSS FG case) andpresent_source_crop_test.cppfollow the shared gate and the new argument.
Built (at
b8215555): the pack over main e6a71a1d's base (Windows, llvm-mingw, the NGX SDK on), exit 0, no warnings;vk_dlss.cppwithout the NGX SDK, syntax only.
The whole suite (
tests/run_all.py, Windows, llvm-mingw, glslang 16.6.0 on PATH, 8 at once): main468bb8d2821passed, 55 failed, 50 skipped; this branch (at 1922eff9, the head before the last test case and texts) 825 passed, 54
failed, 50 skipped, and the checks that read this code again at
b8215555. No check fails only here: of the failuresnot on both sides,
test_longshot_ctl(here) passes alone here and on main, andtest_cloth_step8andtest_present_held_image(main) change from run to run (test_cloth_step8failed once alone here too, then passedthree times; no cloth code in this change).
test_present_source_cropfails on main too (its fixture has nodrain_framegen_sets); with that one stand-in added, it passes here.test_framegen_hdrandtest_temporal_present_bandwidthfail with the same compile errors on main.In the game (runs A to D: the code before the review; D2 and D3: this head,
b8215555): Windows 11, RTX 5090, driver 621.40, 5120×2160 ultrawide, DLAA, DLSS FG 3x through NGX (no Streamlinefiles in this build), DLSS 5 off (#2807). The control bridge turned the camera (right stick, 12 turns) and the
renderer saved the game's frame and the frame DLSS-G made before it every 31 presents (
RX_VK_SHOTS,RX_VK_SHOT_MADE=1, 2560×1080). For each made frame taken while the camera moved: the made frame, the game frame,and their difference ×4, at the hearts, the prompts and the minimap. A player's save in the Graveyard (child) for the
minimap; the repository's
kokiri-starthas none on screen.RX_VK_DLSS_FG_HUDLESS=0, main'sNGX path: the hearts, the "Move / Change View" prompts, the minimap and its arrow are where the game frame has
them (black in the difference) while the scene behind moves; only the minimap's view cone differs, at its edges,
as it turns with the camera. No doubling, tearing or halo.
RX_VK_DLSS_FG_UIR=1: NGX took UI recomposition; 509 of 600 sets with the HUD-less picture andthe HUD alone, none refused; the HUD as in A4.
picture (RGB10A2); the HUD as in A4.
Native HDR: the HUD-less picture under the HUD encoded as HDR10 (PQ of Rec. 2020 at paper white 400 nits); 462 of 600 sets made by DLSS-G, all with the HUD-less picture,none refused; the minimap, its arrow and the hearts where the game frame has them while the scene moves.
none refused; the minimap in place, no edge round it. The camera stood still in 402 of those sets, so D3 has less
motion behind the HUD than D2.
The 53 checks that fail on main
468bb8d2and here (this PC)test_auto_handheld, test_blocks_at_start, test_bug_report, test_builder_channel, test_control_picture,
test_coverage_run, test_crash_record, test_crt_options, test_dev_ab, test_dev_build, test_dev_migrate,
test_dev_update, test_draw_stream_visibility, test_float_add_subgroup, test_framegen_hdr, test_framegen_resources,
test_fsr_uniform_ownership, test_game_boundary, test_game_menu_mouse_buttons, test_image_reaper_threads,
test_image_view_retry, test_input_background, test_input_movie, test_keyboard_menu_option, test_keyboard_option,
test_linux_pressure, test_loaded_modules_drop, test_log_batch, test_log_levels, test_menu_keys, test_oot_menu_mouse,
test_option_ids, test_parity_gates, test_perf_send, test_present_acquire_ahead, test_present_image_free,
test_present_source_crop, test_profile_symbols, test_program_cache_cleanup, test_program_cache_one_variant,
test_readback_timeout_reuse, test_recording_admission, test_run_all_mingw, test_screensaver,
test_switch_table (main's own
LONGSHOT_LAUNCHER_STARTUP; the two new rows agree with the source),test_target_retention, test_temporal_present_bandwidth, test_tex_desc_memo, test_text_keyboard_policy,
test_upscaler_round_trip, test_vram_compact, test_windows_display_startup, test_windows_on_linux
Still to test:
prompt, on main and here, expecting the HUD where the game frame has it in each made frame here, and the 600-present
line counting the sets with the HUD-less picture (the Test Farm, or the reporter)
and the frame time and 1% lows against main at the player's resolutions (by hand)
made frames as on main (by hand)
Measurements
Verdict:
RX_VK_DLSS_FG_HUDLESSships on: DLSS-G gets the input NGX asks for, with no harm seen.RX_VK_DLSS_FG_UIRships off: it showed no visible change on this GPU, which already kept the HUD in place.
Setup: Windows 11, RTX 5090, driver 621.40, Ryzen 7 9800X3D; the runs in Testing; NGX's own 600-present line.
Measured on main
018dd2ef. The PR is on main468bb8d2, which adds #2929 (grass distance), #2795 (Auto by DLSS FG:these runs were at Fixed 3x), #2807 (DLSS 5 let go at exit: off in these runs), #2930 (a camera cut starts the
temporal histories again: no cut in these turns), #2864, #2913, #2942, #2969, #2871 and the storage buffer fix, none
in this change's paths, so the Expanded HDR numbers still hold. Native HDR's encode changed in the review: D2 and D3
ran on this head.
018dd2ef(the runs: main's path,RX_VK_DLSS_FG_HUDLESS=0)b8215555(A to D: the code before the review; D2, D3: this head)test_dlssg_hudless.py(main @018dd2ef)pHudlessMemory: at DLSS FG on a GPU FSR 3.1 also runs on (every RTX here), the HUD copies were already made for FSR 3.1's
fallback before this change, so giving the HUD-less picture adds no image: 36 bytes a pixel in SDR, about 133 MB at
2560×1440 and 398 MB at 5120×2160, the same as main. Without FSR 3.1 (
RX_VK_FSR_FG=0), 24 bytes a pixel without theHUD layer.
RX_VK_DLSS_FG_UIR=1adds the UI image (4 bytes a pixel) and the layer. GPU time: Native HDR adds one computepass over the output size that writes only under the HUD; not measured.
Risks
The change only adds an input NGX documents as optional; a present without a copy is given none, as before. In Native
HDR the HUD-less picture under the HUD is the standard HDR10 encode of the game's linear picture at the paper white
(Longshot's own); where the game's frame is encoded otherwise, it differs from the frame under the HUD alone, which
DLSS-G uses to tell the HUD from the scene. If the encode's pipeline is not made, Native HDR gets none.
The encode reads the paper white option at each present, which is what the game is given
(
nn::vi::QueryDisplayHdrPaperWhite, the same 80 to 500 clamp); if the game keeps the value it read earlier, a paperwhite changed during play makes the HUD-less picture under the HUD brighter or darker than the frame until the game
reads it again (Still to test).
#2204 and #2831 change the same HUD gate; after this, each changes one line of
framegen_hud_wanted.The Graphics guide picture's check (
check_guide_screenshots.py --review-sources): this change leavesgpu/vk/vk_framegen.h, a recorded input, as main has it (framegen_hud_wantedis declared where it is used,vk_draw.cpp). It changesgpu/vk/vk_dlss.h, also one (declarations, no menu row); main fails the check on it and onvk_temporal.hnow (468bb8d2: 2 issues), so this change records its review once main has recorded its own.RX_VK_DLSS_FG_HUDLESS=0gives the old path.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.test_dlssg_hud_uiandtest_dlssg_hudless_pqcompare each header with its shader)no warnings; Linux: the CI's renderer build passed at
e042b987and on this head,b8215555; no paths in this change)docs/dev/reference/upscalers.md: its new section on the HUD for DLSS FG through NGX)mainand here, for a change that shows on screen. (main's path by its switch,the same runtime; first comment)
Assisted-by:/Co-Authored-By:trailers.Ready to merge
main, measured again or a comment says why the numbers still hold.Credit: HumanBean (the HUD copies and HUD-less colour for FSR 3.1, #1103, #1464, #1487, #1538, which this hands 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.40, 5120×2160 ultrawide, DLAA, DLSS FG 3x through NGX (DLSS 5 off, #2807). Kokiri (Link's house, the forest's entrance) and the Graveyard (child, the minimap on screen); the control bridge turned the camera with the right stick, and the renderer saved the game's frame and the frame DLSS-G made before it every 31 presents. With
RX_VK_DLSS_FG_HUDLESS=0(main's path) the HUD already stayed in place in the made frames on this GPU: #1075 did not reproduce here. With the fix: 504 of 600 sets got the HUD-less picture (Expanded HDR), 550 in Native HDR at paper white 400, and 509 with the HUD alone too underRX_VK_DLSS_FG_UIR=1; the hearts, the prompts, the minimap and its arrow in the made frames as before, with no doubling, tearing or halo. The runs used the code before the self-review fixes, which change onlyRX_VK_DLSS_FG_UIR=1in Native HDR and when the 600-present line counts.Possibly related, for context:
The minimap in the made frames, from the runs in Testing (5120×2160, shots saved at 2560×1080, the minimap cropped). Each row is one made frame taken while the camera turned. Columns: the frame DLSS-G made | the game's frame after it | their difference ×4. Black in the difference means the same pixels: the minimap and its arrow stay in place in every run; only the view cone (it turns with the camera) and the scene behind the minimap differ.
A4, main's path (

RX_VK_DLSS_FG_HUDLESS=0), Expanded HDR:B4, this PR, Expanded HDR:

C, this PR with

RX_VK_DLSS_FG_UIR=1, Expanded HDR:D, this PR, Native HDR (paper white 400):

@review
Recommendation: Request changes. The Native HDR shader reproduces code read from a game-derived capture, contrary to the repository’s licensing and game-data rules. The optional UI recomposition path can also submit a HUD-less image without the UI image that its enabled feature requires.
The change supplies DLSS frame generation with a HUD-less picture and optionally a separate HUD, aiming to prevent HUD artifacts in generated frames. It adds a Native HDR compute pass and, where FSR does not already request them, substantial HUD-copy allocations.
Blocking (1): must change before merging.
gpu/vk/shaders/fg_hudless_pq.comp:5: This shader implements the game’s output pass from an Nsight capture of the game, which conflicts with the repository’s prohibition on committed code made from a game dump. (more on the line) Do: Remove the capture-derived implementation and generated header, or replace them with an independently authored implementation based on permissible public specifications and independently established behavior.Should fix (1): not blocking, but worth doing before merging.
gpu/vk/vk_framegen.cpp:1796: UI recomposition remains enabled in the NGX feature when making the UI image fails, but the code still hands NGX the HUD-less image without pUI. (more on the line) Do: When UI creation fails, avoid submitting that input combination: recreate or select a feature without UI recomposition, or fall back from DLSS-G until a complete pair of inputs is available. Cover the failure path in the test.Testing before merging (2) (runs on the systems it can change; it doesn't hold the recommendation)
gpu/vk/vk_dlss.cpp:2283: The reported HUD artifact has not yet been reproduced and checked with this input on an affected GPU. (more on the line) Do: Compare main and this change while turning the camera near the minimap and prompts on the reporter’s GPU or a comparable RTX 40/50 system, inspecting generated frames.gpu/vk/vk_framegen.cpp:1797: The new Native HDR pass’s effect on frame time and its output at other paper whites have not been measured. (more on the line) Do: Compare frame times and 1% lows against main in Native HDR at player resolutions, and inspect generated frames at another paper white and after changing it during play. (@fixdoes its part first: Reduce or avoid the full-resolution encode pass if a smaller or fused pass can produce the same input.)@fixcan do L1, L2 and L4.Checks: Failing on this head, which is behind its base, where they pass:
CI / Third-party parts and guide screenshots (pull_request),PR description / Title and description (pull_request_target),CI / Website build and checks (pull_request),CI / Game-free checks (run_all.py, part 1/2) (pull_request),CI / Game-free checks (run_all.py, part 2/2) (pull_request).@rebase(or@fix) brings it up to date and runs them again; not held against it.More: does it help, other systems, switches, what was read
Does it help: Unproven for the reported artifact: the RTX 5090 comparison did not reproduce it before the change, and the RTX 5060 Ti or RTX 40 comparison remains outstanding. The test shows the HUD-less resource is handed to NGX, but not that the reported visual fault is fixed.
Other systems: The changed gate can also run the HUD-copy path when FSR frame generation is disabled or unavailable. Native HDR adds a full-resolution compute dispatch; its frame-time cost and behavior at other paper whites remain unmeasured. Streamline’s frame-generation path is unchanged.
Switches: RX_VK_DLSS_FG_HUDLESS is added on by default; its effectiveness and cost need validation on affected hardware. RX_VK_DLSS_FG_UIR is added off by default for an experiment; its failure handling needs correction. Both have switch-table rows.
Reviewed:
e042b987aaagainst4908cc6dad: Read the repository rules, standards, PR template, commit messages, changed renderer paths and shader sources, and portions of the tests and documentation. Skimmed the generated SPIR-V headers and recorded runs; did not read every changed code and test file in full. docs/review-checklist.md was absent.; nothing run (a code review).Checked and fine:
Testing: No code, tests, builds, or project scripts were run, as requested. The author reports Windows RTX 5090 game runs and game-free checks; the stated Linux build and affected-GPU runs remain outstanding.
Overlaps and merge order: The description identifies overlapping HUD-gate work in #2204 and #2831; their current contents and merge order could not be checked offline.
Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.
@ -0,0 +2,4 @@// Frame generation (vk_framegen.cpp hudless_pq, #1075): NVIDIA DLSS Frame Generation's HUD-less colour in Native HDR. There// the picture the HUD copies come from is the game's linear one (RGBA16F), and the frame presented is the game's own HDR10// encode of it (PQ codes in RGB10A2), so fg_hud.comp's HUD-less copy is the frame itself wherever no HUD is, but under the// HUD the linear scene as it is, in no encoding the frame has. Here the scene under the HUD is encoded as the game's HDR10L1 (blocking): This shader implements the game’s output pass from an Nsight capture of the game, which conflicts with the repository’s prohibition on committed code made from a game dump.
When: The new PQ implementation and its accompanying test encode the output pass and constants read from a captured game frame; the generated SPIR-V header also contains that implementation.
Do: Remove the capture-derived implementation and generated header, or replace them with an independently authored implementation based on permissible public specifications and independently established behavior.
@ -2258,0 +2280,4 @@// before the HUD, the back buffer itself wherever no HUD is (NGX's HUDLess), lets it tell the HUD from the scene;// with UI recomposition asked at creation (dlss_fg_uir), the HUD alone too, which it lays back over each made frameNVSDK_NGX_Resource_VK hudless{}, ui{};if (hud && hud->hudless) {L3 (should fix): The reported HUD artifact has not yet been reproduced and checked with this input on an affected GPU.
When: The RTX 5090 comparison showed the HUD in place both before and after; it cannot establish whether the change fixes the RTX 5060 Ti report.
Do: Compare main and this change while turning the camera near the minimap and prompts on the reporter’s GPU or a comparable RTX 40/50 system, inspecting generated frames.
@ -1707,0 +1793,4 @@const bool dlss = dlss_fg_takes_hud(), uir = !pq && dlss && dlss_fg_uir();hud.layered = ((hudless_wanted(pq) && fsr3fi::frames_wanted()) || uir) &&hud_layer(cmd, x0, y0, w, h, pq || dev.hdr || opts.hdr != 0);hud.ui_ready = uir && hud_ui(cmd, cur, w, h, hud.layered);L2 (should fix): UI recomposition remains enabled in the NGX feature when making the UI image fails, but the code still hands NGX the HUD-less image without pUI.
When: With RX_VK_DLSS_FG_UIR=1, a failed UI pipeline or image allocation makes hud_ui return false. hud_for_dlss_fg still supplies hudless, and dlss_fg_frames evaluates a feature created with UI recomposition enabled without its required UI input.
Do: When UI creation fails, avoid submitting that input combination: recreate or select a feature without UI recomposition, or fall back from DLSS-G until a complete pair of inputs is available. Cover the failure path in the test.
@ -1707,0 +1794,4 @@hud.layered = ((hudless_wanted(pq) && fsr3fi::frames_wanted()) || uir) &&hud_layer(cmd, x0, y0, w, h, pq || dev.hdr || opts.hdr != 0);hud.ui_ready = uir && hud_ui(cmd, cur, w, h, hud.layered);hud.pq_made = pq && dlss && hudless_pq(cmd, x0, y0, w, h);L4 (should fix): The new Native HDR pass’s effect on frame time and its output at other paper whites have not been measured.
When: Every qualifying Native HDR present dispatches another output-resolution compute pass; the supplied run reports no GPU time and covers only 400 nits.
Do: Compare frame times and 1% lows against main in Native HDR at player resolutions, and inspect generated frames at another paper white and after changing it during play.
e042b987aab8215555c0Thanks for the review. Changes on
b8215555(rebased onto main468bb8d2, after #2795):L1 (Native HDR encode).
shaders/fg_hudless_pq.compnow encodes the scene under the HUD with Longshot's own HDR10 encode of a linear picture, the onehdr_encode.compuses for Expanded HDR (with no highlight gain) andvk_imgui.cpphdr10_offor the overlays: Rec. 709's primaries to Rec. 2020's (ITU-R BT.2087, the same 4-digit matrix ashdr_encode.comp'sto2020), 1 at the paper white, light below 0 as none, then ST 2084's PQ (ITU-R BT.2100). The shader, its SPIR-V header, the docs, the test and the commit message cite only those standards and that code.tests/test_dlssg_hudless_pq.pynow works out BT.2087's matrix from the BT.709 and BT.2020 primaries and D65 and checks the shader against it, checks that its PQ constants and matrix arehdr_encode.comp's digit for digit, and checkspq_encodeagainst ST 2084 written out from its rational constants. No code, constant or value from the game or a capture of it is left in the diff. Where no HUD is, the HUD-less picture is the presented frame itself, as before.L2 (UI recomposition without
pUI).dlss_fg_framesnow asks UI recomposition only for a set given the HUD alone. A set without it (the UI pass or image not made, no copy this present, Native HDR) is made by a feature made again without UI recomposition, andpUIgoes only to a feature made with it. After 6 such changes in a run, UI recomposition stays off, so a HUD alone that comes and goes does not make a feature set after set.test_dlssg_hudless.py(withRX_VK_DLSS_FG_UIR=1) covers the failed UI pass, the HUD alone coming back, and the change limit. The new cases fail on the earlier head.L3, L4 (runs). Not done yet: the reporter's kind of GPU (an RTX 40 or 5060 Ti), and Native HDR's frame time and the HUD at another paper white and after a change during play with this head's encode, are in Still to test.
Also: with #2795, the gate's texts say a multiplier of 2 or more (Fixed, or Auto by DLSS FG);
framegen_now() >= 2already covers both.gpu/vk/vk_framegen.his no longer changed (a recorded input of the Graphics guide picture):framegen_hud_wantedis declared where it is used.Checks: the whole suite on Windows, 825 passed, 54 failed, 50 skipped here and 821, 55, 50 on main
468bb8d2; no check fails only here (the failures not on both sides pass alone or change from run to run). The pack builds with the NGX SDK with no warnings.Run D again on this head (
b8215555), Native HDR with the new encode: Windows 11, RTX 5090, 5120×2160, DLAA, DLSS FG 3x through NGX, the same save and route as run D (the Graveyard, 12 camera turns), the made frames saved every 31 presents. Columns as before: the frame DLSS-G made | the game's frame after it | their difference ×4.D2, paper white 400: the log says

Native HDR: the HUD-less picture under the HUD encoded as HDR10 (PQ of Rec. 2020 at paper white 400 nits); 462 of 600 sets made by DLSS-G, all with the HUD-less picture, none refused. The minimap and its arrow stay in place while the scene moves; only the view cone's edges differ (it turns with the camera).The hearts (left) and the prompt area (right, no prompt on screen there: the grass and a gravestone move) in the same five frames:

D3, paper white 203: 581 of 600 sets with the HUD-less picture, none refused; the minimap in place, no edge round it. The camera stood still in 402 of those sets, so this run has less motion behind the HUD than D2.

Still to test from the review: the paper white changed during play, Native HDR's frame time and 1% lows against main (L4), and the reporter's kind of GPU (L3).
@Beanstalk on Windows with an NVIDIA RTX 40 (an RTX 5060 Ti also does), a build with NVIDIA DLSS and without NVIDIA Streamline's runtime (so DLSS FG goes through NGX), Upscaler NVIDIA DLSS, Frame generation Fixed 2x, Frame generation by DLSS FG, HDR off. Two builds, main and this PR, each into play outdoors with the minimap on screen, then turn the camera left and right for a minute. Set
RX_VK_SHOTS=<a folder>,RX_VK_SHOT_EVERY=31andRX_VK_SHOT_MADE=1for both. Expect in this PR's log, after each 600 presents,vk: DLSS Frame Gen (NGX): of the last 600 presents N made by DLSS-G ...ending inN of DLSS-G's with the HUD-less picture (0 with the HUD alone too), that count equal to the made count and0 refused; main's line has no HUD-less count. Attach from each build fivevk_N_made.pngshots taken while the camera turned, each with the game's shot after it, for a person to compare the minimap and the hearts. Report each build's frame rate.Beanstalk test farm · ⛔ can't be tested as asked
Commit
b821555· approved by pmwork-personal (untrusted) · dashboardNot run: the farm can't test this as asked, so nothing is built or run:
⚠️ Note: The alternative cannot compare the made and HUD-less counts for equality, or assess minimap and heart artifacts in generated frames.
⚠️ Note: Frame rate is measured after the camera turns, not during them; Native HDR and its frame-time effects are outside this requested SDR run.
What it could test instead: The alternative plan runs main and the PR in a Windows window with DLSS and fixed 2x frame generation, turning the camera in Hyrule Field and measuring frame rate afterward. It fails on a crash or if the PR does not log an NGX 600-present line with no refusals and no HUD-alone inputs. The RTX 5060 Ti target waits for a matching tester if none is available. No tester online now matches windows+nvidia+window+dlss+gpu-rtx-5060-ti: that target waits for one.
A member of
BigBeanscan comment@Beanstalk <new words>to ask for something else, or@Beanstalk test it anywayto run the plan regardless.Ready for a new review on
b8215555. BeanBot's request for changes (one042b987) is answered in #2933 (comment), and Native HDR's new encode ran in the game in #2933 (comment).b8215555: 7 pass. The 4 that fail (website build, guide screenshots, game-free checks parts 1 and 2) failed on the PRs merged in the last days too (#2795, #2909, #2930, #2942, #2969); main's own push CI on468bb8d2did not run. Here the whole suite has no check that fails only on this branch (Testing).@review
Recommendation: Approve. The code is ready: only testing is left. The reported artifact has not yet been checked on an affected GPU, and the Native HDR pass's frame-time cost remains unmeasured. The revised shader and UI recomposition handling address the two code items. Recommend approval; not approved on the forge.
The change supplies NGX with a HUD-less picture so generated frames can keep the HUD in place, with an optional UI recomposition path. It reuses the existing HUD capture but adds an HDR encoding pass and feature recreation when optional UI input comes and goes.
Testing before merging (2) (runs on the systems it can change; it doesn't hold the recommendation)
gpu/vk/vk_dlss.cpp:2283: The reported HUD artifact has not yet been reproduced and checked with this input on an affected GPU. When: The RTX 5090 comparison showed the HUD in place both before and after; it cannot establish whether the change fixes the RTX 5060 Ti report. Do: Compare main and this change while turning the camera near the minimap and prompts on the reporter’s GPU or a comparable RTX 40/50 system, inspecting generated frames.gpu/vk/vk_framegen.cpp:1797: The Native HDR encode pass's frame-time cost remains unmeasured. When: With Native HDR and NGX DLSS frame generation, the new pass dispatches across the output at each eligible present; its effect on frame pacing is unknown. Do: Compare frame times and 1% lows against main in repeated matched Native HDR runs at player resolutions. (@fixdoes its part first: Reduce or avoid the full-resolution encode pass if a smaller or fused pass can produce the same input.)@fixcan do L4.Since the last review (on
e042b987aa)Resolved: L1 (This shader implements the game’s output pass from an Nsight capture of the game, which co…); L2 (UI recomposition remains enabled in the NGX feature when making the UI image fails, but th…)
Still open: L3 (The reported HUD artifact has not yet been reproduced and checked with this input on an af…); L4 (The Native HDR encode pass's frame-time cost remains unmeasured.)
Checks: Failing on this head, which is behind its base, where they pass:
CI / Third-party parts and guide screenshots (pull_request),CI / Website build and checks (pull_request),CI / Game-free checks (run_all.py, part 1/2) (pull_request),CI / Game-free checks (run_all.py, part 2/2) (pull_request).@rebase(or@fix) brings it up to date and runs them again; not held against it.Also noticed (2; not asked for, not blocking)
More: does it help, other systems, switches, what was read
Does it help: Unproven for the reported artifact: on the RTX 5090, the HUD was already in place before the change. The reported runs show 462 of 600 presents at 400 nits and 581 at 203 nits were made with the HUD-less input, but do not measure frame time or 1% lows.
Other systems: The changed path affects NGX DLSS frame generation and shares HUD capture with FSR 3.1; Streamline is unchanged. The reported game runs cover Windows on an RTX 5090, while the affected RTX 40 or 5060 Ti and Native HDR timing remain untested.
Switches: RX_VK_DLSS_FG_HUDLESS defaults on; its effectiveness and Native HDR cost remain unproven on affected hardware. RX_VK_DLSS_FG_UIR defaults off, appropriate for an experimental path with no demonstrated visual gain; it is also disabled when HUDLESS is off.
Reviewed:
b8215555c0against468bb8d2ee: Read repository rules and the pull request template, the commit list, the shader and the relevant DLSS and frame-generation paths and diffs. Skimmed the recorded runs, generated SPIR-V and remaining changed tests and documentation; the large changed code files were not read in full. The adjacent Tooling rules and docs/review-checklist.md were absent.; nothing run (a code review).Checked and fine:
Testing: No commands from the project or tests were run. The author reports Windows NGX-enabled and Linux renderer builds, game-free checks, and RTX 5090 game runs; affected-GPU verification and Native HDR timing remain outstanding.
Overlaps and merge order: #2204 and #2831 touch the shared HUD gate; their merge order should account for this change.
Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.