d4r README

The project's README from github.com/countervolts/d4r. As one markdown file: README.md.

d4r (dlss 4 radeon)

want to run xess (xmx) on radeon? check out x4r!

nightly releases for d4r can be found here

d4r runs NVIDIA's official DLSS Super Resolution (nvngx_dlss.dll) and experimental Ray Reconstruction (nvngx_dlssd.dll) in DirectX 12 games on AMD Radeon GPUs, on Linux (Proton) and natively on Windows. The game asks for DLSS as usual; OptiScaler hands the call to d4r, which runs the network on the AMD GPU: on d4r's own native engine where it covers the model, otherwise through ZLUDA (CUDA on ROCm/HIP) with the heaviest kernels replaced by hand-written RDNA2, RDNA3 and RDNA4 code.

Supported DLSS models: DLSS 3 CNN (E), DLSS 4 transformer (K, default), and DLSS 4.5 transformer (M, plus L for Ultra Performance). Ray Reconstruction presets D, E and F are experimental. DLSS 5 is PURPOSELY not supported.

Proof of concept: d4r shows that dlss can be ran on radeon gpus. See supported games for the tested games and models.

Not affiliated with NVIDIA or AMD.

To contact me my discord is ._ayo. or join the d4r discord server

Install

The release zips do not contain NVIDIA's files. Their installers download the pinned official DLSS, Ray Reconstruction and NGX files from NVIDIA, check their SHA-256 hashes and keep a verified copy in a per-user cache.

Linux (Proton)

  1. Extract d4r-<version>.zip into the folder that holds the game's main .exe (OptiScaler 10.0.0-pre1 as dxgi.dll with its OptiScaler/ dependencies, d4r_boot.dll, the d4r-patched vkd3d-proton, AMD's FSR files and the d4r folder).
  2. Run bash install.sh there. It installs NVIDIA's DLLs into d4r/ and builds the native engine's models from them. Needs Bash, curl, sha256sum, 7-Zip and python3 with numpy; no sudo, ROCm not required.
  3. In Steam, select a Proton version for the game (tested: GE-Proton11-3). No launch options are needed.

d4r_boot.dll, which d4r's dxgi.dll loads first, shows the game an NVIDIA GPU (what PROTON_FORCE_NVAPI=1 DXVK_NVAPI_GPU_ARCH=AD100 did before; those options still work and can be removed). When updating, replace dxgi.dll, d4r_boot.dll, d3d12.dll, d3d12core.dll and d4r/nvngx.dll together.

The full guide ships in the zip as D4R_README.txt. Already using OptiScaler? The -asi zip adds d4r as a plugin (ASI guide).

DLSS Frame Generation (NVIDIA's own, 2x-6x, and FG Lite) runs on RDNA3 and RDNA4: install.sh sets it up (it downloads DLSS-G 310.9.16 from NVIDIA's Streamline SDK and translates it on your machine), also for games without DLSS-G of their own through OptiScaler; d4r.ini [FrameGeneration] Model = auto uses FG Lite on RDNA3 and the full model on RDNA4 (docs/frame-generation.md).

Northlight games (Control, Alan Wake 2) keep their original motion vectors by default. Experimental display-resolution motion-vector reconstruction requires [Interop] NativeMotionVectors = true in d4r.ini and a matching patched driver. It can cause motion artifacts; restart the game after changing it.

Windows

  1. Extract the Windows release zip into the folder that holds the game's main .exe. If the folder already has a dxgi.dll or OptiScaler.ini from another OptiScaler install, move those out of the way first.
  2. Double-click install.cmd (install.bat in the HIP/ZLUDA build). It downloads NVIDIA's files and prepares the native models; Python and the other tools it needs are included or set up privately.
  3. Launch the game normally and select DLSS.

Needs Windows 10 or 11 with a current AMD Adrenalin driver; ROCm and the HIP SDK are not needed. Full guides: native D3D12 release, HIP/ZLUDA release. Avoid games with anti-cheat: OptiScaler injects a DLL.

Switching models and FSR in game

Open OptiScaler's menu (Insert):

Both are on by default; [OptiScaler] FollowPresets and Fsr4 in d4r.ini turn them off. Change OptiScaler settings and use Save INI normally; d4r's ASI setup preserves your choices after the initial installation.

On Linux the vkhip backend runs preset K on RDNA3 and is on by default. Experimental XeFG/FSR frame generation and XeLL/Anti-Lag latency conversion are bundled in the OptiScaler/ folder: enable FG in OptiScaler's Insert menu or use the per-game setup command with INI backups. Fresh installs keep FG off.

In some games some models can show visible artifacting with native upscaling. For fidelity over speed, set [Kernels] PreferAccuracy = true in d4r/d4r.ini (native kernel numerics).

Results

RDNA3, DLSS 4 (K), 2560x1440 output.

Windows, native D3D12

Mode Input FPS K GPU mean K GPU median
Quality 1712x960 98.2 2.221 ms 2.111 ms
Balanced 1512x848 105.4 2.224 ms 2.223 ms
Performance 1280x720 114.0 2.201 ms 2.208 ms
Ultra Performance 856x480 125.6 2.120 ms 2.124 ms

Presets M and L at their intended modes, RX 7700 XT, network on the native HIP layers (d3dhip). GPU median per upscale from the D3D12 harness (scripts/hillclimb/perf/bench.py, 3 interleaved rounds):

Preset Mode Input 2560x1440 output Input (4K) 3840x2160 output
M Performance 1280x720 5.25 ms 1920x1080 11.57 ms
L Ultra Performance 854x480 4.33 ms 1280x720 9.64 ms

Linux, RX 7700 XT, Ghost of Tsushima (2026-11-12, highest graphics settings, no approximations)

Mode FPS 1% low K GPU time FSR 4.1.1 FPS FSR 1% low FSR GPU time
Native AA (DLAA / FSR AA) 56.5 51.3 1.72 ms 53.9 48.8 2.20 ms
Quality 73.7 67.1 1.66 ms 70.4 63.3 2.19 ms
Balanced 78.0 68.3 1.64 ms 74.1 66.7 2.16 ms
Performance 80.8 72.2 1.61 ms 77.1 66.4 2.14 ms
Ultra Performance 85.7 75.8 1.57 ms 78.9 68.0 2.09 ms

K is 4.7–8.6% faster than FSR 4.1.1 at every mode, with upscale times about 0.5 ms lower.

The Windows and Linux runs used different benchmark runs and probably different settings, so compare within a table rather than across them. More measurements: performance, videos.

GPU support

GPU Chip Native kernels
RX 7700 XT, RX 7800 XT, RX 7700, Radeon PRO W7700 gfx1101 K, M, L (WMMA)
RX 7900 GRE / XT / XTX, Radeon PRO W7800 / W7900 gfx1100 K, M, L (WMMA)
RX 7600 / 7600 XT, RX 7650 GRE, RDNA3 integrated GPUs gfx1102, gfx1103 K, M, L (WMMA)
RDNA 3.5 integrated GPUs gfx1150–gfx1154 K, M L (WMMA)
RX 9070 XT / 9070 / 9070 GRE, Radeon AI PRO R9700 gfx1201 K, M, L (WMMA, native FP8)
RX 9060 XT / 9060 gfx1200 K, M, L (WMMA, native FP8)
RX 6000 series, Steam Deck, RDNA2 integrated GPUs gfx1030–gfx1036 K (software matrix products)
RDNA1 and older unsupported

Kernels missing for a GPU fall back to ZLUDA and can be much slower. Details: native kernels, Windows GPU coverage.

How it works

On Linux the shim keeps the game's inputs and output in VRAM through vkd3d-proton's Vulkan interop, and the native inference engine records K, M, L and Ray Reconstruction into the game's frame. On Windows the D3D12 engine records them directly into the game's D3D12 command list. Anything the engines do not cover runs NVIDIA's DLSS through ZLUDA with native kernels in place of the heaviest ones. Details: architecture.

Building from source

Path Contents
tools/ the NGX shims (Linux and Windows), the Wine CUDA bridge, DLSS harnesses, probes
kernels/ native kernels (k/ DLSS 4, m/ DLSS 4.5, tex/ texture tails, common/ matrix layouts) and their tools
engine/ the native K/L/M and Ray Reconstruction engines (Vulkan; d3d12/ for Windows)
patches/ ZLUDA, vkd3d-proton and OptiScaler patches
scripts/, config/, packaging/, docs/ build/launch scripts, the developer d4r.ini, release files, documentation

Star History

Star History Chart

License

GNU General Public License, version 3 only (GPL-3.0-only; see LICENSE). The patches in patches/ are offered under the licenses of the projects they modify: ZLUDA (Apache-2.0 or MIT) and vkd3d-proton (LGPL-2.1). See NOTICE. The downloaded NVIDIA files and the kernels built from NVIDIA's code are not covered by this license.

d4r (countervolts/d4r)

Searching Database…

355 ·GitHub
What is this?d4r runs NVIDIA's official DLSS Super Resolution library inside Windows games on AMD Radeon GPUs under Linux and Proton, translating the DLSS network through ZLUDA (CUDA on ROCm/HIP) and replacing the heaviest kernels with hand-written RDNA3/RDNA4 code. It supports the DLSS 3 CNN model and the DLSS 4/4.5 transformer models; DLSS 5 is not supported.
How do I install it for a game?Extract the release zip into the folder containing the game's .exe, then in Steam select GE-Proton 11 as the compatibility tool and add the launch options 'PROTONFORCENVAPI=1 DXVKNVAPIGPUARCH=AD100 %command%'. ROCm doesn't need to be installed separately, since its runtime is bundled in the zip.
Do I need NVIDIA's own DLSS files to use this?Yes — you need NVIDIA's nvngxdlss.dll (310.7) and a matching nvngx.dll, since those files and the kernels built from NVIDIA's code aren't covered by d4r's own license. Building from source instead also needs ROCm with HIP, a GE-Proton build with OptiScaler integration, Rust, git-lfs, meson/ninja and MinGW/clang-cl toolchains.
Is this ready for everyday gaming?No — the author describes it as a proof of concept, tested on only one GPU (an RX 7700 XT) in a handful of games, and it depends on unreleased patches to ZLUDA and vkd3d-proton. RDNA4 behavior is unverified on real hardware, and some games show visible artifacting with native upscaling.
Will this work on my Radeon GPU?Only RDNA3 cards (RX 7700/7800/7900 series, gfx1100-1103) and RDNA4 cards (RX 9060/9070 series, gfx1200/1201) are targeted by the native kernels; RDNA2 and older GPUs are unsupported, and only the RX 7700 XT has actually been tested on real hardware so far.
How much does d4r actually speed things up?On an RX 7700 XT in SILENT HILL Townfall, DLSS Quality runs at roughly 67-72 fps versus 49.1 fps for native rendering, though it still trails AMD's own FSR 4 at the same settings.
Is this an official NVIDIA or AMD project?No, the README explicitly states d4r is not affiliated with NVIDIA or AMD.
How does the DLSS translation pipeline actually work?A D3D12 shim intercepts the game's NGX calls that OptiScaler forwards, a Wine-side CUDA bridge relays them to ZLUDA, ZLUDA translates NVIDIA's PTX code for the AMD GPU, and hand-written native kernels replace the heaviest DLSS network layers for speed.
What happens if native kernels aren't available for my GPU?The bridge falls back to ZLUDA's generic PTX translation, but without the native kernels, NVIDIA's translated DLSS 4 transformer layers produce invalid output that gets discarded, degrading image quality.
Size
8.4 MB
Stars
355
Age
2mo
Commits · 90 Days