Add experimental native Vulkan DLSS frontend
Implement NGX's Vulkan API over the existing CUDA backend. Compute shaders pack the game's sampled images into buffers shared with CUDA (device-local memory exported through the Wine bridge), and a device event in the game's command buffer holds its queue until the result is written back, keeping frame age at zero. DLSS reads inputs through pitch-linear textures and its native output kernel writes the shared buffer directly; input and completion waits are adaptive. Make it work across engines: shared buffers are concurrent over every compute-capable queue family (Indiana Jones records DLSS on async compute), depth kept in an R32F colour image is accepted under a depth aspect, and the extension-requirement query allows a null list. Spare buffer sets are imported on the first frame and never while a frame is pending, since an import can block on GPU work that is waiting for us; host staging covers any shortfall. Fix two exit hazards. A game quitting without NGX shutdown left the GPU waiting on an event that only a killed thread would set, resetting the ring 10 s later: the bridge now runs a shim hook before teardown and skips all CUDA destroy/sync calls once Wine is shutting the process down. The shim's own entry point skips CRT static destructors at process termination, where locks held by killed threads made the exit spin forever. Add a Vulkan DLSS harness (dynamic, recreate, discard, invalid, exit, compute-queue and in-flight modes), staging/depth probes, ABI/config tests, and an OptiScaler settings overlay for Vulkan games.
This commit is contained in:
1 parent
18c694eecb
commit
694a7a0126
24 files changed
+2215
-20
No files matched your search
@@ -134,7 +134,10 @@ If something goes wrong
|
||||
can be expected with the shim under d4r/; do not move it into the game root to silence that check.
|
||||
- A wrong image: try Model = E in d4r/d4r.ini, and report the problem with both logs.
|
||||
- Do not use d4r in games with anti-cheat. OptiScaler's DLL injection can get an account banned.
|
||||
- Not supported: DLSS Frame Generation, DLSS Ray Reconstruction, DirectX 11 and Vulkan games.
|
||||
- Not supported: DLSS Frame Generation, DLSS Ray Reconstruction and DirectX 11.
|
||||
- Development builds expose an experimental native Vulkan NGX path using CPU staging.
|
||||
Youngblood is the first intended game test; gameplay remains unverified. See the
|
||||
project documentation (docs/vulkan.md) for its separate Vulkan setup and limits.
|
||||
|
||||
|
||||
Uninstall
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
# Shared d4r native Vulkan route; preserve game-specific spoofing and plugin settings.
|
||||
Upscalers.VulkanUpscaler=dlss
|
||||
DLSS.Enabled=true
|
||||
Libraries.OptiDllPath=d4r
|
||||
Libraries.NvngxPath=d4r\nvngx.dll
|
||||
Inputs.EnableDlssInputs=true
|
||||
# Required: false redirects d4r's own CUDA NGX core load back to OptiScaler.
|
||||
Hooks.HookOriginalNvngxOnly=true
|
||||
NvApi.OverrideNvapiDll=false
|
||||
FrameGen.Enabled=false
|
||||
FrameGen.FGInput=nofg
|
||||
FrameGen.FGOutput=nofg
|
||||
Reference in new issue
Block a user