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/upscaling
beanstalk: approved @ 1697603
beanstalk: approved @ 2c5a62e
beanstalk: approved @ 4fd82b7
beanstalk: approved @ 64d6d09
beanstalk: approved @ 6f91fae
beanstalk: approved @ 70a78f9
beanstalk: approved @ 8d361dc
beanstalk: approved @ 9d8356e
beanstalk: approved @ abf2227
beanstalk: approved @ d82f202
beanstalk: approved @ e5f1e40
beanstalk: approved @ ee8ab5f
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
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
testing wanted
ci: approved
No milestone
No project
No assignees
1 participant
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; 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.nx2/build.py,nx2/pipeline_share.pyandscripts/dev_packs.pyknow the new file; no shader-stamp input changed.tests/test_xess_rules.py(new) and the upscaler rows, menu keys, temporal jitter, recorder sync and shader stamp checks updated for the two values.RX_VK_XESSrow indocs/development.md, 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.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. The game was not run after either 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=0-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.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).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)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.Turning it off:
RX_VK_XESS=0(Intel's library is then not even loaded), or another Upscaler choice, or takinglibxess.dllaway. Reverting the commit 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): 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).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).3fdd4ed8eeea138e608aView 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.