Files
d4r/packaging/d4r.ini
T
ayo b2b3781aca 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
2026-09-30 23:17:25 -04:00

60 lines
2.5 KiB
INI

; d4r settings for this game. This file lives in the game's d4r folder and applies to this game only.
; "auto" means the built-in default. Any setting can also be overridden with the environment variable
; that config/d4r.ini.default in the source repository lists for it, e.g. in the game's launch options.
[DLSS]
; Which DLSS network runs:
; K DLSS 4 transformer (default)
; E DLSS 3 CNN: a little faster, softer image
; M DLSS 4.5 transformer: best image, much slower on RDNA3
; game whatever the game (or OptiScaler's preset override) asks for
; Frame rates measured on an RX 7700 XT at 2560x1440, Quality mode: see D4R_README.txt.
Model = K
; NVIDIA's library marks the image "DLSS SDK - DO NOT DISTRIBUTE" in this setup; d4r turns that off.
; true shows it.
ShowWatermark = false
[Latency]
; 0: every frame shows its own DLSS result, as with a native upscaler (needs the d3d12.dll that came
; with d4r next to the game).
; 1-3: allow results up to that many frames old. Slightly more fps, more input latency.
FrameAge = 0
[Kernels]
; Hand-written RDNA3 and RDNA4 kernels for the DLSS 4 and 4.5 networks (d4r\kernels). Each one is used
; only when your DLSS library's code for that kernel matches the code it was written for; otherwise
; that kernel is compiled from NVIDIA's code instead, which is slower but still correct.
NativeKernels = on
; RDNA4 (RX 9000 series) only: run DLSS's FP8 math on the GPU's native FP8 matrix units, with NVIDIA's
; own FP8 rounding in the DLSS 4.5 (M) layers. off runs it as 16-bit math, as on RDNA3. Ignored on
; other GPUs.
NativeFp8 = on
[Interop]
; These keep DLSS's inputs and output in video memory and move the waits between the game and DLSS
; onto the GPU. Leave them on unless you are chasing a problem.
VramInterop = true
GpuWait = true
LinearInputs = true
ElideNgxSync = true
; Lets DLSS's last kernel write straight into the game's output buffer (DLSS 4 / K only). It takes
; effect only while d4r's own output kernel runs, which it does when the DLSS library matches.
DirectOutput = auto
[Paths]
; Linux paths.
; ROCm installation (default: the ROCm runtime in d4r\rocm, else /opt/rocm)
RocmDir = auto
; Cache for the compiled DLSS kernels (default ~/.cache/d4r). The first launch fills it.
CacheDir = auto
[Debug]
; d4r's log is d4r\d4r_nvngx.log, rewritten at every launch.
; Profile = true adds one line of timings per frame.
Profile = false
[Env]
; Extra environment variables for d4r, NAME = value.
; Use a blocking CUDA event while waiting for DLSS output.
; D4R_SHIM_BLOCKING_SYNC = 1