feat(vk): the FSR 4 model row on Linux, with fsr4up-vk's library #2506
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
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
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!2506
Loading…
Reference in a new issue
No description provided.
Delete branch "roblesleo/Longshot:fsr4-linux-model-row"
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?
Summary
On Linux the FSR 4 model row kept a saved Lite value and always ran Auto: there is no AMD provider to hook, because the library beside the game is not AMD's. This makes the row work there with fsr4up-vk's library, which carries AMD's four FSR 4.1.2 networks and reads the one to run from
FSR4UP_INT8each time a context is made.loadrecognises that library by the name it lists itself under,4.1.2 (fsr4up-vk)(fsr4_models::names_fsr4up), and shows the row on any GPU it runs on.make_contextsetsFSR4UP_INT8=litefor Lite and unsets it for Auto just before the create call, and again before the retry as Auto when Lite fails.FSR4UP_INT8the player set themselves is left as it is: the row is hidden and the log says so.Why an environment variable: it is the only selector fsr4up-vk has, and it reads it at context creation, so the row stays live as on Windows.
setenvin a threaded process is the part I would look at first: contexts are made one at a time, but tell me if you would rather set it once at load and ask for a restart.Read first:
make_contextand the end ofloadingpu/vk/vk_fsr4.cpp.Testing
Tested: SteamOS, Legion Go (Ryzen Z1 Extreme, Radeon 780M, RADV Mesa 26.2.0-devel), nightly-801's builder with this branch's files, FSR 4 forced, Castle Town, 3 minutes each.
RX_VK_FSR4_MODEL=lite: the game logsmodel: Lite (INT8, forced), AMD's shaders; fsr4up-vk's own log (FSR4UP_LOG) saysthe INT8 FSR4L-i8 (... FSR4UP_INT8) network.RX_VK_FSR4_MODEL=auto:model: Auto (AMD's), tuned; fsr4up-vk saysthe INT8 FSR4-i8 (... AMD's DLL offers no FSR 4.1.2 here: offered anyway) network.tests/fsr4_models_test.cpp: new cases for the name check and the value written. Passes.The whole suite on my Windows PC,
python -I -B tests/run_all.py --jobs 6(not--strict: this PC lacks the Vulkan and SPIR-V headers and spirv-val, so 137 checks are skipped): 817 passed, 26 failed. The 26 checks that fail are the same 26, by name, that fail onmain@9046a8d7here, none of them one this change touches:test_auto_handheld,test_bug_report,test_build_long_paths,test_cmpflags,test_crash_dialog,test_dev_ab,test_dev_build,test_dev_migrate,test_discover,test_fastfp_fma,test_fma_soft,test_fpx_sticky,test_fpxkeep,test_game_menu_mouse_buttons,test_input_movie,test_lift_lookups,test_linux_preflight,test_make_game_cache,test_pads_after_menu,test_perf_report,test_sdiv_overflow,test_spawn_emit,test_vbytes,test_vecfp,test_vfpx_elem,test_walk.Still to test:
FSR4L-i8in fsr4up-vk's log and no error (by hand, or the Test Farm).Measurements
Verdict: Lite is about 5% faster than Auto on this GPU, as the row's help says it should be.
Setup: SteamOS, Radeon 780M, RADV Mesa 26.2.0-devel, performance profile, Castle Town, 1286x804 -> 1382x864, one run each, the last 5 readings.
a4833e09a4833e09Baseline: this PR's build with the row on Auto, which is what
main@9046a8d7runs with the same library (there the row does nothing on Linux); I did not buildmainitself for this.One run each, so read it as a direction, not a number.
Risks
Linux only, and only with fsr4up-vk's library beside the game.
setenv/unsetenvat context creation. Turn it off by leaving the row on Auto, or withRX_VK_FSR4_MODEL=auto. Nothing changes after updating for a player without that library.Checklist
Ready for review
main; the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named).main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
tests/that reads changed source is updated, not weakened.Assisted-by:/Co-Authored-By:trailers.Possibly related, for context:
Checks on my Windows PC:
python -I -B tests/run_all.py --changedagainst currentmain: 22 passed, 0 failed, 5 skipped (the skipped ones need the Vulkan headers or spirv-val, which this PC lacks). Not the fullmise run test, and not--strict, so I am leaving WIP in the title until CI has run.On #2495: it changes the same lines of
make_context(when a forced Lite context is tuned). No conflict of intent; whichever merges second rebases, and I will do it if that is this one.WIP: feat(vk): the FSR 4 model row on Linux, with fsr4up-vk's libraryto feat(vk): the FSR 4 model row on Linux, with fsr4up-vk's libraryfeat(vk): the FSR 4 model row on Linux, with fsr4up-vk's libraryto WIP: feat(vk): the FSR 4 model row on Linux, with fsr4up-vk's libraryWIP: feat(vk): the FSR 4 model row on Linux, with fsr4up-vk's libraryto feat(vk): the FSR 4 model row on Linux, with fsr4up-vk's libraryView command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.