WIP: fix(vk): support PsychoV35 with FSR 3.1 frame generation #605
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/upscaling
beanstalk: approved @ 1697603
beanstalk: approved @ 2c5a62e
beanstalk: approved @ 4fd82b7
beanstalk: approved @ 64d6d09
beanstalk: approved @ 6f91fae
beanstalk: approved @ 70a78f9
beanstalk: approved @ 8d361dc
beanstalk: approved @ 9d8356e
beanstalk: approved @ abf2227
beanstalk: approved @ d82f202
beanstalk: approved @ e5f1e40
beanstalk: approved @ ee8ab5f
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
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
testing wanted
ci: approved
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!605
Loading…
Reference in a new issue
No description provided.
Delete branch "futondestroyer/Longshot:codex/psychov35-fsr3-fg"
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?
Type: fix · Risk: medium · Tested on: Windows, RTX 4070 · Needs: Linux renderer build; AMD Native HDR gameplay
Why
Native HDR PsychoV35 can leave FSR 3.1 frame generation without scene inputs, silently using the renderer's own interpolation. Where AMD generation already runs, its constant blocks still treat the captured native-PQ picture as sRGB.
Related compatibility context: #226 . This is separate from the general camera/transition flicker investigation at #344 and does not close it.
How to reproduce
Seen on: Windows kernel 26300 / 26H2, RTX 4070 12 GB, NVIDIA 621.01.
Settings and switches: Native HDR, PsychoV35, FSR 3.1 at 67%, Frame generation 2x;
RX_VK_FSR_FG=1andRX_VK_PSYCHOV35_DLSS=1. Disable NVIDIA FG to isolate AMD generation.Steps: At the daylight Lon Lon Ranch alley, start cold, change render resolution 67/83/100%, switch Vanilla HDR/SDR and back, then FG Off/on. Compare actual
fsr3ficounts, not the selected menu row.Expected: Valid matching PsychoV35 buffers supply AMD depth/motion; both AMD backends decode the actual present encoding, resetting history when it changes.
Actual: At 67% and on returning to it the original records 0/600 AMD-made frames and 600 missing-input fallbacks. At 83/100% it already generates frames, but native HDR still receives sRGB transfer metadata.
What changed
Accept the independent frame-generation inputs with matching PsychoV35 views and describe the captured present's colour correctly. Preserve the existing midpoint-only, opt-in behavior and fallback on reset/unusable frames.
vk_fsr3_inputs: narrow RGBA16F admission to Native PsychoV35, the existing compatibility opt-in, FSR generation requested and the 2x row. Reject mixed/unsupported network pairs, retain camera/size/depth guards, and reset input history on format or tone changes. The new RGBA preparation is not enabled for Off, Auto or 3x+.vk_draw/vk_fsr3: bind matching sampled/storage views in translated and rejected-network routes. Preparing FG inputs still leaves the selected upscaler to perform the upscale; this does not enable the legacy FSR upscaler.vk_replay/vk_framegen: snapshot the actual native-PQ flag into both presentation paths and pass the HDR peak with the captured colour. UNORM storage alone does not imply sRGB encoding.vk_fsr3fi: set both interpolation and optical-flow transfer/luminance fields together; native PQ uses transfer 1 and the selected peak in nits, SDR retains transfer 0 and its unused 0..1 range. Validate HDR luminance and reset colour history on encoding/peak changes. This also corrects Vanilla Native HDR metadata.Measurements
Verdict: Both interleaved pairs fix the 67% PsychoV35 input fallback, including tone/FG returns. Every fixed settled FG-on interval is 600/600 AMD-made with 0 missing-input fallbacks. Existing 83/100% and Vanilla generation stays active; PQ/sRGB and 800/1000-nit metadata changes are logged correctly. No performance or calibrated HDR gain is claimed.
main:
82886e89(2026-11-14)this PR: codex/psychov35-fsr3-fg @
324e7a6a(codef072407f, measured records and test tightening on top)Baseline: Before: development base @
514591a3, PR400 matcher + FSR upscaling fixe7efc7c8, original FG. This isolates FG over the agreed unchanged base rather than building a new full game.Hardware: Windows kernel 26300 / 26H2; RTX 4070 12 GB, NVIDIA 621.01; i7-13700F, 32 GB RAM.
Scene: Lon Lon Ranch daylight alley, fresh copied checkpoint per process. 2560x1440 output, 2560x1421 client; Native HDR paper white 200, peak 1000 nits (800 at 83%); Vanilla SDR control; FSR upscaling, FG 2x/Off/on, provider Built-in with NVIDIA FG disabled, sharpness 0, cap 61.
Method: original/fixed/original/fixed, runs a3/b3/a4/b4. Eight phases each advance at least 1250 presents; report the last complete 600-request AMD generation interval in each phase. Actual options, stable play, native PQ/SDR presentation and errors are checked. These are normal deferred-presentation runs without made-frame capture overhead. World time/animation were not frozen.
How to reproduce: use the settings above, compare the same checkpoint with/without this isolated FG patch, and repeat the eight phases below. To exercise FSR upscaling plus FG, include the separate upscaling fix #536 in both arms, as these runs do. This PR alone does not supply that upscaler fix.
514591a3, PR400 + FSR upscalinge7efc7c8, original FGf072407f, same development base and common fixesBoth original 67% failure intervals report 600 missing inputs; all fixed settled FG-on intervals report 0. All four processes exit normally. Eleven changed production functions and both presentation-call arguments match the measured pack byte-for-byte; its unchanged pipeline creation wrappers remain those of the shared base. The same host, common matcher/upscaler and identical private diagnostics are used in both arms. No shared base or normal installation was changed.
Two additional original/fixed capture processes use the existing
RX_VK_SHOT_MADE=1inline path, one PNG pair every 120 presents, with 12 seconds settling, right-stick +0.25 for 120 frames, -0.25 for 120 frames, and a 12-second return hold. Each produces 23 made-frame PNGs and exits normally. Capture/readback adds hitches/reset fallbacks: the fixed capture's last interval is 595/600 with 0 missing inputs, separate from the normal-path 600/600 measurements. Selected still/moving generated frames show a visible scene without all-black output or obvious global colour corruption; they are not full temporal-quality or HDR-calibration proof. An earlier incomplete harness attempt stopped because HDR Off hides tone-map controls; it was corrected, retained locally and excluded from the four measured runs.Flags and settings
No new switch or menu default; existing FSR generation and PsychoV35 compatibility opt-ins remain off.
RX_VK_PSYCHOV35_DLSSRX_VK_FSR_FGRX_VK_DLSS_FG=0Put opt-ins in
longshot_env.txtbesidelongshot.exeand restart. A menu selection alone does not confirm AMD generation; inspect the log counts.Testing
Tested: actual current-source Windows renderer compiles/links, including the final 2x guard; isolated pack builds and all measured functions match. Six original/fixed game processes cover normal and inline capture paths, settings transitions and camera motion as above. New regression fails unchanged main at actual RGBA camera admission and passes here; it also checks both SDK constant blocks and their offsets, invalid HDR peaks, encoding/peak/sequence resets, flag-off and unsupported multipliers. Existing history, crop/flag forwarding and uniform-ownership checks pass. Six measured-run records are included.
Final full game-free suite (same optional-SDK environment in both arms): 532 passed, 12 failed, 34 skipped in 119 s (windows, 24 at once) here versus 531 passed, 12 failed, 34 skipped in 122 s (windows, 24 at once) on clean main82886e89. The same failures occur on both:
tests/test_appimage_player_build.py,tests/test_cpm_discovery.py,tests/test_env_on.py,tests/test_lift_cleanup_error.py,tests/test_linux_preflight.py,tests/test_make_game_cache.py,tests/test_oot_state_tap.py,tests/test_readback_late.py,tests/test_release.py,tests/test_tested_configurations.py,tests/test_vram_budget_row.py,tests/test_walk_key.py. No PR-only failure. The six run fragments pass the repository-format check. Renderer builds use the locally installed NGX SDK separately; that optional runtime is not required for AMD FG.Not tested: Linux compiler/runtime, AMD/Intel hardware, other drivers/scenes, calibrated HDR luminance, extended play or a complete temporal-quality assessment. The moving captures retain the pre-existing limitations of camera-only motion and no HUD-less colour; no general flicker, HUD-smear, actor-ghosting or performance fix is claimed. The separate FSR upscaler fix is common to the game comparison, not part of this PR.
Must be tested:
psychov35_fsr3_fg,temporal_history,present_source_crop,fsr_uniform_ownership,upscaler_rowsand FSR math fixtures, expecting compile success and relevant checks passing (Test Farm: @Beanstalk Linux renderer build and focused FSR FG fixtures; manual request T-QSGE, awaiting maintainer enablement).Screenshots
Generated-frame captures from the same copied ranch checkpoint and scripted camera sweep, Native HDR PsychoV35 at67%, FG2x. Both arms use development base514591a3, the common PR400 matcher and FSR upscaling fix
e7efc7c8. These are unmodified PNGs, not frame-locked or calibrated HDR comparisons. Normal-path generation counts are reported separately in the description; inline capture can add reset/hitch fallbacks. Existing HUD/actor artifacts can remain.Before: development base @
514591a3, common fixes, original FG — built-in fallbackAfter: this PR @
f072407f, same base/common fixes — fixed run with AMD generation activeRisks
What could break: incorrect view typing or colour metadata could corrupt interpolation, and stale history could flash after a switch. Matching views/pairs, luminance checks and explicit history resets guard those cases. Native HDR metadata changes for Vanilla too; wider GPU/OS/HDR validation is still needed.
Turning it off:
RX_VK_FSR_FG=0restores the renderer's existing generation path.RX_VK_PSYCHOV35_DLSS=0disables new PsychoV35 input admission; it does not undo the Vanilla native-PQ metadata correction. Reverting the commit restores all prior behavior.Compatibility: no save/option schema, public
MkwVkHost/MkwVkRendererABI, SDK binary, shader source/SPIR-V or cache-format change. Only internal FG interfaces and constants change; noMKWVK_API_VERSIONbump is required. Both environment defaults and menu defaults are unchanged.Reviewer notes
Validated base82886e89; latest main advanced to2b1d38c6 during testing, and a final read-only merge-tree check is clean. The measurements remain on their named development base; no runtime result on the newer main is claimed.
Start with
fsr3_inputs::scene_formatand the matching-view callers, then inspect both presentation paths andcolour_constants. The latter writes the runtime fields documented in AMD's frame-interpolation guide; the vendored GLSL decodes PQ for transfer 1 and uses the maximum in nits. Storage precision does not determine encoding. No vendored code was changed.This is independent of the shared upscaler's HDR engine registration. It may be reviewed separately; the intended FSR-upscaling-plus-FG combination needs the separate upscaler fix too. Keep the measured-base qualification and the normal-path versus capture-path results distinct.
Issues
See #344 (separate general flicker remains open).
Related upscaling: #536 . Other independent paths: #527 and #528 . Common matcher: #400 .
Checklist
Everyone
type(scope): description) of the status line's type.main.python -I -B tests/run_all.pypasses (any failure that also fails onmainis named).third_party/untouched (a new folder with aPROVENANCE.mdinstead).When it applies
Assisted-by:/Co-Authored-By:trailers.docs/tested/for each new measured run (format indocs/tested-configurations.md).mainand passing here.tests/that reads changed source updated in this PR, not weakened.Generated-frame captures from the same copied ranch checkpoint and scripted camera sweep, Native HDR PsychoV35 at67%, FG2x. Both arms use development base514591a3, the common PR400 matcher and FSR upscaling fix
e7efc7c8. These are unmodified PNGs, not frame-locked or calibrated HDR comparisons. Normal-path generation counts are reported separately in the description; inline capture can add reset/hitch fallbacks. Existing HUD/actor artifacts can remain.Before: development base @
514591a3, common fixes, original FG — built-in fallbackAfter: this PR @
f072407f, same base/common fixes — fixed run with AMD generation activeCompleted two interleaved original/fixed game pairs, all eight setting phases and two separate camera-motion/generated-frame capture runs; four screenshots and six run records are included. Every fixed settled FG-on interval is 600/600 AMD-made with zero missing inputs. Original 83/100 percent already generated frames; the description preserves that result and distinguishes the native-PQ metadata correction. Final suite: 532 passed, the same12 failures as clean main,34 skipped; actual Windows renderer builds. Linux T-QSGE and AMD HDR T-2X6G await maintainer testing-wanted enablement. @Beanstalk Please build current head324e7a6a on Linux using the documented renderer-only workflow and run psychov35_fsr3_fg, temporal_history, present_source_crop, fsr_uniform_ownership, upscaler_rows and fsr3_math; expect successful compilation and all relevant fixtures passing. Publish exact tested commit, compiler/OS and safe results; no game/build artifacts. No default rollout or PR merge.
@futondestroyer only members of
BigBeanscan start the farm. One of them can approve this request by reacting 👍 to it.Closing: this change is already on main through #608, which took it together with the other PsychoV35 changes and turned the compatibility path on by default. Rebased onto main, what is left of this branch is its earlier opt-in form (
RX_VK_PSYCHOV35_DLSS=1), which would undo 608's default, so there is nothing more to merge. Thanks!Pull request closed