upscale: port Winlator-NeuralScale r5 (non-root parts)

Layer and bridges updated from Winlator-NeuralScale 71c140d9 (michaelisomer-cyber, GPL-3.0):
- full FSR 4.1 on the NPU (S8 graph, U8 fallback), compiled on the device per HTP arch
- ghosting fix: blank far depth when a game sends none, binding 11 bound with 62
- FSR 4.1.2 Lite S8/U8 zero-copy graphs
- Snapdragon GSR 2 on the GPU (new engine sgsr2_gpu)
- D3D11 DLSS through DXVK's interop (nvngx D3D11 entry points)

Left out on purpose: upstream's root-only performance/thermal manager, GPU clock floor and
bypass charging. Kept from DroidDeck: NPU detection by the app (DROIDDECK_UPSCALE_NPU, any HTP
generation incl. the phone's own QNN libraries) instead of upstream's SoC list, DD env names and
log tags, Intel XeSS 3 (runtime still fetched from a0ab6b0f, upstream dropped it in cb3ae04e).

FSR 4.0 on the NPU is gone upstream; the engine id becomes fsr4_1_full_npu and saved
fsr4_0_npu choices map to it. The full-FSR-4-on-Turnip guard is now opt-in
(DROIDDECK_UPSCALE_FULL_OFF_ON_TURNIP=1), since upstream's binding-11 fix targets that black frame.
Data files re-pinned to 71c140d9 (81 core + 8 NPU, sha256 checked).
This commit is contained in:
The412Banner committed 2026-12-04 18:52:36 -05:00
1 parent db5a03039e
commit 74ece6c854
40 files changed
+6765 -2026

No files matched your search

@@ -1142,8 +1142,11 @@ def directaudio_settings(env):
UPSCALE_ROOT = "/usr/local/lib/droiddeck-upscale"
UPSCALE_RUN = "/run/droiddeck-hud/upscale"
UPSCALE_MODES = ("fsr", "dlss", "native")
UPSCALE_ENGINES = ("fsr4_1_lite_gpu", "fsr4_1_full_gpu", "xess3_gpu", "fsr3_gpu", "fsr4_0_npu", "fsr4_1_lite_npu")
UPSCALE_NPU_FALLBACK = {"fsr4_0_npu": "fsr4_1_full_gpu", "fsr4_1_lite_npu": "fsr4_1_lite_gpu"}
UPSCALE_ENGINES = ("fsr4_1_lite_gpu", "fsr4_1_full_gpu", "xess3_gpu", "fsr3_gpu", "sgsr2_gpu", "fsr4_1_full_npu",
"fsr4_1_lite_npu")
# fsr4_0_npu: saved before full FSR 4.1 replaced FSR 4.0 on the NPU.
UPSCALE_ENGINE_ALIASES = {"fsr4_0_npu": "fsr4_1_full_npu"}
UPSCALE_NPU_FALLBACK = {"fsr4_1_full_npu": "fsr4_1_full_gpu", "fsr4_1_lite_npu": "fsr4_1_lite_gpu"}
UPSCALE_FSR_DLLS = ("libxess", "ffx_fsr3upscaler_x64", "ffx_fsr2_api_x64", "amd_fidelityfx_vk", "amd_fidelityfx_dx12",
"amd_fidelityfx_upscaler_vk", "amd_fidelityfx_upscaler_dx12", "amd_fidelityfx_loader_dx12")
UPSCALE_DLSS_DLLS = ("nvngx", "_nvngx", "nvngx_dlss", "nvapi64")
@@ -1235,6 +1238,7 @@ def upscale_settings(env, prefix):
return env, ["in-game upscaler chosen but its bridge pack is not installed; launched without it"]
result = dict(env)
engine = (env.get("DROIDDECK_UPSCALE_ENGINE") or "").strip().lower()
engine = UPSCALE_ENGINE_ALIASES.get(engine, engine)
if engine not in UPSCALE_ENGINES:
engine = "fsr4_1_lite_gpu"
if engine in UPSCALE_NPU_FALLBACK and env.get("DROIDDECK_UPSCALE_NPU") != "1":