Repository navigation
feat(framegen): AMD FSR 4 and AMD FSR 3.1 as Frame generation by choices - #2665
Open
notquiteog wants to merge 3 commits into
Open
notquiteog wants to merge 3 commits into
notquiteog wants to merge 3 commits into
Conversation
The Frame generation by row had Auto and Built-in. AMD's frame generation could only be reached through RX_VK_FSR_FG=1 (FSR 3.1's interpolation), and FSR 4's not at all. The row now shows two more values, each only where it runs on this PC: - AMD FSR 4 (2): AMD's frame generation through AMD's runtime (gpu/vk/vk_ffx.cpp), Windows, in a build with AMD FSR 4 (HOOKSHOT_FSR, as vk_fsr4.cpp), with amd_fidelityfx_framegeneration_vk.dll beside AMD's loader. It is handed the scene's depth and motion (vk_fsr3_inputs.h's Frame now carries the images and the view-projections), the camera in the world (camera_vectors.h) and the presented picture, and its made frames are copied into the set. Every call into AMD's DLLs is guarded and asked once, at the start. - AMD FSR 3.1 (3): the frame interpolation that is already here (vk_fsr3fi.cpp), chosen from the menu at 2x, the one set it makes. The choice is gpu/vk/framegen_methods.h, plain functions: a saved method that does not run here is shown and used as Auto (so NVIDIA DLSS Frame Generation still runs at Auto, vk_dlss.cpp fg_asked through framegen_by_auto), and a set a method does not make whole, or a frame it refuses, is the renderer's own. Neither of AMD's is ever Auto's: they are given the picture with the HUD in it and can smear it. RX_VK_FG_METHOD picks the row's value for one run. AMD's frame generation headers (FidelityFX SDK v2.4.0, MIT, unmodified) join the API headers in third_party/fidelityfx; nothing of AMD's runtime is vendored or fetched for it. Tests: tests/test_framegen_methods.py, tests/test_camera_vectors.py, and vk_ffx.cpp's dispatches in tests/test_recorder_sync.py. Built on Linux (where vk_ffx.cpp is its stubs) and its Windows side syntax-checked with llvm-mingw's target; AMD's runtime has not been run. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ler rows) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
notquiteog
marked this pull request as ready for review
November 12, 2026 18:10
Contributor
|
Hi, I know this isn't part of your PR, but I recommend changing "Auto" to DLSS, and move it over so 0 becomes Built-In and 1 becomes DLSS. We had discussions about it w/ the person who implemented DLSS, and that's what we like to do. We would like to basically hit two birds with one stone in this case. Thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Frame generation by row offers Auto and Built-in only: a player with an AMD card has no way to pick AMD's own frame generation from the menu, and FSR 3.1's interpolation is reachable only through
RX_VK_FSR_FG=1. This adds both as choices of the row. It is the "FidelityFX FSR 4 fallback as a small, separate PR" asked for when #1831 was closed.The AMD FSR 4 half has not been run: AMD's runtime is Windows DLLs and this PC is Linux with an NVIDIA card. It is up for review as it is, with that said plainly; it needs a run on Windows with an AMD card before it merges, and I would be glad of one (
testing wanted).What it does
vk_ffx.cpp), from the scene's depth, motion and camera; every made frame of a set in one dispatch--fsr, AMD's DLLs beside the gamevk_fsr3fi.cpp), chosen in the menu at 2xframegen_methods.his the choice, pure and tested: a value that does not run on this PC is stepped over by the arrows and shown as Auto when it comes from a saved file, and a set a method cannot make whole goes to the renderer's own, never to nothing. DLSS Frame Generation reads the row as it is shown (framegen_by_auto), so a saved AMD value on an NVIDIA PC still gets DLSS-G.vk_ffx.cpphands AMD's runtime our own images on our own command buffer (its "manual" dispatch, no swapchain of AMD's): Hookshot keeps presenting and pacing. A present it did not make is told to it as a reset. A context that cannot be made turns the choice off for the run and the row goes back to Auto.camera_vectors.h: the camera's position and axes in the world from the projection and view-projection, which AMD's runtime takes.third_party/fidelityfxbeside the four already there (MIT, same pinned SDK; the README there says which). AMD's frame generation DLL is not fetched byscripts/ffx_sdk.pyyet: the readme says to put it beside the loader.vk_api.h.How it was tested
tests/run_all.py(Linux), with main at 65a4d87 merged in: 500 passed, 2 failed, 22 skipped. Two checks fail on this branch exactly as they fail on main at 65a4d87 without it:test_readme_menu_rows(the Skip opening row has no readme line; docs(readme): the option table has the Skip opening row, so main's readme check passes #2857 is open for it) andtest_program_cache_one_variant(its fixture lacks the zstd cache's names since perf(vk): compress the program cache with zstd (RX_VK_PROGRAM_CACHE_ZSTD) #1630). New:test_framegen_methods,test_camera_vectors.--fsr).vk_ffx.cpp's Windows side and the other touched files passclang++ --target=x86_64-w64-mingw32 -fsyntax-onlywith-DHOOKSHOT_FSR.fsr3fi: 600 of the last 600 made frames by FSR 3.1, 0 without its inputs; at 3x the renderer's own makes the set and the scene's inputs are no longer kept.Not tested
Known and left
RX_VK_FG_METHOD=fsr3does not start FSR 3.1 by itself (fsr3fi::asked()reads the row, andRX_VK_FSR_FGgoes over both); the row does.ffx::shutdown()is not called at exit.🤖 Generated with Claude Code