countervolts/d4r

NVIDIA's official DLSS SR, MFG and RR on AMD RDNA2/3/4 GPUs on Windows and Linux.

What it solves

NVIDIA's DLSS is exclusive to NVIDIA GPUs, so AMD Radeon users cannot use this popular upscaling technology. d4r makes DLSS available on AMD Radeon GPUs by running the DLSS network on the GPU itself, either through a native engine with hand-written kernels for RDNA2, RDNA3, and RDNA4, or via ZLUDA (a CUDA-on-ROCm compatibility layer) for unsupported models. It supports DLSS 3 CNN, DLSS 4 transformer (presets K, M, L), and experimental Ray Reconstruction, and runs in DirectX 12 games on Linux (Proton) and natively on Windows.

How it works

d4r integrates with OptiScaler, which intercepts DLSS calls from the game. The game requests DLSS as usual; OptiScaler hands the call to d4r, which runs the DLSS network using either its own native engine (for supported models) or ZLUDA with the heaviest kernels replaced by hand-written RDNA2, RDNA3, and RDNA4 code. On Linux, a shim keeps the game's inputs and output in VRAM via vkd3d-proton's Vulkan interop; on Windows, a D3D12 engine records outputs directly into the game's command list. The installation process downloads official NVIDIA DLSS files, verifies them with SHA-256 hashes, and prepares the native models. No NVIDIA driver, ROCm SDK, or sudo is required.

Who it's for

Gamers and enthusiasts using AMD Radeon GPUs (RDNA2 and newer) who want to use DLSS in DirectX 12 games on Windows or Linux (Proton). It is a proof of concept and not affiliated with NVIDIA or AMD. It requires some technical comfort: manual installation, configuration via INI files, and possible driver or Proton tweaks. Users with anti-cheat games should avoid it because it injects a DLL.

Highlights

  • Runs official NVIDIA DLSS Super Resolution (DLSS 3 CNN, DLSS 4 transformer presets K, M, L) and experimental Ray Reconstruction on AMD Radeon GPUs.
  • Native engine with hand-written kernels for RDNA2, RDNA3, and RDNA4; falls back to ZLUDA for unsupported parts.
  • Works on Linux (Proton) and Windows (native D3D12 or HIP/ZLUDA build).
  • Includes DLSS Frame Generation (2x-6x and FG Lite) on RDNA3/RDNA4 and integrates with FSR (FSR 3.1/4.1) as an alternative upscaler.
  • Installation scripts download and verify NVIDIA's files; no root/sudo on Linux, no ROCm or HIP SDK needed.
  • Supports many games; see SUPPORTED_GAMES.md for the tested list.
  • Benchmarks show DLSS 4 (preset K) outperforms FSR 4.1.1 on an RX 7700 XT at several modes.
  • Open source under GPL-3.0-only, with patches under their original licenses.

Related

  • Project
  • Project
  • Project
  • Project