fix(vk): support PsychoV35 HDR with DLSS and NVIDIA frame generation #108
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/upscaling
good first issue
gpu/amd
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/steam-deck
platform/windows
priority
critical
priority
high
priority
low
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
testing wanted
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!108
Loading…
Reference in a new issue
No description provided.
Delete branch "futondestroyer/Longshot:codex/psychov35-dlss-hdr"
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?
Why
Selecting PsychoV35 with Native HDR silently leaves DLSS/DLAA and NVIDIA frame generation using the game's fallback methods. The scene and network output become RGBA16F, which the temporal chain currently rejects.
What changed
f1d654ce6f841fd4ce5bcbbe8900629a5394e484, by nooblikejagger, to Longshot.Flags and settings
RX_VK_PSYCHOV35_DLSS=1The existing
RX_VK_DLSS_HDR=0comparison override prevents this route, which requires an HDR feature. Upscaler Off with PsychoV35 still falls back to the game's network; supporting that existing limitation is outside this DLSS fix.Measurements
main:
b9cdc432(2026-11-12)this PR: codex/psychov35-dlss-hdr @
d22f0a4eBaseline: measured port @
d4a69456, source 878c957c, switch off.The same renderer was used with the switch off/on to isolate the format-policy change. Off retains main's packed-only rejection. The host was unchanged
7afe6ae1, versionv2.1.0-rc.3-328-g7afe6ae1 (source 7cfff061). These are the builds actually measured, not a claim that the rebased binary was measured. The last rebase from2a2da67ftob9cdc432changes only CI workflows and CONTRIBUTING.md; no runtime, renderer or test code changed, so the existing validation still applies. On the2a2da67fbase, the renderer rebuilt with NGX (207 files, zero failures; source 4255c3b1), the four focused checks pass, and the complete suite was rerun as recorded below.Hardware: RTX 4070 12 GB, NVIDIA 621.01, i7-13700F, 32 GB RAM, Windows 11 Home build 26300.
Scene: copied child Hyrule Field save outside Lon Lon Ranch, 2560x1440 output, DLSS Quality 1707x960, preset K, sharpness 0, Native HDR PsychoV35, paper white 200 / peak 400 nits, NVIDIA FG 2x.
Method: cold starts on/off/off/on, 30 seconds standing after settling per run. Counts below are repeated complete 600-frame gameplay reporting intervals, excluding title/loading intervals. They are correctness measurements, not FPS claims. The median of both off runs is 0 made FG sets and both on runs is 600.
How to reproduce: start cold in Native HDR + PsychoV35 with DLSS or DLAA, a locally installed NGX SDK/runtime and a supported fixed NVIDIA FG multiplier. Compare
RX_VK_PSYCHOV35_DLSS=0and=1; verify actual engine/FG counts in the log, not just the selected menu rows.d4a69456, source 878c957c, switch offd4a69456, source 878c957c, switch onA further DLAA cold start at 2560x1440 also repeatedly reports 600/600 DLAA evaluations and NVIDIA FG sets. Live Vanilla/PsychoV35 changes recover with history resets. The player visually tested the build and reported it working well. This PR makes no DLSS performance-optimization claim.
Testing
Tested: renderer built with llvm-mingw and NGX: 207 translation units, zero compiler failures. Four focused checks (
test_psychov35_dlss,test_temporal_history,test_hdr_encode,test_reactive_mask) pass on the rebased branch. The new fixture compiles the real format policy and exercises 3,670,016 combinations, history transitions, HDR guards, typed output, consistent consumers and the FG input handoff. It fails on the original source. The packed shader regenerates byte-for-byte identically. Hyrule Field cold-start and tone-mapper-switch results are above; local screenshots were reviewed and the player supplied the HDR visual assessment.Refreshed complete suite on this rebased branch: 492 passed, 4 failed, 35 skipped (bundled Python, llvm-mingw,
--jobs 6 --timeout 180). All four failures also reproduce on unchanged current main2a2da67f:nx2/test_nup_paths.py(Windows symlink privilege),tests/test_check_third_party.py(Windows output handling),tests/test_setup_runtime.py(Windows path handling), andtests/test_release.py(missing OpenSSL and Windows newlines). No test was weakened or skipped to obtain this result. This is not a clean full-suite pass.Not tested: Linux; other NVIDIA GPUs/drivers; live DLSS/DLAA switching (the bridge cannot select the Native step); optional reactive-mask runtime behaviour. No controlled FPS improvement, broad HDR-tracking fix or default-on rollout is claimed.
Needs other testers:
Both test requests are posted and await a maintainer's
testing wantedlabel before testers can claim them; the author is not an upstream collaborator.Screenshots
Same Hyrule Field save and viewpoint; measured port @
d4a69456, source 878c957c. These are raw HDR PQ screenshots, so an SDR viewer cannot judge absolute HDR brightness. The screenshots are hosted on a dedicated branch of the author's fork and do not enter this PR's code diff.Risk and rollback
The new path runs only when explicitly enabled with Native HDR, PsychoV35 and DLSS/DLAA. Unusual scene/view combinations, colour encoding and history transitions are the risks; keep existing camera/depth/size/generation/age checks and fall back if an HDR feature is unavailable.
RX_VK_PSYCHOV35_DLSS=0restores the packed-only behaviour. FSR/TAAU/Off support is deliberately left for separate work.Reviewer notes
Start with
temporal_scene_format,temporal_colour_pairand the HDR feature guard/output selection invk_temporal.cpp, then view binding invk_draw.cpp. Storage precision must not remove the network's perceptual-to-linear decode. Related Hookshot context: #2481 introduced the deliberate format gate, #2243 established native-HDR linear input/output, and merged #2118 supplies the NGX FG input handoff.Issues
Related upstream: https://github.com/NotRexed/Hookshot/pull/2707 and https://github.com/NotRexed/Hookshot/pull/2481.
Checklist
For everyone
type(scope): description).main.python -I -B tests/run_all.pyrun and passing (any failure that also fails onmainis named above).third_party/untouched (a new folder with aPROVENANCE.mdinstead).If applicable
Assisted-by:/Co-Authored-By:trailers.docs/tested-configurations.mdfor each measured run.mainand passing here.tests/that reads changed source updated in this PR, not weakened.6a4215c820d22f0a4e8aRebased onto
b9cdc432(the additional commit changes CI workflows and CONTRIBUTING only; runtime/renderer/tests unchanged). Added the refreshed 492-pass / 4-baseline-failure / 35-skip suite result, successful NGX renderer rebuild, paired screenshots, and test requests T-TTAF/T-TU8K. The PR remains limited to the opt-in PsychoV35 compatibility fix; DLSS/DLAA performance investigation is paused and excluded. No merge is requested from automation; maintainers will review and merge.WIP: fix(vk): support PsychoV35 HDR with DLSS and NVIDIA frame generationto fix(vk): support PsychoV35 HDR with DLSS and NVIDIA frame generationRead through the code change, rebuilt both SPIR-V headers and ran the suite on an export of this branch. I didn't find a bug that blocks the opt-in path. The gate is narrow:
enabledis checked first, so nobody pays for it on the default path. FSR 3.1, TAAU and Off still reject RGBA16F (fsr3_upscaleandstretchkeep their own B10G11R11 checks).scene_tonemap_on()already requires Native HDR. The reactive copy remakes its image when the format changes.What I checked:
dlss_out_rgba_comp_spv.hregenerates byte-for-byte with glslang 16.6.0 (-V --target-env vulkan1.3 -DDLSS_RGBA16F=1), and the SHA-256 in its first line matchesdlss_out.comp.dlss_out_comp_spv.halso still regenerates identically from the changed source.vk_api.h, the translator orShader::Info, so no API bump or cache invalidation is needed.test_hdr_encode.pyandtest_reactive_mask.pyreplace the old strings with the new ones. Neither check is weakened.main(6c904189, docs only, AGENTS.md). No conflict, but rebase before merge.python -I -B tests/run_all.pyon Linux (export of this branch, no Vulkan headers): 451 passed, 11 failed, 69 skipped. The 11 failures are this PC's environment and fail onmainthe same way (test_linux_update, byte-compile, test_bake_portability, test_builder_log_read_only, test_program_cache_cleanup, test_check_third_party, test_control, test_longshot_ctl, test_longshot_launch, test_program_cache_one_variant, test_vram_budget_row). The checks this PR touches pass here too: test_psychov35_dlss, test_psychov35, test_hdr_encode, test_reactive_mask, test_temporal_history and test_dlss_actor. So the new fixture also builds with g++ on Linux.What I'd still want before merge:
temporal_upscalefor everyone, not only behind the switch. Known networks now get an input-format check they didn't have before, and the history-reset block and its log line run for every DLSS/DLAA/FSR 4 user (inline comment). The measurements only cover PsychoV35 with the switch off and on, so nothing shows Vanilla (SDR or HDR) with DLSS and FSR 4 still drawing their upscale. One short before/after of Vanilla + DLSS would cover it.d4a69456, source 878c957c", which is older than the base. The Measured box asks for main and this PR at named commits. For a correctness fix like this, a cold start at the PR head with the switch on, showing the same600 made by DLSS-G/NVIDIA DLSS: 600 frames drawnlines, would close that gap.testing wantedlabel to be picked up). That's fine while the switch stays opt-in, as the PR proposes.@ -970,1 +1008,4 @@if (ready == 0) return fail(why ? why : "not this frame");if (psycho && (!engine.e->hdr || !engine.e->hdr()))return fail("PsychoV35 waits for the native HDR DLSS feature");if (s.psycho_last != psycho || s.history_input != in->format) {This block runs on every path, not just the PsychoV35 one.
history_inputstarts asVK_FORMAT_UNDEFINED, so the first successful evaluation for every DLSS/DLAA/FSR 4 user (switch unset, Vanilla, SDR) logsvk: PsychoV35 DLSS: disabled; scene format 122, network input 122, output 122; HDR linear input/output. That line is wrong on an SDR or FSR 4 run, and it will confuse anyone reading a log for an unrelated bug. The reset itself does no harm there, sincelast_frameis already 0. With the switch on and a packed scene it also says "enabled ... HDR linear input/output" while the colour goes through the packedout_hdrroute. Suggestion: log only when the switch is on (or whenpsychoor the RGBA16F format is involved on either side of the change), and print the real route (rgba) rather than a fixed "HDR linear input/output".@ -0,0 +128,4 @@import mathprep=(ROOT/'gpu/vk/shaders/dlss_prep.comp').read_text()assert 'kSquare ? e * e : e' in prepfor linear in (0.0, 0.001, 0.02, 0.18, 0.5, 1.0, 2.0, 6.5):Nit: this loop checks that
sqrt(x)**2 == xin Python, which is always true and doesn't exercise anything in the shader or the C++. The string check above it (kSquare ? e * e : e) is what actually guards the decode. I'd drop the loop, or replace it with a check thatmake_pipelinesstill givesprep_hdrkSquareon (prep_hdr_data{16384.0f, VK_TRUE}is already asserted, so dropping it is enough).View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.