Commit Graph
6 Commits
Author SHA1 Message Date
woutermans e0d1549a21 Engine: native presets K and M in the D3D12 shim, wider game coverage
A standalone Vulkan inference engine (engine/) for DLSS presets K and M that
runs from weights extracted from the user's own nvngx_dlss.dll, with d4r's
own input, network and reconstruction shaders or the native HIP network
layers, recorded into the game's command list by the shim. Opt-in
([Engine] Enabled / D4R_ENGINE=1); anything uncovered falls back to the
CUDA/ZLUDA path with the reason logged.

Byte-identical to NGX's CUDA backend under the phase-capable reference
(1706x960 -> 2560x1440, native HIP network, eleven frames, RX 9070 XT):
- K render- and display-resolution motion vectors, HDR and LDR
- K game-supplied exposure and automatic exposure with any pre-exposure
  and exposure scale (one residual: effective exposure exactly 2 or 4)
- K and M with the DLSS indicator's inverted-axis parameters
- M with any exposure settings (NGX ignores them for M)
K packages need the current compile_k.py (marker D4RO0003).

Also: HIP shared buffers are pooled across feature recreation (ROCm leaks
destroyed imports), hipnet.bin must match the preset, M-only games do not
load the K model, install_d4r_runtime.sh stages k, k-ldr, m, m-ldr with
hip/, the activation table has a generator (gen_activation_m.py), and
package_release.sh can bundle the engine's shaders (never its weights).

Signed-off-by: woutermans <[email protected]>
2026-10-10 20:54:01 +02:00
ayo fb244c1ef9 i love gitignore 2026-10-08 16:04:26 -04:00
ayo cb08e1c313 Fix OptiScaler NGX routing and align marker polling defaults
- Explicitly route OptiScaler to d4r\nvngx.dll in release packages.

- Extract INI generation into a helper that preserves line endings
  and rejects missing or duplicate settings.

- Check NGX routing separately from file presence and return failure
  when the installation is incomplete or misconfigured.

- Add an optional OptiScaler patch for external DLSS backends while
  preserving AMD identity for FSR4, with matching launch guidance.

- Align portable and launcher marker polling defaults at 200 us.

- Log when d4r's model override replaces game or OptiScaler presets.

- Add configuration, package, routing and coexistence regression tests.

- Update installation documentation, add FSR/DLSS comparison videos
  and ignore local .tools artifacts.

Refs: #7, #14
2026-10-02 16:32:49 -04:00
ayo da263ecf75 Fix VRAM leak on quality changes and RGBA16 motion vectors; more games
- Shim: reuse VRAM interop buffers across features instead of freeing them;
  ROCm 7.2.x's hipExternalMemoryGetMappedBuffer retains its view twice, so
  freed buffers never released their memory (~130 MB per quality change)
- Bridge: close the exported fd after hipImportExternalMemory
- Shim: accept R16G16B16A16_TYPELESS motion vectors and convert 4-channel
  motion vectors to RG16F on the GPU, keeping VRAM interop (Dying Light:
  The Beast rendered black)
- Harness: D4R_HARNESS_RECREATE=N quality-change cycles,
  D4R_HARNESS_MV_RGBA16=1 motion vector format
- Supported games: TLOU, Control, Cyberpunk 2077, Rift Apart, HZD Remastered,
  Subnautica 2, Alan Wake 2, Silent Hill 2, Dying Light: The Beast; general notes
- README: GPU support section (native kernels only for gfx1101); ignore videos/
2026-09-28 01:26:51 -04:00
ayo 818dd8bf42 Fix 8-bit DLSS VRAM interop 2026-09-27 17:22:04 -04:00
ayo 118173ecd7 d4r: official NVIDIA DLSS on AMD GPUs under Linux and Proton 2026-09-27 15:26:56 -04:00