Add an experimental FSR Ray Regeneration backend for D3D12 RR requests: - Convert depth, motion, normals and albedos into AMD denoiser inputs. - Split and recompose diffuse/specular signals, then run Super Sampling. - Add stability/detail controls, demodulation guards and halo limiting. - Handle AMD provider discovery under NVIDIA GPU spoofing. - Add runtime probes, synthetic reference scenes and per-dispatch profiling. Add exact gfx11 DLSS-RR inference using f16 cooperative matrices: - Reproduce FP8 conversions, accumulation and camera reprojection arithmetic. - Widen model weights and avoid requiring VK_EXT_shader_float8. - Extend model building, replay tools and descriptor metadata. Expand motion preprocessing and experimental AW2 native-motion support: - Add tiled LDS dilation, padded allocation handling and thin-only sky fill. - Order dilation with input waits and NGX on the selected stream. - Add jitter-aligned native composition, hybrid routing and wire history repair. - Add prepared masks, sparse repair and independent motion/repair controls. Add optional fused R11G11B10 input/output conversion, sampled stage timings and profile summarization. Extend configuration, packaging, documentation, FidelityFX headers and CPU/GPU regression coverage.
Vulkan kernels (experimental)
Tools for running DLSS texture kernels as Vulkan compute shaders instead of through CUDA/HIP. Nothing here is wired into the shim yet; it is a kernel-level proof with a byte-exact check against captured frames.
| File | Role |
|---|---|
ptx2glsl.py |
Translates one PTX kernel from your DLSS DLL into GLSL. Every instruction becomes the same operation kernels/native/ptx2hip.py emits, gotos become nested if/else and do/while (each branch rejoins at its immediate post-dominator), and registers that only hold half floats are typed float16_t / f16vec2. |
kvk.cpp |
Headless runner: binds captured textures, surfaces, buffers and the parameter block, dispatches, writes the surfaces back and times the dispatch. |
kcase.py |
Builds a kvk manifest from a capture and compares kvk's output with the captured surfaces. |
Reproducing the K output kernel check
# 1. capture (bridge options that already exist): every launch's resources after it ran, plus the arguments
D4R_CUDA_VERBOSE=1 D4R_CUDA_LAUNCH_STATS=1 D4R_CUDA_LAUNCH_DUMP_DIR=$CAP/dump \
D4R_CUDA_REPLAY_DUMP_DIR=$CAP/replay D4R_CUDA_REPLAY_DUMP_FILTER=hiluma_engine_output D4R_CUDA_REPLAY_DUMP_LIMIT=8 \
<run the NGX CUDA benchmark, preset K>
# 2. translate and compile
K=hiluma_engine_output_depthinv_mvlo_hdr_max_v2_rel
python3 ptx2glsl.py MODULE.ptx $K > k.comp && glslangValidator -V --target-env vulkan1.3 k.comp -o k.spv
g++ -O2 -std=c++17 -o kvk kvk.cpp -lvulkan
# 3. run frame N and compare (the three linear-filtered textures are named by parameter offset)
python3 kcase.py make $CAP $K N case 200:linear 224:linear 232:linear
./kvk k.spv case/manifest 150 64 # 150 dispatches per submit, 64-wide subgroups
python3 kcase.py cmp case
Sampler settings come from the cuTexObjectCreate lines of the verbose log (all clamp, normalized coordinates;
filter per object).
Result (RX 9070 XT, RADV / Mesa 26.2.4, DLSS 310.7, 2026-10-08)
Byte-identical to the native HIP kernel's four output surfaces on six consecutive frames at 640x360 -> 1280x720 and one frame at 1920x1080 -> 3840x2160. At 4K: 1.18 ms per dispatch under sustained load (GPU clock 2.38 GHz), 1.05 ms with 0.3 ms gaps (2.7 GHz). The native kernel measures 1.16 ms in the live benchmark at about 3.1 GHz. The two were not timed in the same run or clock state.
Pitfalls found
- Shader-visible buffers must be allocated from a
DEVICE_LOCAL | HOST_VISIBLEmemory type. The first host-visible type on RADV is system memory; reading the network output from it made every variant take 2.9 ms. - A program-counter loop around the whole shader (
while (pc != END) { if (pc == k) ... }) keeps every value live across the back edge: 35 ms. Guards without the loop: 2.7 ms (VRAM buffers). Real nesting: 1.69 ms. - Packing half floats into
uintregisters costs about 840v_mov_b16; native half types: 1.35 -> 1.18 ms. - A 64K-entry table for
ex2.approx.f16x2is exact but slower thanv_exp_f32; droppingprecisegains under 1% and changes about 0.005% of the output values.