Add CUDA NGX Ray Reconstruction support

Run the signed CUDA-capable denoiser through feature 13 with independent D/E presets, pre-Init discovery, per-frame guide and camera snapshots, normalized integer guide staging, paired alpha output, and recorded-resource retirement.

Add the required ZLUDA/LLVM patch, behavioral configuration tests, GPU harness coverage, optional denoiser installation and packaging, and tested support limitations. Preserve upstream attribution and distinguish LLVM licensing from the ZLUDA portions of the patch.
This commit is contained in:
woutermans committed 2026-10-12 12:47:53 +02:00
1 parent 503061d568
commit 7117c38674
20 files changed
+3038 -114

No files matched your search

+23
View File
@@ -1,3 +1,4 @@
<!-- Modified in this fork for CUDA Ray Reconstruction support and validation (2026). -->
# Unreleased
- Native engine, preset L (DLSS 4.5, render preset 12): the engine now runs L ([Engine] Enabled, models in `engine/l` and `engine/l-ldr`, built by `engine/compile_m.py` from a capture of preset L; `scripts/install_d4r_runtime.sh` stages `D4R_ENGINE_MODEL_L` / `D4R_ENGINE_MODEL_L_LDR`). Every stage, `d4r-m` on captured frames and the D3D12 harness are byte-identical to the CUDA backend running NVIDIA's translated kernels, apart from isolated single-frame knife edges (96-122 dB). 1280x720 -> 3840x2160 takes 3.8 ms on an RX 9070 XT. Display-resolution motion vectors keep the CUDA backend, as for M. Details: `engine/L_NOTES.md`.
@@ -15,6 +16,28 @@
- Prevent stale in-place output mappings when games destroy and recreate output textures. The harness now supports `D4R_HARNESS_RECREATE_OUTPUT=1` for this regression.
- Integration validation on RX 9070 XT: moving 12-frame RGBA16F/R10G10B10A2 copy, packed and in-place sequences matched byte-for-byte; fast and accuracy paths, token-disabled reference layers, MicroCUDA tube-cache reuse, discarded input recordings and four feature-recreation cycles were exercised. gfx1101 and gfx1200 compatibility builds also passed; those targets were not runtime-tested.
## Ray Reconstruction
- Run the signed CUDA-capable 3.10.7 DLSS-Denoiser through the NGX core's feature-13 lifecycle.
Presets D and E select distinct network weights independently of the Super Resolution preset.
- Preserve per-frame guide resources, camera matrices, subrects, and stable CUDA texture handles.
Support normalized 8-bit albedo guides with the CUDA array-format ABI and stage full guide rows.
- Support pre-Init feature discovery through the denoiser's requirements export without initializing
NGX with a provisional application identity. Initialized capability checks remain authoritative.
- Keep separate alpha and RGB outputs paired, including padded output subrects; consume alpha
readback synchronously before CPU conversion.
- Bound R8_UINT alpha stores to one byte and balance guide/alpha references when evaluation
cannot place its frame marker. Publish cached denoiser capabilities as a coherent snapshot.
- Extend the ZLUDA patch stack for real denoiser PTX, LLVM lowering, half texture/store operations,
and release/acquire ordering around workgroup barriers.
- Verified D/E temporal evaluation and separate alpha on RX 9070 XT (gfx1201) with native FP8 WMMA.
Scalar FP8 temporal RR produced nonfinite output and is not validated. Cold compilation can stall
initial rendering; other GPU targets and image-quality parity with RTX hardware remain unverified.
- Cyberpunk 2077 2.31 rendered loaded local saves with path tracing and RR preset D enabled at
1920×1080 and 3840×2160 Ultra Performance on gfx1201. The actual overlay reported DLSSD 310.7.0,
and CUDA feature-13 evaluations completed. The observed ~53 FPS at 1080p and ~20 FPS at 4K are
snapshots, not comparative benchmarks. Newer DLSS 4.5 RR preset F is not implemented or validated.
# d4r 0.1.3
This release adds an optional accuracy mode and fixes the GLIBC compatibility failure, DLSS artifacts, and stale output-buffer redirects reported after 0.1.2. Accuracy mode is **off by default**.