release: prepare 0.1.5 with RDNA2 kernels and in-game DLSS/FSR switching

- Add native preset K kernels for gfx1030–gfx1036 using software matrix
  products, with fast and accuracy builds and RDNA2 motion kernels.
- Follow OptiScaler's DLSS and RR preset overrides, sanitize unsupported
  values and select the preset matching the feature's quality mode.
- Enable FSR 4 under NVIDIA GPU spoofing by exposing real AMD PCI IDs
  to OptiScaler and FidelityFX modules; bundle AMD's loader and upscaler.
- Keep K on native kernels in engine auto mode unless HIP is selected,
  and fall back to CUDA for M/L when shader_float8 is unavailable.
- Add native-engine K GPU timings, preset recreation harness controls
  and regression coverage; fix the input-wait test's glibc name clash.
- Update configuration, installer guidance and release documentation,
  simplify the README and move gameplay videos to docs/videos.md.

RDNA2 kernels remain untested on RDNA2 hardware; software matrix
arithmetic was validated against WMMA on RDNA3.
This commit is contained in:
ayo committed 2026-10-17 16:05:09 -04:00
1 parent 34e6b0fe71
commit 0e851b7f90
24 files changed
+703 -174

No files matched your search

+16 -5
View File
@@ -1,12 +1,12 @@
Modified in this fork for CUDA Ray Reconstruction support and validation (2026).
d4r @VERSION@: NVIDIA DLSS on AMD Radeon RDNA3 and RDNA4 under Linux and Proton
=====================================================================
d4r @VERSION@: NVIDIA DLSS on AMD Radeon RDNA2, RDNA3 and RDNA4 under Linux and Proton
=====================================================================================
d4r runs NVIDIA's own DLSS Super Resolution (DLSS 4 by default), plus experimental Ray Reconstruction,
on AMD Radeon GPUs in DirectX 12 games under Proton. OptiScaler (included) catches the game's DLSS calls
and hands them to d4r. d4r runs NVIDIA's DLSS through ZLUDA; the heaviest Super Resolution kernels are
replaced by kernels written for RDNA3 and RDNA4.
replaced by kernels written for RDNA2, RDNA3 and RDNA4.
This is an early release. Super Resolution game testing primarily uses Radeon RX 7700 XT.
Ray Reconstruction presets D/E, temporal history, and separate alpha were validated on RX 9070 XT
@@ -16,11 +16,15 @@ SUPPORTED_GAMES.md in the source repository lists per-game setup notes. Expect p
What you need
-------------
- An AMD RDNA3 or RDNA4 GPU. This build includes native DLSS 4 and 4.5 network kernels for
- An AMD RDNA2, RDNA3 or RDNA4 GPU. This build includes native DLSS 4 and 4.5 network kernels for
gfx1100–gfx1103 and gfx1200–gfx1201 unless the builder selected fewer targets. Only the RX 7700 XT
(gfx1101) has been tested on a real GPU. gfx1201 has emulator testing; gfx1200 has compile testing
only. Neither establishes RDNA4 runtime support, performance or driver stability. Texture-kernel
optimisations are included only for targets supplied by the builder.
RDNA2 (RX 6000 series, Steam Deck, RDNA2 integrated GPUs; gfx1030–gfx1036) has no WMMA instructions:
this build gives it native DLSS 4 (K) layers that do the matrix products in software, bit-identical
to the WMMA kernels when run on RDNA3. Use K or E there; M and L run fully translated (slow). RDNA2
itself has not been tested on a real GPU.
- Linux with the amdgpu kernel driver (/dev/kfd). ROCm itself is not needed: the zip includes the
ROCm 7.2.4 runtime in d4r/rocm. RocmDir in d4r/d4r.ini selects another ROCm installation instead.
- GE-Proton 11 (tested: GE-Proton11-3), selected for the game in Steam.
@@ -46,7 +50,8 @@ that archive's d4r/README.txt: setup runs automatically when the ASI loads.
1. Extract everything in this zip into the folder that holds the game's main .exe. For Unreal
Engine games that is <game>/<Project>/Binaries/Win64/, next to <Project>-Win64-Shipping.exe.
You get dxgi.dll, OptiScaler.ini, d3d12.dll, d3d12core.dll, this file and a d4r folder.
You get dxgi.dll, OptiScaler.ini, d3d12.dll, d3d12core.dll, AMD's amd_fidelityfx_dx12.dll and
amd_fidelityfx_upscaler_dx12.dll (OptiScaler's FSR option), this file and a d4r folder.
When updating, replace both d3d12 DLLs with the shim: it requires their resource-lifetime extension.
If the folder already has a dxgi.dll or OptiScaler.ini (another OptiScaler install), move those
out of the way first. Also remove PROTON_USE_OPTISCALER from the game's launch options if you
@@ -122,6 +127,12 @@ Settings
@full there, d4r uses the normal path.
@clean Build the models with the tools in d4r's source repository (engine/README.md); until they are
@clean there, d4r uses the normal path.
- Switching in game, from OptiScaler's menu (Insert):
- DLSS model: DLSS Settings > tick Render Presets Override, pick the preset (E, K, L or M) and press
Apply Changes. Unticking it goes back to Model above. ([OptiScaler] FollowPresets = false ignores it.)
- FSR: set Upscaler (DX12) to FSR 3.X/4. RDNA3 and RDNA4 get FSR 4.1 from GE-Proton's AMD FSR 4
library; other GPUs get FSR 3.1. d4r lets OptiScaler and AMD's FSR see the real GPU while the game
still sees an NVIDIA one ([OptiScaler] Fsr4 = false turns that off).
- OptiScaler.ini: OptiScaler's settings, such as its fps overlay and the render resolution of each
quality mode. Press Insert in game for OptiScaler's menu.
[Libraries] NvngxPath=d4r\nvngx.dll explicitly selects d4r's shim; OptiDllPath=d4r is also
+6 -2
View File
@@ -1,8 +1,12 @@
<!-- Modified in this fork for CUDA Ray Reconstruction support and validation (2026). -->
# Unreleased
# 0.1.5
- Switch the DLSS model in game from OptiScaler's menu: DLSS Settings > Render Presets Override, pick E, K, L or M, Apply Changes. A preset chosen there (or `RenderPresetOverride` in OptiScaler.ini) now wins over `[DLSS] Model`, which still fills quality modes left at Default and applies again when the override is unticked (`[OptiScaler] FollowPresets`, default true). The shim now also uses the preset of the feature's own quality mode instead of always the Quality slot.
- Switch to FSR from the same menu (Upscaler (DX12) > FSR 3.X/4): the zip ships AMD's FidelityFX loader and FSR 4.1.1 upscaler from the OptiScaler release, and the shim lets OptiScaler and AMD's FidelityFX modules read the GPU's real PCI ids (from sysfs) while the game, vkd3d-proton and NVIDIA's libraries keep the NVIDIA identity (`[OptiScaler] Fsr4`, default true). Under the NVIDIA identity OptiScaler saw no RDNA GPU and FSR 4.1.1 produced FSR 3.1's output byte for byte; now RDNA3 and RDNA4 get FSR 4.1 (through GE-Proton's FSR 4 library; the harness output is byte-identical to FSR 4 without the spoof) and other GPUs FSR 3.1. DLSS output is unchanged.
- RDNA2 (gfx1030–gfx1036: RX 6000 series, Steam Deck, RDNA2 integrated GPUs): native DLSS 4 (K) layers. RDNA2 has no WMMA, so `kernels/common/wmma_layout.h` does each 16×16×16 product with `v_dot2c_f32_f16` and a `row_share` DPP broadcast folded into the instruction, in the gfx11 register layout. On an RX 7700 XT this path is bit-identical to the WMMA instruction (random chains and K's whole network over 24 frames) and runs K in 3.6 ms per 1080p frame (WMMA: 1.48 ms; fully translated without WMMA, which RDNA2 got before: 46.8 ms; RDNA2 also keeps K's output tail translated, about +0.7 ms on RDNA3). E runs translated, as on every GPU; M and L are translated only on RDNA2. Not yet run on RDNA2 hardware.
- `install.sh` sets up the native engine: after the NVIDIA DLLs (now also DLSS Ray Reconstruction 310.9.1) it offers to build the engine's models on the user's machine (`d4r/tools/build-engine-models.sh`): Ray Reconstruction D, E and F straight from `nvngx_dlssd.dll`, Super Resolution K, M and L (and their LDR variants) from one test frame per model rendered through d4r under GE-Proton. The verified DLLs and the built models are kept in `~/.cache/d4r`, so the next game's install neither downloads nor builds again. Questions replace the old command-line choices (`--help` lists options for scripted installs).
- `[Engine] Enabled = auto` is the new default: the engine (the faster path) runs whenever `d4r/engine` holds its models, with the fastest model builds; anything it cannot run still uses the CUDA backend.
- `[Engine] Enabled = auto` is the new default: the engine runs whenever `d4r/engine` holds its models, with the fastest model builds; it is faster on RDNA4. Anything it cannot run still uses the CUDA backend.
- Not in this build: the experimental AMD FSR Ray Regeneration backend for Ray Reconstruction (`[RayReconstruction] Backend = fsr`) that an earlier nightly carried. Its code is not part of d4r's sources; Ray Reconstruction runs on NVIDIA's DLSS denoiser (engine or CUDA backend).
- ASI setup ignores Proton accessibility helpers and other background utilities, and serializes setup per plugin installation. Its D3D12 configuration uses regular Windows library hooks and disables Agility SDK upgrades. Game-specific startup remains a separate runtime check.
+4
View File
@@ -42,6 +42,10 @@ Third-party software, unmodified or patched by d4r:
License: d4r/licenses/OptiScaler-LICENSE-GPL-3.0.txt
OptiScaler.ini OptiScaler 0.9.4's OptiScaler.ini with the values d4r needs set
(packaging/optiscaler.settings in the d4r repository)
amd_fidelityfx_dx12.dll, amd_fidelityfx_upscaler_dx12.dll
AMD FidelityFX SDK 2.3 loader and FSR 4.1.1 upscaler (MIT), unmodified, as shipped in
the OptiScaler 0.9.4 release. https://github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK
License: d4r/licenses/FidelityFX-LICENSE.txt
@clean Not included: NVIDIA's DLSS libraries (nvngx_dlss.dll, nvngx_dlssd.dll) and NGX runtime (_nvngx.dll). You supply them
@clean and are responsible for complying with NVIDIA's license terms.
+1 -1
View File
@@ -1 +1 @@
0.1.4
0.1.5
+13 -1
View File
@@ -22,6 +22,16 @@ Model = K
; true shows it.
ShowWatermark = false
[OptiScaler]
; Switching in game from OptiScaler's menu (Insert):
; - DLSS model: DLSS Settings > tick Render Presets Override, pick the preset (E, K, L or M), Apply Changes.
; Unticking it goes back to [DLSS] Model, as do presets left at DEFAULT. false always uses [DLSS] Model.
FollowPresets = true
; - FSR: Upscalers > Upscaler (DX12) > FSR 3.X/4. FSR 4.1 needs an RDNA3/RDNA4 GPU and GE-Proton (which provides
; AMD's FSR 4 library); other GPUs get FSR 3.1. true lets OptiScaler and AMD's FSR see the real GPU (the game
; still sees an NVIDIA one).
Fsr4 = true
[RayReconstruction]
; Requires a CUDA-capable nvngx_dlssd.dll (tested: 310.7) beside nvngx.dll and RR enabled in game.
; auto uses the denoiser when available; false disables the route.
@@ -94,7 +104,9 @@ DirectOutput = auto
; ([Latency] / [Interop] do not apply). Needs Mesa RADV with VK_KHR_cooperative_matrix and the models install.sh
; builds in d4r\engine (k, k-ldr, m, m-ldr, l, l-ldr, rr-d, rr-e, rr-f). Games or settings it does not cover,
; and a device that cannot run it, use the normal path; d4r_nvngx.log says why.
; auto = on when d4r\engine holds a model, true / false = always / never.
; auto = on when d4r\engine holds a model, except model K, which stays on the native kernels (faster than the
; engine's Vulkan network: 2.35 vs 3.59 ms at 1440p Quality on a 7700 XT) unless Network = hip; and M and L need
; VK_EXT_shader_float8 (RDNA4), elsewhere they stay on the normal path. true / false = always / never.
Enabled = auto
; Another model K folder for games with the HDR flag (a path relative to the d4r folder, or a Windows path
; such as Z:\home\me\k)