feat(vk): Intel XeSS Super Resolution as a temporal upscaler (Vulkan, the player's libxess.dll) #459
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/tooling
area/upscaling
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
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!459
Loading…
Reference in a new issue
No description provided.
Delete branch "nyannoying/Longshot:feat/xess-sr"
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: feat · Risk: low · Tested on: Windows 11, Intel Arc B580 (driver 32.0.101.9154) · Needs: Windows with an Arc A-series card or an Intel iGPU; Windows with an AMD or NVIDIA GPU; a Linux build
Why
Intel Arc owners have no upscaler made for their GPU: DLSS needs an NVIDIA card and FSR 4 an RDNA 4 one. Intel's XeSS Super Resolution has a Vulkan API, so it can sit on Longshot's frame chain beside them.
No issue is linked: the description before this one listed none.
What changed
The Upscaler row gets two new values, "Intel XeSS" and "Intel XeSS Native AA". They run Intel's XeSS Super Resolution through its Vulkan API, from the
libxess.dllthe player puts beside the game, or that the build downloads on the player's PC when asked (make_game.py --fetch-xess-runtime --accept-intel-license, RecompLauncher's Intel XeSS tick); Longshot holds only Intel's MIT-licensed API headers. Without Intel's file, or on Linux, the game starts as before.gpu/vk/vk_xess.cpp(new) loads the player'slibxess.dllwithLoadLibraryExA, resolves its functions by name, asks it for the Vulkan instance extensions, device extensions and features it needs before the instance and the device are made, and runs XeSS on the temporal chain.gpu/vk/xess_rules.h(new) chooses the preset for a render size.vk_temporal.cpp,vk_main.cppandvk_draw.cppcall it; on Linux it is a stub that says why.upscaler_rows.h,vk_menu.cpp,auto_settings.h). When Intel's file or something it needs is missing, the row's hint says what; the game starts as before.third_party/xessholds Intel's MIT-licensed API headers only (xess.h,xess_vk.h,MIT.txt) with aPROVENANCE.md.libxess.dllis Intel's, under Intel's own licence, and is never in the repository or a build: the player puts it beside the game, or the build downloads it on the player's PC (next point).scripts/xess_sdk.py(new) andmake_game.py --fetch-xess-runtime --accept-intel-license(Windows) downloadlibxess.dll2.0.2.68 (78 MB, signed by Intel) with Intel's licence and third-party notices from intel/xess at de0fb9c1, the commit the headers come from, each file checked against its SHA-256, intoLONGSHOT_XESS_SDK(defaultwork/xess-sdk) before the build and into the game folder after it. Nothing is downloaded without Intel's licence accepted (the flag, or a typed yes). Alibxess.dllthe player put in the game folder that is not this one is left alone, and the build says so. It works as AMD's FSR runtime fetch does (scripts/ffx_sdk.py,--fetch-fsr-runtime).recomplauncher.jsongets an Intel XeSS tick (Windows, off until Intel's licence is accepted), and the Builder's--clidropsLONGSHOT_XESS_SDKas it drops the DLSS and FSR SDK folders. The Longshot Launcher's switch, which passes the same two flags, is LongshotLauncher#110.nx2/build.py,nx2/pipeline_share.pyandscripts/dev_packs.pyknow the new file; no shader-stamp input changed.tests/test_xess_rules.pyandtests/test_xess_sdk.py(new; the second without the network), the upscaler rows, menu keys, temporal jitter, recorder sync and shader stamp checks updated for the two values, main's history-reset fixture (tests/test_temporal_history.py) given XeSS's reset, and the Builder's--clicheck (tests/builder_cli) givenLONGSHOT_XESS_SDK.RX_VK_XESSrow indocs/development.md, XeSS indocs/temporal-history.md's PsychoV35 and history-reset text, a line inCONTRIBUTING.md.Reviewer notes:
third_party/xess/PROVENANCE.mdhas the blob ids).libxess.dllis loaded by name at run time and the import library is not linked.libxess.dll(the Intel Simplified Software License,LICENSE.txtat de0fb9c1) allows using and redistributing it unmodified in binary form with its notice kept. The build still only downloads it on the player's PC once the player has accepted that licence, as for AMD's and NVIDIA's files, and keeps the licence and Intel's third-party notices beside it.upscaler_rows.htakes_psychov35), behind its HDR context (RX_VK_XESS_HDR=0prevents it). Not run in the game.Measurements
Verdict: it works on the Arc B580: Intel XeSS and its Native AA both run every frame with a right picture. XeSS costs about 1.7 ms of GPU time a frame more than the game's own upscaler at the same render size, Native AA 3.6 ms more; the frame rate is about the same three ways, because the CPU limits the frame at this spot. Not compared with main (see Baseline).
main when measured:
cf605c85(2026-11-14)this PR when the description was written: feat/xess-sr @
9cd76bec; the build that ran: b46daa73Hardware: Intel Arc B580 12 GB, driver 32.0.101.9154; Core i5-13600K; 64 GB; Windows 11 Pro (26100-series Insider, 10.0.29704)
Scene: Kokiri Forest (child), the spawn spot on Link's balcony after the opening, standing still; 2048x1152 output, render size 1366x768 (67%), frame generation off, uncapped (
HOS_FPS_MAX=1000);libxess.dllfrom Intel's XeSS SDK 3.0.2 (it reports XeSS 2.0.2)Method: 6 runs on one build, the upscaler alternated (off, XeSS, Native AA, off, XeSS, Native AA) with
RX_VK_XESS=0/1/2, each about 50 s standing after the load; fps from the log'svi: ... frames presented (... fps over the last 5.0 s)lines (last 8 windows, their median), GPU time fromvk: GPU time ... ms a frame(last 5 lines, their median).How to reproduce: put
libxess.dllbeside the game, choose Upscaler > Intel XeSS in the Graphics tab (orRX_VK_XESS=1), stand in Kokiri Forest; the log saysvk: Intel XeSS: 1366x768 -> 2048x1152 (Ultra Quality).Baseline: the before column is this PR's own build with
RX_VK_XESS=0(the game's own upscaler), XeSS never loaded. main itself was not the comparison because on the B580 it loses the device entering Kokiri Forest (#444). The build that ran is b46daa73, this change on maincf605c85, with three more changes in: #444's float-add fix, the uniform snapshot of #446 and the split rule of #443. The branch was then rebased onto main26a2eab0(9cd76bec; one conflict, inscripts/dev_packs.py's list of renderer-only folders, where main's new lines are kept andthird_party/xess/added) and was not run in the game again: a main-based build has another shader stamp than this card's prepared caches. It has since been rebased again, onto main2b1d38c6(one conflict, intests/test_shader_stamp_cache.py, both sides kept, no source line changed) onto main7bacf846(four conflicts, inupscaler_rows.h,vk_temporal.cpp,nx2/build.pyanddocs/development.md, where main's FSR 3.1 additions and PsychoV35 route touched the same lines: both sides kept, XeSS added beside FSR 3.1), and onto mainbbe7a078(one conflict, innx2/make_game.py: Intel's library placed before main's new "swap and runtimes" timing mark); with the download added between those two. The game was not run after any rebase, so the numbers below are from b46daa73.RX_VK_XESS=0(the game's own upscaler): this PR @ b46daa73At this spot the frame is limited by the CPU (about 28 ms a frame against 12-15 ms of GPU time), so the frame rate is about the same three ways; what XeSS costs shows in the GPU time: about 1.7 ms a frame more than the game's own upscaler at the same render size, and 3.6 ms more for Native AA, which also renders at full size.
Screenshots: Kokiri Forest spawn, Arc B580, posted in the first comment (the game's own upscaler, Intel XeSS, Intel XeSS Native AA, from the measured runs).
Flags and settings
Two new values on the Upscaler menu row (saved under the options file's existing
dlsskey), three new switches for one run, and one build define.dlss=7), Intel XeSS Native AA (dlss=8)longshot_options.iniRX_VK_XESS=0/1/2RX_VK_XESS_DIR=<folder>libxess.dllRX_VK_XESS_HDR=0make_game.py --fetch-xess-runtime --accept-intel-licenselibxess.dll2.0.2.68 and its notices into the game folder; without the second flag the build stops before downloadingrecomplauncher.json)LONGSHOT_XESS_SDK=<folder>work/xess-sdk-DLONGSHOT_XESSnx2/build.pyforvk_xess.cppalonelibxess.dll; Linux: the stubs that say XeSS is Windows onlyTesting
Tested: Arc B580, driver 32.0.101.9154, Windows 11, Kokiri Forest: the six runs above (files in
docs/tested/); XeSS and Native AA both make their context, run every frame and show a right picture (first comment). WithRX_VK_XESS=0Intel's library is not loaded.python -I -B tests/run_all.py: on the head as it was after the first rebase (9cd76bec), 487 passed, 6 failed, 70 skipped; the failures weretest_module_ids,test_pad_layout,test_tested_configurations,test_oot_state_tap,test_fpx_stickyandtest_spawn_emit, which failed the same way on main here. On the head as it is now: 15 checks fail on this Windows PC and fail the same on main2b1d38c6alone (test_fpx_sticky, test_appimage_player_build, test_cpm_discovery, test_crash_dialog, test_env_on, test_lift_cleanup_error, test_make_game_cache, test_linux_preflight, test_oot_state_tap, test_readback_late, test_spawn_emit, test_tested_configurations, test_vk_pgo, test_vram_budget_row, test_walk_key).python -I scripts/check_third_party.pypasses with the newthird_party/xess.On the head as it is now (
6a7f71be, on mainbbe7a078): the renderer builds on Windows (llvm-mingw, 0 failed);tests/run_all.pygives 519 passed, 20 failed, 75 skipped, and the same 20 fail on mainbbe7a078alone here too (test_fpx_sticky, test_cpp_preflight, test_appimage_player_build, test_auto_handheld, test_crash_dialog, test_crt_options, test_env_on, test_lift_cleanup_error, test_make_game_prepare, test_make_game_cache, test_linux_preflight, test_missing_nup, test_options_budget_once, test_oot_state_tap, test_readback_late, test_spawn_emit, test_tested_configurations, test_vk_pgo, test_walk_key, test_vk_occlusion_queries).tests/test_xess_sdk.py(14 checks),tests/test_temporal_history.py(8,455 checks, XeSS's reset among them) and the Builder's--clicheck (187 assertions, .NET 8) pass. The download for real:python -I scripts/xess_sdk.py --accept-intel-license --game <folder>fetched the three files in 26 s, each matched its SHA-256 (libxess.dllis the very file the measured runs loaded), a second run downloaded nothing, and without the licence accepted it downloaded nothing and exited 2.Not tested: choosing the value in the menu in this session (the runs used
RX_VK_XESS); native HDR with XeSS; the render sizes other than 67% and 100%; other areas; cutscenes; frame generation together with XeSS; GPUs other than the B580 (XeSS's path for non-Intel GPUs); a missing or oldlibxess.dllin the game; the rebased head in the game (see Baseline: the game was not run after either rebase); a Linux build (no Linux compiler on this PC; the Linux side is a stub, so the checklist's two-platform box is left out, not ticked); a whole game build with--fetch-xess-runtime(it would prepare this card's shaders again; the steps it adds are the ones checked above) and RecompLauncher's tick.Must be tested:
libxess.dllbeside the game: choose Upscaler > Intel XeSS and then Intel XeSS Native AA from the menu, expecting a right picture and thevk: Intel XeSS:lines in the log (by hand: look at the picture and the log; test request T-UUJ4, open)make_game.py --fetch-xess-runtime --accept-intel-license), expecting Intel's licence shown first,libxess.dll,LICENSE-INTEL-XESS-SDK.txtandTHIRD-PARTY-INTEL-XESS-SDK.txtin the game folder after the build, and Intel XeSS offered in the Upscaler row on an Intel GPU (by hand: look at the game folder and the row)Risks
What could break: nothing until the player chooses Intel XeSS in the Upscaler row and has put Intel's
libxess.dllin place. The file is looked for inRX_VK_XESS_DIR, beside the exe, then in the game folder (xess_rules.hlibrary_dirs); without it the two values are not offered, the row's hint says the file was not found, and the game starts as before. With the file there, its Vulkan instance and device extensions and features are asked for at start even when another upscaler is chosen; when the driver lacks one, XeSS is left out with the reason in the log and the hint. Windows only: a Linux build compiles the stubs.The download, only when a build is given
--fetch-xess-runtime(a launcher's tick): 78 MB from github.com/intel/xess before the build starts; when it cannot be had or is not the file expected, the build stops there with the reason, as with AMD's FSR runtime.Turning it off:
RX_VK_XESS=0(Intel's library is then not even loaded), or another Upscaler choice, or takinglibxess.dllaway; for the download, the tick left off. Reverting the commits removes it.Compatibility: the options file gets no new key: the existing
dlsskey takes two more values, 7 and 8, added after Off (6), so saved options keep their meaning. The shader cache stamp does not change: the diff touches none of the stamp's files (gpu/vk/eden,sirit,compat,vk_shader.cpp,vk_bank.cpp,vk_state.h), so nothing is translated again because of this PR.MKWVK_API_VERSIONdoes not change:gpu/vk/vk_api.his not in the diff. The builder's tools:nx2/build.pycompilesvk_xess.cppwith Intel's headers on Windows,nx2/pipeline_share.pyknows the two new Upscaler names,scripts/dev_packs.pycountsthird_party/xess/as renderer-only. Saves: the diff touches no save code.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): 20 checks fail on this Windows PC and fail on mainbbe7a078alone too (named under Testing).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).tests/that reads changed source updated in this PR, not weakened.🤖 Generated with Claude Code
Kokiri Forest, the spawn spot, Arc B580 (101.9154), 2048x1152 output, from runs X4 to X6 of the Measurements (one build, only
RX_VK_XESSdiffers; the scene moves a little between runs).The three test requests are open (T-UUJ4: Arc A-series or an Intel iGPU; T-3X7L: an AMD or NVIDIA GPU; T-3N56: a Linux build) and named in the description; they wait for a maintainer's testing wanted label.
WIP: feat(vk): Intel XeSS Super Resolution as a temporal upscaler (Vulkan, the player's libxess.dll)to feat(vk): Intel XeSS Super Resolution as a temporal upscaler (Vulkan, the player's libxess.dll)00458c6d1b3fdd4ed8eeRebased onto main
26a2eab0(it had moved; one conflict in scripts/dev_packs.py, main's new stamp lines kept and third_party/xess/ added to the renderer-only folders). The diff of the change is otherwise the same, so the measurements stand; the suite on the new head: 487 passed, 6 failed (the six that fail on main here), 70 skipped.Rebased onto main
2b1d38c6(headea138e60); it had stopped merging.tests/test_shader_stamp_cache.pyonly, where main's renderer profile tests (#569) and this PR'stest_xess_reaches_only_vk_xess_on_windowswere added at the same place. Both kept; no source line of the PR changed.tests/run_all.py: 494 passed, 15 failed, 70 skipped. The same 15 fail on main2b1d38c6alone on this PC (run one by one there),test_shader_stamp_cache.pyis not among them.cf605c85with the open Arc fixes).3fdd4ed8eeea138e608aPlease rebase and add to launcher!
This pull request now conflicts with
main: files docs/development.md, gpu/vk/upscaler_rows.h, gpu/vk/vk_temporal.cpp and nx2/build.py, touched onmainby #608, #577, #857, #629. Could you rebase it onto the currentmain? Thank you.ea138e608a9dc5db0b4fRebased onto main
7bacf846(head9dc5db0b), and the download added for the launchers.upscaler_rows.h,vk_temporal.cpp,nx2/build.py,docs/development.md), each where main's FSR 3.1 and PsychoV35 changes (#608 among them) touched the same lines. Both sides kept, XeSS added beside FSR 3.1 (takes_psychov35, the PsychoV35 wait and log lines, the docs). Main's new history-reset fixture (tests/test_temporal_history.py) now checks XeSS's reset too.make_game.py --fetch-xess-runtime --accept-intel-licensedownloads Intel's signedlibxess.dll2.0.2.68 with Intel's licence and third-party notices (intel/xess at de0fb9c1, the commit the headers come from, each file checked against its SHA-256) and puts them in the game folder, as--fetch-fsr-runtimedoes for AMD's runtime. Nothing is downloaded without Intel's licence accepted.recomplauncher.jsongets an Intel XeSS tick. The Longshot Launcher's switch, passing the same two flags, is a pull request of its own in MagicBeanDev/LongshotLauncher.tests/run_all.py: 516 passed, 20 failed, 75 skipped; 19 of the 20 fail on main7bacf846here too, and the 20th only in the parallel run.tests/test_xess_sdk.py14 of 14, the Builder's--clicheck 187 assertions. A real download: 26 s, each file matched its SHA-256.9dc5db0b4f6a7f71beb3Main moved again during the push (6 commits): rebased onto
bbe7a078, head6a7f71be. One conflict, in nx2/make_game.py, where #631 added a timing mark after the runtimes are placed: Intel's library is placed before it, with the other runtimes. The renderer builds (0 failed); tests/run_all.py 519 passed, 20 failed, and the same 20 fail on mainbbe7a078alone on this PC (the list is under Testing).Added to the launcher: LongshotLauncher#110. Its build settings get an Intel XeSS switch (Windows, Intel graphics), which shows Intel's licence first and then passes
--fetch-xess-runtime --accept-intel-licenseto this PR'smake_game.py. It stays off for tools withoutscripts/xess_sdk.py, so either PR can be merged first.