d4r README

README проекта с github.com/countervolts/d4r. Одним файлом markdown: 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)

Ищем в базе…

355 ·GitHub
Что это?d4r запускает официальную библиотеку DLSS Super Resolution от NVIDIA внутри Windows-игр на GPU AMD Radeon под Linux и Proton, транслируя сеть DLSS через ZLUDA (CUDA на ROCm/HIP) и заменяя самые тяжёлые кернелы кодом, написанным вручную под RDNA3/RDNA4. Поддерживаются модель CNN из DLSS 3 и transformer-модели DLSS 4/4.5; DLSS 5 не поддерживается.
Как установить его для игры?Распакуйте zip из релиза в папку с .exe игры, затем в Steam выберите GE-Proton 11 как инструмент совместимости и добавьте параметры запуска «PROTONFORCENVAPI=1 DXVKNVAPIGPUARCH=AD100 %command%». ROCm отдельно устанавливать не нужно — его среда выполнения включена в zip.
Нужны ли собственные файлы DLSS от NVIDIA, чтобы этим пользоваться?Да — нужны nvngxdlss.dll (310.7) от NVIDIA и соответствующий nvngx.dll, поскольку эти файлы и кернелы, собранные из кода NVIDIA, не покрываются собственной лицензией d4r. Сборка из исходников вместо этого требует ROCm с HIP, сборку GE-Proton с интеграцией OptiScaler, Rust, git-lfs, meson/ninja и тулчейны MinGW/clang-cl.
Готово ли это к повседневным играм?Нет — автор описывает его как доказательство концепции, проверенное лишь на одном GPU (RX 7700 XT) в нескольких играх, и оно зависит от невыпущенных патчей к ZLUDA и vkd3d-proton. Поведение на RDNA4 не проверено на реальном железе, а в некоторых играх видны заметные артефакты при нативном апскейлинге.
Заработает ли это на моём GPU Radeon?Нативные кернелы нацелены только на карты RDNA3 (серии RX 7700/7800/7900, gfx1100-1103) и RDNA4 (серии RX 9060/9070, gfx1200/1201); RDNA2 и более старые GPU не поддерживаются, и на реальном железе пока проверена только RX 7700 XT.
Насколько реально d4r ускоряет работу?На RX 7700 XT в SILENT HILL Townfall DLSS Quality выдаёт примерно 67-72 fps против 49,1 fps при нативном рендеринге, хотя всё ещё уступает собственному FSR 4 от AMD при тех же настройках.
Это официальный проект NVIDIA или AMD?Нет, в README прямо сказано, что d4r не связан с NVIDIA или AMD.
Как именно работает конвейер трансляции DLSS?Шим D3D12 перехватывает NGX-вызовы игры, которые пересылает OptiScaler, CUDA-мост на стороне Wine передаёт их в ZLUDA, ZLUDA транслирует PTX-код NVIDIA для GPU AMD, а написанные вручную нативные кернелы заменяют самые тяжёлые слои сети DLSS ради скорости.
Что будет, если нативные кернелы для моего GPU недоступны?Мост переключается на универсальную PTX-трансляцию ZLUDA, но без нативных кернелов трансляция transformer-слоёв DLSS 4 от NVIDIA даёт невалидный результат, который отбрасывается, что ухудшает качество изображения.
Автор
countervolts
Размер
8.4 MB
Звёзды
355
Возраст
2 мес
Коммиты · 90 дней