Choose FSR 4.1 or a built-in FSR 3.1 from one Insert menu row #871

Closed
N3oTraX wants to merge 28 commits from linux/fsr3-fallback into main
N3oTraX commented 2026-11-08 23:41:56 +00:00 (Migrated from github.com)

One Insert menu row chooses the upscaler: Off, Auto, FSR 4.1, FSR 3.1, changed at once while playing. FSR 3.1 needs no external library, so cards and systems without FSR 4 still get a temporal upscaler.

Stacked on hookshot-amd#2 (the Linux port, on the current #828, which sits on #849 and #850) and including #822 (with #821) at 2008ac7. GitHub shows all of those commits until they land; the last two commits are new here, plus the merge of #822.

What changed

  • FSR 3.1 runs on the inputs #828 already builds: the same colour, depth, camera motion and jitter, with no second input path.
  • The passes are recompiled for those inputs instead of converting them: HDR_COLOR_INPUT=0, INVERTED_DEPTH=0, low-resolution motion, not jittered. Near, far and field of view come from the camera used for the motion. tests/test_fsr3_shaders.py pins the options.
  • Menu: the AMD FSR 4.1 row becomes FSR upscaler. Auto takes FSR 4.1 when the library is present with a model for the card, else FSR 3.1, else the game's upscale. The row shows the engine in use, and why a forced choice cannot run. If FSR 4.1 fails in play, FSR 3.1 takes over.
  • Compatibility: RX_FSR4=0/1 and fsr4= still read as Off and Auto. New: RX_UPSCALER=off|auto|fsr4|fsr3 and upscaler=.
  • Fixes to #822 found on the way:
    • images of an old size were destroyed while work in flight could still use them, and the new ones stayed UNDEFINED;
    • the no-wave pyramids were never selected;
    • hos_oot_camera and hos_oot_view_projection are weak, so the renderer still loads with a host built without them.

One conflict with #822, in the network dispatch log in vk_draw.cpp: both behaviours are kept.

How it was tested

GPU, driver RX 7900 XTX (RDNA3), RADV Mesa 26.2.6
System Linux 7.3.1, Hyprland
Game v131072, build e0f3ccfa, Ultrawide on
Result FSR 4.1.1 INT8 and FSR 3.1 each drew 5120x2160 -> 5120x2160, switched live several times from the menu. FSR 3.1 reported camera near 0.100 far 25040.7, and all 11 passes were created. No crash or device lost in the log
Checks tests/test_fsr3_shaders.py: 11 modules valid with spirv-val. tests/run_all.py fsr menu upscale resolution: 7 passed, 1 skipped (test_upscale_contract, no Vulkan headers found; passes by hand). Full suite: 98 passed, 13 skipped, 1 failed (test_mem_trim, which fails the same way on the commit below this work)

Image quality was not compared and fps was not measured.

Run again after the rebase (6095c4d, full game rebuilt): same GPU and driver, FSR 4.1.1 INT8 and FSR 3.1 each drew 5120x2160 -> 5120x2160, switched live several times from the menu, no crash or device lost in the log.

The run used RX_VK_NO_WARM=1, RX_VK_NO_PREDICT=1 and RX_VK_PRECOMPILE=0 because of #803, and RX_VK_ANISO=16.

Not tested

  • RDNA2 and RDNA4, and the real FSR 4.1 failure path to FSR 3.1.
  • Windows: not compiled or run here, including the weak symbols.
  • The earlier RX_VK_FSR=1 route now runs on the same LDR shaders and was not revalidated.

🤖 Generated with Claude Code

One Insert menu row chooses the upscaler: **Off, Auto, FSR 4.1, FSR 3.1**, changed at once while playing. FSR 3.1 needs no external library, so cards and systems without FSR 4 still get a temporal upscaler. > **Stacked on [hookshot-amd#2](https://github.com/madebyjordan/hookshot-amd/pull/2)** (the Linux port, on the current #828, which sits on #849 and #850) and including #822 (with #821) at `2008ac7`. GitHub shows all of those commits until they land; the last two commits are new here, plus the merge of #822. ## What changed - **FSR 3.1 runs on the inputs #828 already builds:** the same colour, depth, camera motion and jitter, with no second input path. - **The passes are recompiled for those inputs** instead of converting them: `HDR_COLOR_INPUT=0`, `INVERTED_DEPTH=0`, low-resolution motion, not jittered. Near, far and field of view come from the camera used for the motion. `tests/test_fsr3_shaders.py` pins the options. - **Menu:** the `AMD FSR 4.1` row becomes `FSR upscaler`. Auto takes FSR 4.1 when the library is present with a model for the card, else FSR 3.1, else the game's upscale. The row shows the engine in use, and why a forced choice cannot run. If FSR 4.1 fails in play, FSR 3.1 takes over. - **Compatibility:** `RX_FSR4=0/1` and `fsr4=` still read as Off and Auto. New: `RX_UPSCALER=off|auto|fsr4|fsr3` and `upscaler=`. - **Fixes to #822 found on the way:** - images of an old size were destroyed while work in flight could still use them, and the new ones stayed `UNDEFINED`; - the no-wave pyramids were never selected; - `hos_oot_camera` and `hos_oot_view_projection` are weak, so the renderer still loads with a host built without them. One conflict with #822, in the network dispatch log in `vk_draw.cpp`: both behaviours are kept. ## How it was tested | | | |---|---| | GPU, driver | RX 7900 XTX (RDNA3), RADV Mesa 26.2.6 | | System | Linux 7.3.1, Hyprland | | Game | v131072, build `e0f3ccfa`, Ultrawide on | | Result | FSR 4.1.1 INT8 and FSR 3.1 each drew `5120x2160 -> 5120x2160`, switched live several times from the menu. FSR 3.1 reported `camera near 0.100 far 25040.7`, and all 11 passes were created. No crash or device lost in the log | | Checks | `tests/test_fsr3_shaders.py`: 11 modules valid with `spirv-val`. `tests/run_all.py fsr menu upscale resolution`: 7 passed, 1 skipped (`test_upscale_contract`, no Vulkan headers found; passes by hand). Full suite: 98 passed, 13 skipped, 1 failed (`test_mem_trim`, which fails the same way on the commit below this work) | **Image quality was not compared and fps was not measured.** **Run again after the rebase (`6095c4d`, full game rebuilt):** same GPU and driver, FSR 4.1.1 INT8 and FSR 3.1 each drew `5120x2160 -> 5120x2160`, switched live several times from the menu, no crash or device lost in the log. The run used `RX_VK_NO_WARM=1`, `RX_VK_NO_PREDICT=1` and `RX_VK_PRECOMPILE=0` because of #803, and `RX_VK_ANISO=16`. ## Not tested - RDNA2 and RDNA4, and the real FSR 4.1 failure path to FSR 3.1. - Windows: not compiled or run here, including the weak symbols. - The earlier `RX_VK_FSR=1` route now runs on the same LDR shaders and was not revalidated. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
NotRexed commented 2026-11-09 05:30:45 +00:00 (Migrated from github.com)

Thank you! This is stacked on #857 (closed), #828, #822 and #821, and conflicts with main. Closing to keep the queue clear — please rebase on current main and reopen; thanks! As separate, smaller PRs if possible.

Thank you! This is stacked on #857 (closed), #828, #822 and #821, and conflicts with main. Closing to keep the queue clear — please rebase on current main and reopen; thanks! As separate, smaller PRs if possible.
N3oTraX commented 2026-11-09 08:03:03 +00:00 (Migrated from github.com)

Thank you! This is stacked on #857 (closed), #828, #822 and #821, and conflicts with main. Closing to keep the queue clear — please rebase on current main and reopen; thanks! As separate, smaller PRs if possible.

I will build a rebased PR during this day. Thanks for your feedback.

> Thank you! This is stacked on #857 (closed), #828, #822 and #821, and conflicts with main. Closing to keep the queue clear — please rebase on current main and reopen; thanks! As separate, smaller PRs if possible. I will build a rebased PR during this day. Thanks for your feedback.
N3oTraX commented 2026-11-09 11:17:52 +00:00 (Migrated from github.com)

@NotRexed Done ! On top of 2.0.7.

@NotRexed Done ! On top of 2.0.7.
Commenting is not possible because the repository is archived.
No description provided.