fix(vk): resolve DLSS permanent failure latching and improve dynamic resolution handling #2574
No reviewers
Labels
No labels
accessibility
autorelease: pending
autorelease: tagged
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
question
testing wanted
wontfix
No milestone
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Hookshot!2574
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/dlss-dynamic-res-and-recovery"
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
This PR addresses several issues in the Vulkan temporal upscaler pipeline (
vk_temporal.cpp,vk_dlss.cpp,vk_menu.cpp,dlss_checks.h) where NVIDIA DLSS would either fail to instantiate during dynamic resolution scaling (DRS) or permanently latch into a disabled state (engine.failed = true), silently falling back to bilinear upscaling without any user-facing recovery path.Problem Description & Root Causes
Permanent Failure Latching in
vk_temporal.cpp:vk_temporal.cppunconditionally setsengine.failed = true.temporal_upscale()perpetually rejects all future frames with"it failed earlier".Off-by-One Rejection in
dlss_checks.h:scene_size_fits(),(uint64_t)w * 3 >= owfails for fractional roundings at 33% Ultra Performance scaling (e.g.,853 \times 3 = 2559 < 2560).retryflag leftfalsefor DLSS invk_dlss.cpp:TemporalEnginecontains aretryboolean intended for transient evaluation drops. Setting this totrueallows DLSS to retry on subsequent frames if a single frame evaluation fails, rather than permanently falling back.Changes
gpu/vk/dlss_checks.h:scene_size_fits()to(uint64_t)(w + 2) * 3 >= ow && (uint64_t)(h + 2) * 3 >= ohto safely handle rounding in fractional 3x downscaling.gpu/vk/vk_dlss.cpp:retry = trueinTemporalEngine kEnginefor DLSS to ensure transient evaluation failures reset history on the next frame instead of shutting down the engine permanently.gpu/vk/vk_temporal.h&gpu/vk/vk_temporal.cpp:void temporal_reset_failure()to clearengine.failedacross active engines, resets.reason, and allow clean reinitialization.gpu/vk/vk_menu.cpp:temporal_reset_failure()intoset_row()when modifyingopts.dlss,opts.resolution, oropts.dlss_model. Modifying scaling settings in the Insert menu now cleanly clears previous errors and hot-reloads the upscaler.Verification
nvngx_dlss.dll(v310.9.16).github-sync referenced this pull request2026-11-12 06:22:54 +00:00