fix(vk): wait for the native scene when switching to DLAA #2145
Closed
Arkex-ai wants to merge 1 commit from
Arkex-ai/dlss/native-transition-review-main into main
pull from: Arkex-ai/dlss/native-transition-review-main
merge into: MagicBeanDev:main
MagicBeanDev:main
MagicBeanDev:github/pr/2893
MagicBeanDev:github/pr/2890
MagicBeanDev:github/pr/2887
MagicBeanDev:github/pr/2878
MagicBeanDev:github/pr/2875
MagicBeanDev:github/pr/2874
MagicBeanDev:github/pr/2873
MagicBeanDev:github/pr/2871
MagicBeanDev:github/pr/2756
MagicBeanDev:github/pr/2897
MagicBeanDev:github/pr/2896
MagicBeanDev:github/pr/2718
MagicBeanDev:github/pr/2842
MagicBeanDev:github/pr/2691
MagicBeanDev:github/pr/2895
MagicBeanDev:github/pr/2743
MagicBeanDev:github/pr/2765
MagicBeanDev:github/pr/2708
MagicBeanDev:github/pr/2732
MagicBeanDev:github/pr/2755
MagicBeanDev:github/pr/2817
MagicBeanDev:github/pr/2876
MagicBeanDev:release-please--branches--main
MagicBeanDev:release-please--branches--main--release-notes
MagicBeanDev:github/pr/2778
MagicBeanDev:github/pr/2888
MagicBeanDev:github/pr/2866
MagicBeanDev:github/pr/2877
MagicBeanDev:github/pr/2800
MagicBeanDev:github/pr/2829
MagicBeanDev:github/pr/2850
MagicBeanDev:github/pr/2889
MagicBeanDev:github/pr/2882
MagicBeanDev:github/pr/2860
MagicBeanDev:github/pr/2849
MagicBeanDev:github/pr/2886
MagicBeanDev:github/pr/2794
MagicBeanDev:github/pr/2840
MagicBeanDev:github/pr/2830
MagicBeanDev:github/pr/2834
MagicBeanDev:github/pr/2719
MagicBeanDev:github/pr/2742
MagicBeanDev:github/pr/2741
MagicBeanDev:github/pr/2820
MagicBeanDev:github/pr/2771
MagicBeanDev:github/pr/2859
MagicBeanDev:github/pr/2858
MagicBeanDev:github/pr/2823
MagicBeanDev:github/pr/2757
MagicBeanDev:github/pr/2769
MagicBeanDev:github/pr/2844
MagicBeanDev:github/pr/2843
MagicBeanDev:github/pr/2673
MagicBeanDev:github/pr/2855
MagicBeanDev:github/pr/2739
MagicBeanDev:github/pr/2807
MagicBeanDev:github/pr/2851
MagicBeanDev:github/pr/2789
MagicBeanDev:github/pr/2814
MagicBeanDev:github/pr/2818
MagicBeanDev:github/pr/2774
MagicBeanDev:github/pr/2772
MagicBeanDev:github/pr/2750
MagicBeanDev:github/pr/2786
MagicBeanDev:github/pr/2785
MagicBeanDev:github/pr/2782
MagicBeanDev:github/pr/2779
MagicBeanDev:github/pr/2775
MagicBeanDev:github/pr/2706
MagicBeanDev:github/pr/2766
MagicBeanDev:github/pr/2747
MagicBeanDev:github/pr/2759
MagicBeanDev:github/pr/2745
MagicBeanDev:github/pr/2740
MagicBeanDev:github/pr/2733
MagicBeanDev:github/pr/2725
MagicBeanDev:github/pr/2727
MagicBeanDev:github/pr/2728
MagicBeanDev:github/pr/2729
MagicBeanDev:github/pr/2721
MagicBeanDev:github/pr/2722
MagicBeanDev:github/pr/2715
MagicBeanDev:github/pr/2714
MagicBeanDev:github/pr/2707
MagicBeanDev:github/pr/2703
MagicBeanDev:github/pr/2705
MagicBeanDev:github/pr/2697
MagicBeanDev:github/pr/2679
MagicBeanDev:github/pr/2676
MagicBeanDev:github/pr/2669
MagicBeanDev:docs/what-hookshot-connects-to
MagicBeanDev:fix/hdr-encode-test
MagicBeanDev:fix/main-tests
MagicBeanDev:fix/play-cache-files
MagicBeanDev:perf/game-barrier-order
MagicBeanDev:feat/heap-lazy
MagicBeanDev:feat/texture-detail
MagicBeanDev:perf/astc-opaque-bc1
MagicBeanDev:fix/fs-dir-lock
MagicBeanDev:fix/framegen-native-kept
MagicBeanDev:fix/update-no-downgrade
MagicBeanDev:port/k10-gcn-f16-mirrors
MagicBeanDev:fix/framegen-mult-cap
MagicBeanDev:chore/release-as-2.1.1
MagicBeanDev:perf/pcache-load-switch
MagicBeanDev:fix/prepare-progress-log
MagicBeanDev:fix/update-closes-stale-game
MagicBeanDev:fix/hdr-scaled-sampled
MagicBeanDev:perf/first-start-preset
MagicBeanDev:perf/zero-upload
MagicBeanDev:fix/vcore-escape-2s
MagicBeanDev:test/fake-gh-atomic
MagicBeanDev:perf/batch-idle-flush
MagicBeanDev:test/finish-stub-a
MagicBeanDev:chore/record-2.1.0
MagicBeanDev:fix/main-red-tests
MagicBeanDev:fix/test-display-startup-driver-cache
MagicBeanDev:feat/mesh-shader-mode
MagicBeanDev:fix/menu-probes-at-startup
MagicBeanDev:fix/fps-counter-classic
MagicBeanDev:fix/test-log-batch-flake
MagicBeanDev:fix/narrow-screen-hud
MagicBeanDev:ci/prereleases
MagicBeanDev:release/v2.0.15
MagicBeanDev:hotfix/v2.0.15
MagicBeanDev:fix/present-ahead-replay
MagicBeanDev:release/v2.0.13
MagicBeanDev:fix/bracket-paths-2013
MagicBeanDev:fix/hdr-overlays-2013
MagicBeanDev:fix/fps-counter-scale-2013
MagicBeanDev:fix/stick-seen-at-rest
MagicBeanDev:hotfix/menu-fits-screen
MagicBeanDev:fix/f1-always-opens-menu
MagicBeanDev:fix/ini-keep-lines
MagicBeanDev:claude/cranky-pike-7cf247
MagicBeanDev:perf/texture-answer-flat
MagicBeanDev:fix/stamp-test-modules
MagicBeanDev:fix/appimage-fonts
MagicBeanDev:fix/display-awake
MagicBeanDev:release/v2.0.12
MagicBeanDev:fix/discord-windows
MagicBeanDev:rc/v2.0.12-tests
MagicBeanDev:fix/dlss-keep-feature
MagicBeanDev:rc/v2.0.12
MagicBeanDev:button-icons
No reviewers
Labels
Clear labels
accessibility
Barrier affecting people with disabilities
autorelease: pending
autorelease: tagged
bug
Something isn't working
dependencies
Pull requests that update a dependency file
documentation
Improvements or additions to documentation
duplicate
This issue or pull request already exists
enhancement
New feature or request
github_actions
Pull requests that update GitHub Actions code
good first issue
Good for newcomers
help wanted
Extra attention is needed
invalid
This doesn't seem right
question
Further information is requested
testing wanted
wontfix
This will not be worked on
No labels
accessibility
autorelease: pending
autorelease: tagged
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
question
testing wanted
wontfix
Milestone
Clear milestone
No items
No milestone
Assignees
Clear assignees
No assignees
2 participants
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Hookshot!2145
Loading…
Reference in a new issue
No description provided.
Delete branch "Arkex-ai/dlss/native-transition-review-main"
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
Switching from scaled DLSS to Native (DLAA) can create an AA feature for a queued small scene, then recreate it when the native scene arrives. Keep DLSS for up to three scene frames during the transition; if the scene remains smaller than the output, log the fallback and use DLAA at that scene size. Fixes #2144.
Technical changes
Validation
Current head 278bea75, rebased on
51da0464:git diff --checkpasses. Gameplay was not rerun on this head.Earlier-head local evidence and limits
At 8c5ea102, the bounded-wait regression passes on Windows and Linux and fails on the rebased unbounded parent. Its temporal/DLSS/fixture input hashes are unchanged on the final head; the final follow-up adapts the FSR 3.1 callback signature.
Full suites at 8c5ea102: Windows 451 passed, 7 failed, 38 skipped; Linux 442 passed, 6 failed, 48 skipped. Subsequent controls reran the failed checks on candidate and clean
51da0464with the same configuration: Windows 4 passed, 3 failed on each, with matching failure signatures; Linux 6 passed, 0 failed on each. These partial reruns are not a replacement full-suite result.Earlier gameplay at 2ec8aa66 verified Performance-to-Native and return from inventory with one native DLAA feature creation. This predates the bounded-wait and HDR rebase changes. No universal stall reduction, other-GPU, Linux GPU, campaign or input-latency claim.
Thanks, the diagnosis is clear and the fix is small. On the question of stalls: there's no actual wait here, just a per-frame choice of which mode to draw with, made under the
s.mulocktemporal_upscalealready takes, with no new lock and nothing that blocks on the render thread. So I don't see a deadlock or a stalled frame. The feature-reuse change invk_dlss.cpp(native_aa/feature_aa) also looks right: the one recreation happens when the full-size scene arrives, and an already-DLAA feature is reused.One thing I'd like closed before this goes in (inline): the wait can latch for good. It only ends when
rw == ow && rh == oh, anddrawn_modestaysDLSSwhile it waits, so if the full-scale scene is ever smaller than the gameplay output, a DLSS -> DLAA switch keeps drawing DLSS indefinitely and nothing says so in the log. The native path clearly supports that case ("its picture then scaled to the output's by dlss_out.comp", and your fixture's startup case 5 draws DLAA at 1720x720 into 3440x1440). Bounding the wait by a few frames from the switch, plus a log line when it gives up, would make it safe whatever the sizes turn out to be.Overlaps: #2193 rewrites the mode selection right below the
whychain you add a line to, and #2118 touchestemporal_upscalenext to thepreparecall and thes.last_frame = nowline. Expect small textual conflicts with whichever merges first. I don't see a semantic clash: with #2193modeis still DLAA whenaa, sofeature_aakeeps working.CI is green on
99ad842e, and the new test is picked up byrun_all.pythroughRUN_ALL_ARGS.This only ends when the scene is exactly the output's size. Because
s.drawn_mode = draw_modestoresDLSSwhile waiting,entering_dlaastays true on the next frame, so the wait has no other way out. If the full-scale scene is smaller than the output (a case the native path handles, see fixture case 5), DLAA never engages after a switch from DLSS, while starting directly in DLAA would use it. Could you cap it, e.g. record the frame the switch was first seen and stop waiting after 2 or 3 frames, with alogfwhen it gives up? A fixture step for 'DLSS -> DLAA where the scene stays below the output' would cover it.Needs a rebase: there are three conflicts in
vk_dlss.cppwith #2342 (s.feature_hdragainsts.feature_aa). Keep both:s.feature_hdr == hdr && (!native_aa || s.feature_aa).tests/test_dlss_native_transition.pycuts that condition out by text, so it will need stubs forhdr/s.feature_hdr.The earlier blocking point is unfixed:
waiting_for_native(vk_temporal.cpp:883) only ends when the render size equals the output size, anddrawn_modestays DLSS while it waits (:1000). If the full-scale scene is ever smaller than the output, DLAA never takes effect and nothing is logged. Please cap the wait at a few frames and log when it gives up.Fixed in 278bea75: the transition now allows three texture frames, then logs the fallback and uses DLAA at the available scene size. Same-frame calls do not consume the budget, and cancelling/re-entering starts a fresh budget. The permanently undersized-scene regression fails without the bound and passes with it on Windows/Linux.
Rebased on
51da0464, preserving bothfeature_hdr == hdrand native-AA reuse checks, with HDR on/off coverage in the fixture. FSR 3.1/4 internal callbacks are adapted too. The NVIDIA-enabled backend links and the focused suite passes; exact-head CI is running.github-sync referenced this pull request2026-11-12 16:54:48 +00:00