From b2b3781acabb90cd97091f4966f0101083783ddc Mon Sep 17 00:00:00 2001 From: ayo <93222141+countervolts@users.noreply.github.com> Date: Wed, 30 Sep 2026 23:17:25 -0400 Subject: [PATCH 1/2] Fix DLSS artifacts and improve synchronization diagnostics - Fix Cyberpunk 2077 preset-K black artifacts by preserving FP16/FP64 denormal requirements while limiting denormal suppression to FP32. - Fix stale direct-output redirects after array destruction, preventing reused handles from inheriting an earlier feature's output buffer. - Log rejected resource formats and dimensions, including failures after startup, with rate limiting for repeated errors. - Add opt-in blocking output synchronization with a dedicated bridge export and fallback to context synchronization. - Report output-wait CPU and wall time, and defer GPU timing queries until asynchronous evaluation has completed. The CPU-overhead mitigation for #7 still needs reporter confirmation. - Reject release libraries requiring GLIBC newer than the configured baseline, defaulting to 2.41, and document compatible builds. Validation: shim and bridge builds pass; targeted redirect-lifetime and format-logging checks pass. Fixes #5 Fixes #8 Refs #7 --- README.md | 18 ++- SUPPORTED_GAMES.md | 4 + config/d4r.ini.default | 1 + docs/architecture.md | 9 ++ docs/building.md | 7 ++ packaging/d4r.ini | 2 + ...04-native-overrides-and-gpu-handoffs.patch | 8 +- scripts/check_glibc_compat.sh | 32 +++++ scripts/package_release.sh | 3 + tools/d4r_nvngx_shim.cpp | 115 +++++++++++++++--- tools/wine_nvcuda_bridge.c | 23 ++++ tools/wine_nvcuda_bridge.spec | 1 + 12 files changed, 199 insertions(+), 24 deletions(-) create mode 100755 scripts/check_glibc_compat.sh diff --git a/README.md b/README.md index a469807..1eeadae 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ d4r runs NVIDIA's official DLSS Super Resolution library (`nvngx_dlss.dll`) in Windows games on AMD Radeon GPUs under Linux and Proton. The game asks for DLSS as usual; the DLSS network runs on the AMD GPU through [ZLUDA](https://github.com/vosen/ZLUDA) (CUDA on ROCm/HIP), with the heaviest DLSS kernels replaced by hand-written RDNA3 and RDNA4 code. -**Supported DLSS models:** DLSS 3 CNN (E), DLSS 4 transformer (K, default), and DLSS 4.5 transformer (M). DLSS 5 is not supported. +**Supported DLSS models:** DLSS 3 CNN (E), DLSS 4 transformer (K, default), and DLSS 4.5 transformer (M). DLSS 5 is PURPOSELY not supported. **Proof of concept:** d4r shows that DLSS can run on an AMD GPU, but it is not really that practical for everyday use yet. It has been tested on one GPU in a handful of games and depends on unreleased patches to ZLUDA and vkd3d-proton. @@ -31,16 +31,16 @@ On the same GPU DLSS starts at a disadvantage: its networks were designed for NV ## Known issues -- In some games native upscaling can show visible artifacting. +- In some games using some models native upscaling can show visible artifacting. ## GPU support -d4r builds for RDNA3 and RDNA4. A newly built release compiles native DLSS 4 and 4.5 network kernels for the targets below and selects the matching set at runtime. Only the RX 7700 XT has been tested on a real GPU; RDNA4 runtime and performance remain unverified on hardware. +d4r builds for RDNA3 and RDNA4. A newly built release compiles native DLSS 4 and 4.5 network kernels for the targets below and selects the matching set at runtime. Only the RX 7700 XT has been tested by this project on a real GPU; an external video reports DLSS 4.5 running through d4r 0.1.2 on an RX 7900 XTX. RDNA4 runtime and performance remain unverified on hardware. | GPU | Chip | FP8 math | Runtime testing | |---|---|---|---| | RX 7700 XT, RX 7800 XT, RX 7700, Radeon PRO W7700 | gfx1101 | widened to f16 | RX 7700 XT only | -| RX 7900 GRE / XT / XTX, Radeon PRO W7800 / W7900 | gfx1100 | widened to f16 | untested | +| RX 7900 GRE / XT / XTX, Radeon PRO W7800 / W7900 | gfx1100 | widened to f16 | RX 7900 XTX: [external video](https://www.youtube.com/watch?v=_GLjJ2Dn5pU) (DLSS 4.5); other cards untested | | RX 7600 / 7600 XT, RX 7650 GRE | gfx1102 | widened to f16 | untested | | RDNA3 integrated GPUs | gfx1103 | widened to f16 | untested | | RX 9070 XT / 9070 / 9070 GRE, Radeon AI PRO R9700 | gfx1201 | native FP8 (`NativeFp8`, default on) | emulator only | @@ -136,9 +136,15 @@ Gameplay recordings of each DLSS model at the Quality, Performance and Ultra Per | `packaging/` | the release's `d4r.ini`, OptiScaler settings, user guide and install check | | `docs/` | architecture, build, native kernel and performance notes | -## Stars +## Star History -[![Star History Chart](https://api.star-history.com/svg?repos=countervolts/d4r&type=Date)](https://star-history.com/#countervolts/d4r&Date) + + + + + Star History Chart + + ## License diff --git a/SUPPORTED_GAMES.md b/SUPPORTED_GAMES.md index e7aa511..97878a8 100644 --- a/SUPPORTED_GAMES.md +++ b/SUPPORTED_GAMES.md @@ -19,6 +19,10 @@ The following DirectX 12 games run DLSS Super Resolution through d4r on the test | Ratchet & Clank: Rift Apart | Works; occasional artifacts in the pause menu | Works; minor artifacts with HDR enabled and occasionally in the pause menu | Works; occasional artifacts in the pause menu | | Dying Light: The Beast | Works | Works | Works; small visual artifacts throughout | +Unsupported games: + +- **DOOM: The Dark Ages:** the game uses Vulkan and has no D3D12 mode. d4r currently supports D3D12 DLSS only, so its DLSS calls cannot reach d4r. The game's hardware ray-tracing requirement is separate from this limitation. + General notes: - Select DLSS in the game's graphics settings where it is offered. OptiScaler can also feed DLSS from a game's FSR or XeSS inputs, but those are a fallback for games that hide DLSS and can ghost or show a black screen. diff --git a/config/d4r.ini.default b/config/d4r.ini.default index a28ccd6..43738e7 100644 --- a/config/d4r.ini.default +++ b/config/d4r.ini.default @@ -127,3 +127,4 @@ LogDir = auto [Env] ; Anything else, passed through as environment variables (one per line): ; D4R_SHIM_SPLIT_TIMEOUT_MS = 200 +; D4R_SHIM_BLOCKING_SYNC = 1 ; yield CPU while waiting for DLSS output diff --git a/docs/architecture.md b/docs/architecture.md index 5199cbb..d905d91 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -88,3 +88,12 @@ The release zip (`scripts/package_release.sh`) is unpacked into the folder that ## Logs The launcher writes each run's logs to `~/.cache/d4r-dlss-captures/game--