docs(npu): vk-fsr4's GPU INT8 path, and the 4.1.2 licence check

This commit is contained in:
Kurt Himebauch committed 2026-11-29 19:29:24 -05:00
1 parent 3cc5787d99
commit 40358e3b02
1 file changed
+32 -2
+32 -2
View File
@@ -76,6 +76,33 @@ Caveats:
- Nothing has run on the NPU yet. A descriptor and a capability query are not a graph execution.
- The reference fork does not need any of this on devices where the node is world-writable.
## vk-fsr4 (han39835/vk-fsr4, GPL-3.0): FSR 4 INT8 on the GPU, no NPU
An implicit Vulkan layer plus a drop-in replacement for AMD's `amd_fidelityfx_upscaler_vk` provider. It runs FSR 4.1.2
as INT8 compute shaders on any Vulkan GPU with `shaderInt8` and `shaderIntegerDotProduct` (DP4a), and keeps the
cooperative-matrix FP8 path for RDNA 3/4. Aimed at AMD and Linux, but nothing in the INT8 path is vendor specific.
- **Assets:** 31 MB of precompiled SPIR-V for INT8 (1080, 2160 and 4320 tiers, each in `native` and `ultraperf`) plus
quantised weights. The DXIL from AMD's DLL was converted to SPIR-V at build time with `dxil-spirv`, which is not
linked into the provider. The tools to repeat that are in the repo (`tools/extract`, `tools/convert`).
- **Two entry points.** As an FFX provider, games that already call FSR 3/4 through the FFX API get FSR 4 with the
game's own motion vectors, depth and jitter: the exact inputs, and the most robust option. As a layer without the
API (`F4_MV=1`), it guesses which descriptor holds the motion vectors by fingerprinting Unreal TSR layouts. The
author says other engines "may or may not match", so only the provider mode is worth building on.
- **Licence, checked:** the author's claim that the 4.1.2 DLL is MIT licensed holds up. AMD's FidelityFX SDK 2.4.0
`license.md` starts with a restrictive default (binary-only redistribution, no reverse engineering) "except as noted
below". It then lists the files "subject to" an MIT licence, and that list includes
`signedbin/amd_fidelityfx_upscaler_dx12.dll` and `amd_fidelityfx_upscaler_vk.dll`. So the 4.1.x shaders and weights
are redistributable with the MIT notice, which removes the AMD half of the earlier licence concern for that version.
Which SDK version a given weights file came from still has to be pinned (the repo pins 4.1.2.4555 by SHA-256).
Qualcomm's QNN libraries are a separate matter. This is a reading of the licence file, not legal advice.
- **Frame generation:** FSR 4.0.2 ML frame generation is bundled but needs RDNA 4 WMMA, so it is not usable here.
- **Fit with DroidDeck:** GPL-3.0, same as DroidDeck. The provider route would sit in the guest, in front of
vkd3d-proton, where the game's FFX calls arrive. It needs no NPU access, so it works on the Thor.
- **Risk to check first:** the INT8 plan marks most passes `require_wave32`. Adreno runs 64 or 128 wide waves, so
either the passes can run at those widths or they need the variants the Winlator fork's Adreno path uses
(`dvj5411/fsr4vk`). Also unmeasured: INT8 FSR 4 on a handheld GPU may cost more than it saves at 1080p to 4K.
## Built so far
- `gpu/NpuInfo.kt`: maps the SoC model or board platform to a Hexagon generation (v68 to v81, with the VTCM size the
@@ -93,7 +120,10 @@ Caveats:
3. Check the binder route on an enforcing 8 Elite build and on an 8 Elite Gen 5 device. Thor (v73) has no route at all.
4. Decide the hook point. Guest-side (Winlator's approach) is the only one that can run FSR 4; compositor-side
limits it to spatial super-resolution.
5. GPU-only FSR 4.1 Lite (DP4a) behind the hook, since it needs no NPU access and exercises the same plumbing.
5. GPU-only FSR 4.1.2 INT8 (DP4a) as an FFX provider in the guest (see vk-fsr4), since it needs no NPU access and
exercises the same plumbing. First measure: wave size on Adreno, and cost per frame on the Thor.
6. Per-architecture QNN cache directories (`v73/`, `v75/`, `v79/`, `v81/`) and a fallback to the GPU path whenever
`NpuInfo.usable` is false.
7. Licence review of AMD weights and Qualcomm binaries before anything is bundled or downloaded.
7. Pin the exact AMD SDK version for any weights that ship (4.1.2.4555 is MIT per the SDK 2.4.0 licence file), keep
the MIT notice with them, and review Qualcomm's QNN licence separately before anything of theirs is bundled or
downloaded.