Repository navigation
AMD FSR 4.1 as a second upscaler engine, on #841's frame chain - #1008
Conversation
ffd25be to
322e690
Compare
322e690 to
b9ce469
Compare
050fc55 to
d76e877
Compare
|
Thanks for the careful read, and for checking the move against your originals. All three are addressed in the new commit:
A second pass turned up a few small things, fixed in the same commit:
Also rebased on current |
d76e877 to
514bd35
Compare
d0f32d6 to
edb090d
Compare
* build(vk): vendor AMD's FSR 3.1 passes and the script that compiles them The first part of #822, split out as asked: AMD's FidelityFX SDK GPU sources for the FSR 3.1 upscaler, frame interpolation and optical flow, and scripts/fsr3_shaders.py, which compiles them into gpu/vk/shaders like every other shader there. Nothing in the renderer uses them yet; the backend that records these passes is a later, separate PR. - third_party/fidelityfx-sdk: 76 files from FidelityFX SDK v1.1.4 (commit c6efa6bf), unmodified, MIT, with PROVENANCE.md saying what each folder is. - gpu/vk/shaders/fsr3_*_spv.h: the 28 compiled headers, checked in so a clone builds without glslang. - tests/test_fsr3_shaders.py (in run_all, Linux only): recompiles every pass and fails if a checked-in header no longer matches its source; source-regressions installs glslang-tools for it. Tested: every vendored file compared byte for byte with AMD's repository at c6efa6bf (76 of 76 identical); tests/test_fsr3_shaders.py with glslang 16 and spirv-val: 28 match. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(vk): AMD FSR 3.1 upscaling in the gameplay upscale's place FSR 3.1's upscaler (FidelityFX SDK 1.1.4's passes, vendored and compiled in the commit before) takes the gameplay upscale network's dispatch, the same dispatch NVIDIA DLSS takes (#841), found the same way: AMD's seven compute passes, one pass of ours before them that prepares their inputs and one after that writes the picture into the network's output. Nothing of AMD's is linked or loaded, so it is in every build. Reached with RX_VK_FSR=1 here; the menu row follows. Its inputs are #841's where they exist on current main, in one file (vk_fsr3_inputs.cpp) so they can move onto the shared temporal inputs of #1008 by changing that file alone: - jitter: #841's camera jitter (nx2/oot_jitter.py), now lifted into every build, not only builds with NVIDIA's SDK. It stays zero unless DLSS or FSR 3.1 draws: rx_option HOS_OPT_DLSS_JITTER_* gives the host DLSS's size, or FSR's. FSR reads the offset back from the camera's uniform buffer as vk_dlss.cpp does, with dlss_math.h's functions. - camera: the same uniform buffer and checks as dlss_note_scene_draw. The near plane, far plane and field of view come from its projection (fsr3_math.h): no camera hook in the game. The scene's projection is near 0.1, far 1000, 45 degrees, depth 0 at the near plane; FSR's passes are compiled for reversed depth, so FSR's depth copy is 1 - d. - motion: the camera's, from the depth, with dlss_prep.comp's math (shaders/fsr3_prep.comp). #841's actor motion is inside vk_dlss.cpp behind HOOKSHOT_NGX; FSR gets it when #1008 moves it out. - colour: the network's input (its sqrt encoding), and the picture is squared back into the network's output by dlss_out.comp, as for DLSS. dlss_mode() no longer clamps a value past DLAA onto DLAA: 3 is FSR 3.1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(vk): AMD FSR 3.1 frame interpolation for Frame generation at 2x FSR 3.1's frame interpolation and the optical flow it runs on (seventeen of AMD's compute passes, vendored and compiled two commits before) make the frame between two of the game's when Frame generation is 2x, from the presented colour and the scene's depth and motion (vk_fsr3_inputs.h, the same inputs as the upscaler, prepared at the gameplay upscale's dispatch whichever upscaler runs). The chain in vk_framegen.cpp is FSR 3.1, then the renderer's own blend for whatever it does not take: no inputs this present, a reset, a device that cannot run the passes. FSR 3.1 makes the midpoint only (no phase input), so 3x and more stay with the renderer's own. RX_VK_FSR_FG=0 never, =1 over the row. A present it did not see (a hitch, a present without inputs) breaks the sequence it keeps its previous frame by, and the next one is a reset: the interpolation never pairs this frame with a stale one. Its inputs are taken once, so a present never uses another frame's depth and motion. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(menu): AMD FSR 3.1 on the Upscaler row, after DLAA The Upscaler row's fourth value (dlss=3 in hookshot_options.ini, saved values keep their meaning): offered where vk_fsr3.cpp says FSR 3.1 runs, and the row is shown on such a GPU even in a build without NVIDIA's SDK. The row steps over what does not run here (upscaler_rows.h: a mask of the upscalers that run, step_upscaler and upscaler_fixed over it). FSR 3.1's Render resolution steps are DLSS's shares, AMD's ratios too (Quality 1.5x, Balanced 1.7x, Performance 2x, Ultra Performance 3x). The DLSS model row waits while FSR 3.1 draws; the Sharpness hint for DLSS is DLSS's only. Frame generation's 2x hint says when FSR 3.1 makes the frame. readme.md: the rows, and what FSR 3.1 needs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: NotRexed <therealnothingfn@gmail.com>
ac05821 to
684eaf7
Compare
|
I own a 9070 XT and 'd be happy to help testing the FP8/ML FSR 4.1 implementation, just let me know how 🤝 |
…R 3.1 NotRexed#841's frame chain (the scene camera and depth, colour, camera and actor motion, the camera jitter) moves out of vk_dlss.cpp into vk_temporal.cpp behind a small engine interface. vk_dlss.cpp keeps NGX, the feature and its evaluation; vk_fsr4.cpp runs AMD FSR 4.x through AMD's FSR API (MIT headers in third_party/fidelityfx; AMD's signed DLLs are the player's) on the same inputs. A build option, like DLSS: make_game.py --fsr, HOOKSHOT_FSR=1, or the Builder's tick. Next to NotRexed#1386's FSR 3.1 (merged while this was open): - Upscaler row values: 0 the game's own, 1 DLSS, 2 DLAA, 3 FSR 3.1 (as merged), 4 FSR 4, 5 FSR 4 Native AA. Saved values keep their meaning. upscaler_rows.h keeps NotRexed#1386's mask of what runs here; FSR 4 adds fsr4_bits, and full_scale covers DLAA and FSR 4's Native AA. - RX_VK_FSR stays FSR 3.1's switch; FSR 4's is RX_VK_FSR4=0/1/2. - One upscaler at a time: the chain stands aside while FSR 3.1 upscales (RX_VK_FSR=1 over the row too), and the host's jitter comes from whichever draws (vk_replay.cpp jitter_option). - FSR 3.1 keeps its own inputs (vk_fsr3_inputs.cpp) and still prepares its frame interpolation's from the gameplay upscale, whichever upscaler runs; its comments now point to vk_temporal.cpp, where the actor motion it is waiting for now is. Moving it onto the chain is a follow-up. - The camera jitter is in every build since NotRexed#1386, so --fsr no longer adds it. - NotRexed#1520's keeping DLSS's feature through loading screens is in the chain's temporal_idle, so FSR 4's context is kept the same way (RX_VK_DLSS_IDLE_RELEASE=1 lets go after 120 frames, as before). GPUs without cooperative matrices (AMD RDNA 2): the Render resolution's fixed-share networks (67/58/50/33%) do not translate there, so their upscale fell back to a linear stretch no upscaler saw. upscale_stub now offers the frame to the chain first (the RGB9E5 or B10G11R11 view of the scene). Review fixes (hckrman101): nothing of FSR's destroyed at exit (leaked statics: Hookshot exits with the device alive); FSR's inputs only as large as the largest render size its context has had; the Linux AppImage job builds hookshot_vk.so once more with FSR, so its Linux side compiles in CI. Also: RX_VK_DLSS=2 and up mean DLAA, as before; a loader that is there but fails to load is logged with Windows' error; --fsr with the AppImage's prebuilt back end says it has no FSR 4. Tested on an RX 6700 XT (Windows, FSR 4.1.2, INT8 model) before the FSR 3.1 merge: 75/67/58/50/33% and Native AA. After it: both renderer builds (with and without FSR 4) and tests/run_all.py, the same results as main. Co-authored-by: NoBoDyZ <neotrax70@gmail.com> Co-authored-by: hckrman101 <239247847+hckrman101@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
684eaf7 to
2b7ce8c
Compare
|
Thanks @FrozenGuy7, a 9070 XT is exactly what this needs: so far it has only run on RDNA 2 (the INT8 model). These steps are for Windows; if you're on Linux, say so and I'll post those. You need: Hookshot built once with the normal Builder (this reuses its tools, so there's nothing else to install), Git for Windows, your game's 1. Get AMD's FSR files. From the FidelityFX SDK 2.4 release, take 2. Build this PR. Open PowerShell, change the first two lines, then paste the whole block. It builds into a new folder, so your normal install isn't touched, and it takes about as long as a Builder build. $Nup = "C:\path\to\your-game.nup" # your game file
$Out = "C:\Games\Hookshot-FSR4" # a new folder for this test build
$Tools = "$env:LOCALAPPDATA\HookshotBuilder\versions\$((Get-Content "$env:LOCALAPPDATA\HookshotBuilder\versions\current.txt").Trim())\HookshotBuilder\tools"
$Src = "$env:USERPROFILE\hookshot-pr1008"
git clone -c core.longpaths=true --depth 1 -b amd/fsr4 https://github.com/madebyjordan/hookshot-amd.git $Src
Get-ChildItem "$Tools\third_party" -Recurse -File -Include *.dll,*.exe,*.lib,*.sha1 | ForEach-Object {
$dest = Join-Path "$Src\third_party" $_.FullName.Substring("$Tools\third_party".Length + 1)
New-Item -ItemType Directory -Force (Split-Path $dest) | Out-Null
Copy-Item $_.FullName $dest -Force }
Copy-Item "$Tools\work" "$Src\work" -Recurse -Force
$env:RX_CPM = "$Tools\cpm"; $env:WGPU_NATIVE = "$Tools\wgpu-native"; $env:HOOKSHOT_MINGW = "$Tools\llvm-mingw"; $env:EMSDK = "$Tools\emsdk"
Set-Location $Src
& "$Tools\python\python.exe" -I nx2/make_game.py --nup $Nup --out $Out --language en-US --fsrIf you have 3. Add AMD's files. Copy the two DLLs from step 1 into the new game folder ( 4. Start it. Run 5. Turn FSR 4 on. In game, press F1, then go to Graphics → Upscaler → AMD FSR 4. Under Render resolution, try Quality, Balanced, Performance and Ultra Performance. Then try AMD FSR 4 Native AA. Gameplay → FPS counter shows your FPS so you can compare with Game's own. What would help most:
Thanks again! |
On the frame chain (NotRexed#1008): the scene is found by temporal_jitter_size, and DLSS's engine makes the mask in its evaluate from the TemporalFrame's colour and sizes. DLSS and FSR 3.1 only: AMD FSR 4 is given no mask, and nothing is copied while it draws. The doc says so, and that the mask is the whole difference since the copy. tests/test_reactive_mask.py is given run_all.py's compiler. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
On the frame chain (NotRexed#1008): the width the scene is scaled to comes from vk_temporal.cpp's temporal_jitter_size (axis 3) in place of dlss_jitter_size, so NVIDIA DLSS and AMD FSR 4 both take the bias, and from fsr3_inputs::jitter_size for FSR 3.1. DLAA and FSR 4's Native AA have none. tests/test_upscale_lod_bias.py is given run_all.py's compiler. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
@madebyjordan It works perfectly, I played for a few minutes using FSR4 and was able to play at ~120 FPS for a few minutes but I'm not able to share much right now because I'm busy with work now, sorry about that.
[hookshot_log.txt](https://github.com/user-attachments/files/34643502/hookshot_log.txt)
|
linux-appimage.yml: main's AMD FSR 4 build check (#1008) and the release attestation step both kept. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🤖 I have created a release *beep* *boop* --- ## [2.1.0-rc.1](v2.0.14...v2.1.0-rc.1) (2026-11-11) ### Features * Add a control to disable camera centering ([2dcf210](2dcf210)) * Add an option to disable automatic camera centering ([657da4f](657da4f)) * Audio tab in the Insert menu with Volume and Mute in background ([52ca067](52ca067)) * Audio tab in the Insert menu with Volume and Mute in background ([df2d84c](df2d84c)) * **builder:** let the player choose how much memory a build may take ([90055d0](90055d0)) * **builder:** the Linux builder looks like the Windows one ([8c1b5e9](8c1b5e9)) * **builder:** the Linux builder looks like the Windows one ([8f2e1a1](8f2e1a1)) * **builder:** use the saved build memory choice for updates ([86ff22c](86ff22c)) * **builder:** warn before building on a hard drive ([b526a84](b526a84)) * **builder:** warn before building on a hard drive ([c769305](c769305)) * **build:** Probe for system Vulkan packages, add proper requirements ([3b84291](3b84291)) * **build:** Probe for system Vulkan packages, add proper requirements.txt ([155bfa2](155bfa2)) * **linux:** opt-in NVIDIA DLSS in Linux Builder and AppImage ([484cfd1](484cfd1)) * **linux:** opt-in NVIDIA DLSS in Linux Builder and AppImage ([66b86fb](66b86fb)) * **menu:** a DualShock 4 or DualSense touchpad click opens the menu as F1 ([8790b8f](8790b8f)) * **menu:** a Mesh shaders row (Automatic, Native, Compute) ([#1971](#1971)) ([c8022e7](c8022e7)) * **menu:** a Text size row for dialogue, Navi and signs ([4d0645f](4d0645f)) * **menu:** a Text size row for dialogue, Navi and signs ([4bae30c](4bae30c)) * **menu:** add 5120x2880 (5K) to Output resolution ([ce175ac](ce175ac)) * **menu:** centre the menu in a 16:9 column on ultrawide ([70e2209](70e2209)) * **menu:** DLAA as DLSS's Native render resolution, and Render resolution as a slider in real sizes ([#2000](#2000)) ([e187859](e187859)) * **menu:** Esc can open the Insert menu (Menu shortcut "Insert, F1 or Esc") ([#1998](#1998)) ([d926317](d926317)) * **menu:** let players choose the keyboard shortcut ([#1609](#1609)) ([191cfdc](191cfdc)) * **menu:** put the debug tools on the Debug tab ([e256616](e256616)) * **menu:** redesign the Debug tab, Inventory and Teleport pages ([c805d9b](c805d9b)) * **menu:** save Output resolution as a size, and take any size from the config ([a78ee4d](a78ee4d)) * **menu:** the debug tools' Teleport row opens the map list ([a4c3a8d](a4c3a8d)) * RecompLauncher support (recomplauncher.json, make_game --game/--prepare) ([ab5a1f6](ab5a1f6)) * **startup:** lower the start-up screen, smaller text, fade to black at the end ([8649805](8649805)) * **startup:** lower the start-up screen, smaller text, fade to black at the end ([fb60134](fb60134)) * **vk:** add AMD Anti-Lag 2 (VK_AMD_anti_lag) ([8ea4e7f](8ea4e7f)) * **vk:** add opt-in VRAM compaction and hold the driver's count below its limit ([3932421](3932421)) * **vk:** AMD Anti-Lag 2 through VK_AMD_anti_lag ([b9e7559](b9e7559)) * **vk:** Anisotropic filtering option, 16x by default, and the upscalers' texture LOD bias ([0af7629](0af7629)) * **vk:** Anisotropic filtering row, 16x by default ([d9b0ce2](d9b0ce2)) * **vk:** draw the menu, FPS counter and start-up screen with Dear ImGui ([509579b](509579b)) * **vk:** opt-in VRAM compaction (RX_VK_COMPACT=1): the textures' free space goes back to the driver ([d218438](d218438)) * **vk:** trace effective presentation geometry on changes ([#1457](#1457)) ([a350759](a350759)) * **vk:** upscalers' texture LOD bias below the game's 3/4 render ([3b9ffcd](3b9ffcd)) * **vk:** warm the stage libraries from the program cache into the pipeline cache ([24ebac7](24ebac7)) ### Bug Fixes * a game folder whose deepest file passes 260 characters builds and plays ([#1468](#1468)) ([d231d17](d231d17)) * a game folder whose deepest file passes 260 characters builds and plays ([#1468](#1468)) ([45c7418](45c7418)) * Address camera centering review feedback ([103e2cd](103e2cd)) * **appimage:** copy sysroot library aliases by value for updates ([#1536](#1536)) ([ed66422](ed66422)) * **audio:** keep 512-frame power-of-two default on SDL2 fallback ([#1550](#1550)) ([fa85175](fa85175)) * **build:** a game built from extracted folders refuses links in them ([233e072](233e072)) * **builder:** --cli says make_game's own error, on stdout too ([a3859f1](a3859f1)) * **builder:** bound writes from compressed NUP members ([#1596](#1596)) ([56e31e7](56e31e7)) * **builder:** constrain the Show details hit area ([d45e262](d45e262)) * **builder:** constrain the Show details hit area ([080bf91](080bf91)), closes [#1842](#1842) * **builder:** give the prepare shaders tick its own row ([1ace933](1ace933)) * **builder:** honor DLSS opt-in when updating a game ([#1643](#1643)) ([c3aa9c0](c3aa9c0)) * **builder:** report bytes during NUP extraction ([#1671](#1671)) ([c4a9085](c4a9085)) * **builder:** select the saved build memory in BeginUpdate ([d08aaed](d08aaed)) * **builder:** the Linux builder's details box is read-only ([b2ac2bf](b2ac2bf)) * **builder:** the Linux builder's details box is read-only ([d7cc1d4](d7cc1d4)) * **build:** escape the build folder in glob patterns (a work folder with [ ] found no lifted code) ([#1722](#1722)) ([caaee0b](caaee0b)) * **build:** invalidate DLSS objects when SDK headers change ([#1648](#1648)) ([c716137](c716137)) * **build:** package scripts/ in the Linux AppImage, so NVIDIA DLSS can be fetched ([b0aa6f6](b0aa6f6)) * **build:** package scripts/ in the Linux AppImage, so NVIDIA DLSS can be fetched ([af9e98c](af9e98c)) * **build:** stop sampling memory for exited compiler roots ([#1562](#1562)) ([4a7ae1b](4a7ae1b)) * **build:** the logo and fonts are made only where the Vulkan back end is compiled (an AppImage build stopped at LibertinusSans-Regular.ttf) ([#1567](#1567)) ([6add2f1](6add2f1)) * Discord status starts on Windows (it was only started in the Linux build's main) ([#1539](#1539)) ([7d1562d](7d1562d)) * **display:** address pointer sampling review feedback ([acf9dae](acf9dae)) * **display:** do not toggle fullscreen on F11 when modifier keys are held ([#1309](#1309)) ([#1608](#1608)) ([635ba1a](635ba1a)) * **display:** integrate coherent game-menu pointer samples ([09685de](09685de)) * **display:** integrate main and declare pointer fixture requirements ([8a6f1e5](8a6f1e5)) * **display:** open the window on COSMIC's Wayland with SDL2 ([#992](#992)) ([e937168](e937168)) * **display:** publish coherent pointer and drawable samples ([fd93173](fd93173)) * **display:** publish coherent pointer and drawable samples ([ee53072](ee53072)) * **env:** hookshot_env.txt sets no test switch that names a file or presses buttons ([74cee1e](74cee1e)) * **framegen:** 2x made by the renderer's own blend again; AMD FSR 3.1's interpolation opt-in (RX_VK_FSR_FG=1) ([eb5b9a0](eb5b9a0)) * **framegen:** 2x uses the renderer's own blend again; FSR 3.1 interpolation opt-in ([#1635](#1635)) ([3b76e95](3b76e95)) * hardening part 3, updates, shared files, guest buffers and texture sizes ([d5feb7b](d5feb7b)) * **hid:** deduplicate gamepad polling when SDL controllers are active ([#1480](#1480), [#1583](#1583)) ([2b0f762](2b0f762)) * **hid:** deduplicate gamepad polling when SDL controllers are active ([#1480](#1480), [#1583](#1583)) ([731898a](731898a)) * **hos:** host copies, file reads and writes, and the NV12 reader stay in guest memory ([6f8f243](6f8f243)) * **host:** room in the drivers' shader caches for the prepared pipelines (Linux) ([#2033](#2033)) ([c9ec3bb](c9ec3bb)) * **host:** the cache cores only where the L3s are shared alike and the largest has 8 cores (review of [#1638](#1638)) ([428633a](428633a)) * **input:** a stick axis steers once it has been seen at rest (camera spinning on its own, [#1673](#1673), [#1661](#1661)) ([#1677](#1677)) ([d8f0513](d8f0513)) * **linux:** safely rebase legacy sysroot links ([#1553](#1553)) ([ca3a252](ca3a252)) * **loader:** add the addend to GLOB_DAT and JUMP_SLOT relocations ([1372edb](1372edb)) * **loader:** add the addend to GLOB_DAT and JUMP_SLOT relocations ([95a9a07](95a9a07)) * **make_game:** --prepare says errors and --check on stdout, and refuses a missing --game ([2d27d08](2d27d08)) * **menu:** A and B confirm and go back on a controller, as in the game ([02b0903](02b0903)) * **menu:** a save keeps the options file's lines the menu does not write ([#1493](#1493)) ([a2e6505](a2e6505)) * **menu:** a size from the config shows as its size alone, no label ([bc9406c](bc9406c)) * **menu:** clarify frame-generation preset help ([#1554](#1554)) ([77685a5](77685a5)) * **menu:** distinguish game and generated frame rates ([#1659](#1659)) ([b2bb214](b2bb214)) * **menu:** F1 always opens the menu (Menu shortcut: Insert or F1, or F1 only) ([#1632](#1632)) ([d448ccc](d448ccc)) * **menu:** Frame generation is the player's choice; Quality presets leave it alone ([2ef499d](2ef499d)) * **menu:** hide rows for features this PC lacks, and keep mouse clicks on the row meant ([51de681](51de681)) * **menu:** hide rows for features this PC lacks, and keep mouse clicks on the row meant ([849b63e](849b63e)) * **menu:** keep the FPS counter off the banner on a window just wider than 16:9 ([#1545](#1545)) ([50d71bd](50d71bd)) * **menu:** keep the help box and rows above the prompt strip ([bd1616f](bd1616f)) * **menu:** Menu size is Medium on every input, and the version shrinks to fit ([73feec0](73feec0)) * **menu:** Quality presets leave Frame generation alone, so it stays off by default ([a72690c](a72690c)) * **menu:** run the upscalers' one-time probes during the start-up screen, not at the menu's first open ([#1886](#1886)) ([#1916](#1916)) ([74075de](74075de)) * **menu:** the FPS counter looks as it did (green outlined text in the corner, no plate) ([#1957](#1957)) ([92907f7](92907f7)) * **menu:** the mouse wheel scrolls, it never changes a value ([#1557](#1557)) ([be541fa](be541fa)) * **nup:** name the member and the drive when extraction runs out of space ([#1595](#1595)) ([218d8de](218d8de)) * **packaging:** include the prompt encoder's runtime dependency ([#1598](#1598)) ([53a5fd5](53a5fd5)) * preserve UTF-8 and extraction guards in long-path support ([#1592](#1592)) ([38a5794](38a5794)) * **render:** publish coherent shared temporal jitter samples ([a38a07d](a38a07d)) * **render:** publish coherent temporal jitter samples ([0291727](0291727)) * **render:** reset temporal history when reprojection is invalid ([0cf9936](0cf9936)) * **render:** reset temporal history when reprojection is invalid ([19b81b7](19b81b7)) * **rt:** mark an exclusive store's page after the store, not before ([7cb4028](7cb4028)) * **rt:** mark an exclusive store's page after the store, not before ([db6324f](db6324f)) * **scripts:** the profile readers name and count Linux samples ([#1746](#1746)) ([6269088](6269088)) * **security:** a font's cmap offset, a microphone's name, and the game's library loads stay in bounds ([9323390](9323390)) * **security:** verify Windows updater asset digests ([6d5f277](6d5f277)) * **security:** verify Windows updater asset digests ([50b6866](50b6866)), closes [#1679](#1679) * **setup:** explain how to restore missing Windows tar ([1c1995e](1c1995e)) * **setup:** explain recovery when Windows tar is missing ([fbaf722](fbaf722)) * **shaders:** a loop that leaves by predicated EXITs ends at its closing self-branch (the last program that did not lower) ([a8e7ee5](a8e7ee5)) * **shaders:** a program ends at its closing self-branch after an unconditional jump back ([7e1db37](7e1db37)) * **shaders:** an immediate's low byte is not a scratch register ([d0f3511](d0f3511)) * **shaders:** ISBERD.O, a task or mesh program reading back its output region ([67c048e](67c048e)) * **shaders:** ISBERD.O, a task program reading back its payload (12 failing pipelines) ([0904155](0904155)) * **shaders:** LDG [URn+imm] with both ordering bits 77-78 lowers ([692a1c0](692a1c0)) * **shaders:** LDG/STG [URn+imm] with ordering bit 78 lower (2 compute programs) ([5ec9668](5ec9668)) * **shaders:** lower TLD.MS (multisampled texel fetch) to Maxwell TLDS 2D.LZ.MS ([6860451](6860451)) * **shaders:** lower TLD.MS, a multisampled texture's texel, to Maxwell TLDS 2D.LZ.MS ([20dd78b](20dd78b)) * **shaders:** R2UR's source is one register, not a pair ([597edcb](597edcb)) * **shaders:** R2UR's source is one register, not a pair (a vertex program refused) ([9edb3a5](9edb3a5)) * **shaders:** STG [URn+imm] with ordering bit 78 lowers too ([923a334](923a334)) * **shaders:** two large compute programs lower (an immediate is not R254) and get their local memory ([10cfd70](10cfd70)) * the display stays on while playing with a controller ([#1532](#1532)) ([#1538](#1538)) ([c38df20](c38df20)) * **update:** Linux downloads are GETs again; a part's links stay in the install; the requested tag is installed ([df9a52e](df9a52e)) * **vi:** a cutscene's cues stay with its movie above a 60 cap ([a7cc747](a7cc747)) * **vi:** a cutscene's cues stay with its movie above a 60 cap ([#1742](#1742)) ([6c596af](6c596af)) * **vi:** keep the game at real speed under a Frame rate cap above 60 ([#1612](#1612)) ([1a429f6](1a429f6)) * **vk:** a masked clear that backed off is tried again now and then ([#1787](#1787)) ([fa04b6f](fa04b6f)) * **vk:** a masked clear whose pipeline the driver did not make is tried again, not cached as null ([#1787](#1787)) ([9d94f4c](9d94f4c)) * **vk:** a masked clear whose pipeline the driver did not make is tried again, not cached as null ([#1787](#1787)) ([f002c90](f002c90)) * **vk:** a shadow is made only where the textures' own lines are not passed (review of [#1637](#1637)) ([ecb6e9a](ecb6e9a)) * **vk:** a switch for an engine that cannot run leaves a saved FSR 3.1 ([#1773](#1773) review) ([a9ea73a](a9ea73a)) * **vk:** a texture's storage size is computed in 64 bits, and one past the GPU's limits is not made ([81a6da5](81a6da5)) * **vk:** add VMA image allocation retry without WITHIN_BUDGET ([39d978b](39d978b)) * **vk:** add VMA image allocation retry without WITHIN_BUDGET ([560cc5a](560cc5a)) * **vk:** admit only successful samplers across cache layers ([52ac35c](52ac35c)) * **vk:** admit only successful samplers across cache layers ([3379314](3379314)) * **vk:** ask for task and mesh shader counts only where the driver offers them ([ba86aee](ba86aee)) * **vk:** ask for task and mesh shader counts only where the driver offers them ([a3d88ea](a3d88ea)) * **vk:** ask the pipeline cache for a compute pipeline before queueing its build ([0db1e74](0db1e74)) * **vk:** avoid aligned uniform-word cache collisions ([1b25b22](1b25b22)) * **vk:** build every predicted pipeline before the game (the prediction found nothing on fresh builds; no 90 s budget; one progress bar) ([#2032](#2032)) ([ff85d7d](ff85d7d)) * **vk:** build the precompile's first graphics pipeline alone ([41b3438](41b3438)) * **vk:** capture jitter cache frame under its lock ([1f32a16](1f32a16)) * **vk:** check cached descriptor counts and the formats of noted pipelines ([59f9284](59f9284)) * **vk:** coloured specks on fallback foliage (AMD): the generated vertex stage's outputs start at (0,0,0,1) ([16631b6](16631b6)) * **vk:** commit bank cache generations after successful stream upload ([60ea984](60ea984)) * **vk:** compute programs get their local memory size (control section +0x68) ([a083825](a083825)) * **vk:** dark lighting and glowing bloom on AMD: 64-lane graphics warps and Lichii [#273](#273 fragment shuffle fallback ([030e605](030e605)) * **vk:** decode Deck gameplay upscale as RGB9E5 ([903bc4a](903bc4a)) * **vk:** decode gameplay RGB9E5 upscale fallback ([6c936d4](6c936d4)) * **vk:** dense grass cut off and far trees flickering without mesh shaders: fallback records from an allocator, 65535 slots ([7047756](7047756)) * **vk:** disable failed frame log sinks and unwind startup ([#1531](#1531)) ([5fde3cf](5fde3cf)) * **vk:** establish capture copy visibility for host reads ([7ef03d4](7ef03d4)) * **vk:** expose the retirement helper across renderer units ([d5b7437](d5b7437)) * **vk:** flush custom UI texture staging before GPU use ([#1559](#1559)) ([188baa6](188baa6)) * **vk:** invalidate capture readbacks before CPU reads ([0c6c047](0c6c047)) * **vk:** keep adjacent uniform words in separate cache slots ([7b81752](7b81752)) * **vk:** keep Windows prepare times in FILETIME ticks ([#1517](#1517)) ([edeaa9d](edeaa9d)) * **vk:** let a draw run its own queued shader translation ([#1714](#1714)) ([8bac8aa](8bac8aa)) * **vk:** log a driver fault caught by the Windows pipeline guards ([ac7d4a7](ac7d4a7)) * **vk:** make capture readbacks visible before CPU reads ([6e06af5](6e06af5)) * **vk:** make frame dump copies visible to host reads ([#1621](#1621)) ([c1a4fde](c1a4fde)) * **vk:** mark a clear's targets in the parallel replay's dry pass (the one-frame black scenes) ([adb7a5d](adb7a5d)) * **vk:** missing floor grass without mesh shaders: indirect task draws ran no mesh workgroups ([ccf7f41](ccf7f41)) * **vk:** own native FSR constants for each recording ([2982420](2982420)) * **vk:** own native FSR constants for each recording ([895d673](895d673)) * **vk:** parallel replay: a clear's targets are marked in the dry pass (the one-frame black scenes) ([168e4d1](168e4d1)) * **vk:** present ahead's vk_replay.cpp half, lost in [#1720](#1720 merge ([be8b512](be8b512)) * **vk:** present ahead's vk_replay.cpp half, lost in [#1720](#1720 merge (main doesn't link) ([1392ea3](1392ea3)) * **vk:** preserve brightness in flash sampling across capture sizes ([#1537](#1537)) ([6f5ecab](6f5ecab)) * **vk:** preserve contiguous words in the mixed uniform cache ([70ffaf2](70ffaf2)) * **vk:** preserve CPU write watches during pool imports ([#1434](#1434)) ([74dcb75](74dcb75)) * **vk:** prevent aligned uniform words from thrashing the cache ([78e1112](78e1112)) * **vk:** publish complete PNG captures and report failures ([#1604](#1604)) ([ba40a1a](ba40a1a)) * **vk:** publish complete screenshot resource sets ([#1472](#1472)) ([ff69134](ff69134)) * **vk:** publish recording stream writes before GPU submission ([d71739d](d71739d)) * **vk:** publish recording stream writes before GPU submission ([0e843bd](0e843bd)) * **vk:** publish texture staging slices before GPU reads ([#1672](#1672)) ([a6e2e14](a6e2e14)) * **vk:** Read texture handles from stage constant banks ([31933e4](31933e4)) * **vk:** Read texture handles from stage constant banks ([4654870](4654870)) * **vk:** recover recording stream and descriptor allocation failures ([fad4d16](fad4d16)) * **vk:** recover recording stream and descriptor allocation failures ([6e93f80](6e93f80)) * **vk:** reject failed descriptor-pool creation results ([6a51fc2](6a51fc2)) * **vk:** reject failed samplers before descriptor publication ([2914a73](2914a73)) * **vk:** reject missing RGB9E5 fallback views ([6f5f769](6f5f769)) * **vk:** reject unbound imported buffers and roll back ownership ([325583b](325583b)) * **vk:** reject unbound imported buffers and roll back ownership ([af8f012](af8f012)) * **vk:** replace menu upload buffers only after successful growth ([#1453](#1453)) ([60b0c9b](60b0c9b)) * **vk:** report device loss throughout native presentation ([5997b2d](5997b2d)) * **vk:** report device loss throughout native presentation ([8e1abe3](8e1abe3)) * **vk:** reset swap_spare with the swapchain; leave a skipped present out of the counts ([08f3fe4](08f3fe4)) * **vk:** retire native FSR images after GPU completion ([8fc2587](8fc2587)) * **vk:** retire native FSR images after GPU completion ([4aaf336](4aaf336)) * **vk:** retry transient texture image view failures ([8686552](8686552)) * **vk:** retry transient texture image view failures ([394b797](394b797)) * **vk:** RX_VK_FSR4 and RX_VK_DLSS go over a saved FSR 3.1 ([#1008](#1008) follow-up) ([4cde5c6](4cde5c6)) * **vk:** RX_VK_FSR4 and RX_VK_DLSS go over a saved FSR 3.1 ([#1008](#1008) review) ([6229c02](6229c02)) * **vk:** RX_VK_VRAM_MB and the integrated-GPU cap win over a preset's texture budget ([#1376](#1376)) ([e27740a](e27740a)) * **vk:** share validated source crops across presentation paths ([187e70b](187e70b)) * **vk:** share validated source crops across presentation paths ([d4c0429](d4c0429)) * **vk:** shared_pipeline_cache outside the unnamed namespace (vk_fsr3.cpp could not link to it) ([9d44621](9d44621)) * **vk:** slow resume and black HUD hearts on 4 GB cards: the texture squeeze waits while VMA's blocks have room ([189287f](189287f)) * **vk:** snapshot pending shots before reusing their readback slot ([#1519](#1519)) ([aaf6ac1](aaf6ac1)) * **vk:** submit a 2x set's copies together so its presents keep their times ([64cfe26](64cfe26)) * **vk:** submit a 2x set's copies together so its presents keep their times ([79e42ac](79e42ac)) * **vk:** the upscale stand-in and the texture clear call texture_written as before ([73c6dd3](73c6dd3)) * **vk:** tie texel buffer views to their imported backing ([692e87d](692e87d)) * **vk:** tie texel buffer views to their imported backing ([a23587f](a23587f)) * **vk:** Timestamp frame captures with the host clock ([3563479](3563479)) * **vk:** Use host timestamps in frame captures ([b2ed731](b2ed731)) * **vk:** validate capture dimensions before allocating readbacks ([#1551](#1551)) ([17e8cd8](17e8cd8)) * **vk:** validate HDR crops through the shared source rectangle ([f20afae](f20afae)) * **vulkan:** avoid the AMD cloth pipeline optimizer hang ([bebe51e](bebe51e)) * **vulkan:** finish the RX 6700 XT merge resolution ([5ffdaeb](5ffdaeb)) * **vulkan:** refresh direct-write tracking on current main ([a4c8f85](a4c8f85)) * **vulkan:** stop distant trees flickering in the mesh fallback ([7fc0a61](7fc0a61)) * **vulkan:** track writes from direct buffer bindings ([be1aabc](be1aabc)) * write-back stale-shadow edgecase ([c5aa906](c5aa906)) ### Performance Improvements * **host:** keep the game's threads on the 3D V-Cache cores of two-CCD X3D CPUs ([1360a44](1360a44)) * **host:** on X3D CPUs with two CCDs the game's threads stay on the cores that share the 3D V-Cache ([b3c0982](b3c0982)) * **host:** write the log in batches, a few writes a second instead of one per line ([c7e41fd](c7e41fd)) * **host:** write the log in batches, a few writes a second instead of one per line ([7f12643](7f12643)) * **vk:** a captured page's words read from the capture, not a 4 KB copy kept a thread ([0b951ec](0b951ec)) * **vk:** copy captured pages with non-temporal stores ([d8ce191](d8ce191)) * **vk:** copy captured pages with non-temporal stores ([146fe38](146fe38)) * **vk:** Descriptor reuse on by default (options_version 4) ([f758d9f](f758d9f)) * **vk:** Descriptor reuse on by default (options_version 4) ([f214c0c](f214c0c)) * **vk:** DLSS keeps its feature through loading screens while it is the Upscaler (a 44-78 ms stutter at each area entry) ([#1520](#1520)) ([549a43b](549a43b)) * **vk:** flush only each FSR uniform slice ([c7c88fa](c7c88fa)) * **vk:** FSR 3.1's passes go through the pipeline cache kept across runs ([e805e02](e805e02)) * **vk:** FSR 3.1's passes go through the pipeline cache kept across runs (a 1.7 s longer first frame of play) ([b27d9b6](b27d9b6)) * **vk:** FSR 3.1's pipelines through the play caches too (shared_compute_pipeline) ([46efc77](46efc77)) * **vk:** in play an ask without compiling goes through the play caches too ([#1765](#1765 dispatch, the stage libraries) ([6593de7](6593de7)) * **vk:** keep 32 submitted pages a thread, not one ([338837d](338837d)) * **vk:** keep four pages for the replay's reads as submitted, not one ([3bae557](3bae557)) * **vk:** keep four pages for the replay's reads as submitted, not one (Kokiri village view 50 -> 57 fps) ([72133cb](72133cb)) * **vk:** keep the write-back shadows while VRAM is full of free space inside VMA's blocks ([6a4f3ea](6a4f3ea)) * **vk:** less copying of captured memory on the game and replay threads ([e63d30d](e63d30d)) * **vk:** RX_VK_SUBMITTED_PAGES=1 keeps one submitted page, as before [#1762](#1762); tests follow [#1762](#1762) and [#1619](#1619) ([cfefd0e](cfefd0e)) * **vk:** skip write-backs of large GPU-written bindings ([2ea6386](2ea6386)) * **vk:** skip write-backs of large GPU-written bindings ([30911ca](30911ca)) * **vk:** the capture's copies split by one function; a caller runs its own parts no helper has taken ([c747a2c](c747a2c)) * **vk:** the capture's streaming-store copy is opt-in (RX_VK_CAPTURE_NT=1): more stutters, no lower capture time here ([#1841](#1841)) ([f4e6fdd](f4e6fdd)) * **vk:** the texture shadow's pages kept in place and copied by the capture helpers ([a4ccf07](a4ccf07)) * **vk:** the write-back shadows stay while VRAM is full of free space inside VMA's blocks ([23738b6](23738b6)) * **vk:** what play makes goes into a pipeline cache of its own, one file per save (no 0.5-1.2 GB rewrite in play) ([74c15be](74c15be)) * **vk:** what play makes goes into a pipeline cache of its own, one per save, not the whole cache again ([1b0ea22](1b0ea22)) * **vk:** write the pipeline cache only when its data changed (no 1.1 GB rewrite at every start) ([bd5086a](bd5086a)) * **vk:** write the pipeline cache only when its data changed since it was read or last written ([5a3fd42](5a3fd42)) * **vk:** write the pipeline cache only when its data changed since it was read or last written ([9f4fb8e](9f4fb8e)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>


AMD FSR 4.1 as a second upscaler engine, on the frame chain #841 merged for DLSS, next to the FSR 3.1 that #1386 merged. FSR 4 is AMD's machine-learned upscaler and runs AMD's own DLLs; FSR 3.1 is built from AMD's shaders. They are separate options on the same row.
What changed
vk_dlss.cppintovk_temporal.cppbehind a small engine interface.vk_dlss.cppkeeps NGX, the feature and its evaluation, and does the same thing as before perf(vk): DLSS keeps its feature through loading screens (a 44-78 ms stutter at each area entry) #1520's keeping DLSS loaded through loading screens moved with it, so FSR 4 gets it too.vk_fsr4.cppruns FSR 4.x through AMD's FSR API on those same inputs, taking the newest FSR 4 AMD's library offers (never an older FSR in its place). Only AMD's MIT headers are vendored (third_party/fidelityfx); AMD's signed DLLs are the player's.dlss.RX_VK_FSRstays FSR 3.1's switch; FSR 4's isRX_VK_FSR4. Only one upscaler draws at a time: the shared chain stands aside while FSR 3.1 upscales. FSR 3.1 keeps its own inputs (vk_fsr3_inputs.cpp) and its frame generation works with any upscaler, as merged.make_game.py --fsr/HOOKSHOT_FSR=1/ a Builder tick. Default builds are unchanged.Tested
mainat caaee0b): the renderer builds with and without FSR 4, no warnings;tests/run_all.py: 230 pass, and the same 19 fail on plainmainhere (local tools: Windows symlinks, clang, spirv-val). Not played again since: the play test above was before AMD FSR 3.1 upscaling and frame generation (split from #1335) #1386.Related
🤖 Generated with Claude Code