WIP snapshot: stable DLSS Quality crash fix (return point before DLAA work)
Captures the post-v1.1.7 dev state that is validated stable in-game, as a
local return point before starting the DLAA + supersampling chantier.
- DlssIntegration.ApplyModeResolutionScale: snap internal resolution scale to
an integer (MathF.Round) -> mip-aligned render targets -> fixes the random
ErrorDeviceLost in upscaling modes (VUID-04533/04534 out-of-bounds write).
Also: drop VK_EXT_buffer_device_address (conflict), add
VK_KHR_format_feature_flags2 (VK_NV_optical_flow dependency).
- DlssRestart.cs: background watchdog safety net for clean shutdown.
- DlssUpscaler.cs: minor.
- LICENSE.txt / README.md: release-prep (copyright + contact), pending.
Not pushed. master stays at the released v1.1.7 (ebf22fe48).
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Ryujinx Team and Contributors
|
||||
Copyright (c) 2026 The Roofer Dev — Beast Roofer Edition additions only
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
|
||||
@@ -135,18 +135,20 @@ Disponible dans **Paramètres > Graphismes > Anti-crénelage > TAA**. Rendu doux
|
||||
### 🇬🇧 NVIDIA DLSS / DLAA (experimental, RTX only, opt-in)
|
||||
DLSS/DLAA is **off by default** and **experimental**. No NVIDIA files are bundled (legal reasons). To enable it:
|
||||
1. Create a folder named **`dlss`** next to **`Ryujinx.exe`**.
|
||||
2. Put the **NVIDIA Streamline** files in it: `sl.interposer.dll`, `sl.common.dll`, `sl.dlss.dll` (MIT-licensed; from the public Streamline SDK).
|
||||
2. Get the **NVIDIA Streamline** files (MIT-licensed): download the [public Streamline SDK](https://github.com/NVIDIA-RTX/Streamline), open the **`bin/x64/development/`** subfolder, and copy these three files into your `dlss` folder: `sl.interposer.dll`, `sl.common.dll`, `sl.dlss.dll`.
|
||||
- ⚠️ **Important:** use the files from **`bin/x64/development/`**, **not** the ones in `bin/x64/` (the *production* build). NVIDIA's production DLSS only runs for signed/approved applications and reports `ErrorFeatureNotSupported` in an emulator — only the *development* build works here (it writes a verbose `sl.log`, which is normal for a debug build).
|
||||
3. The DLSS runtime (`nvngx_dlss.dll`) is **located automatically** from your own installed games/driver. If it isn't found, drop your own copy into the same `dlss` folder.
|
||||
4. In **Settings > Graphics**, set the **Scaling Filter** to **DLSS** and pick a mode (**DLAA** is the most stable). Applies on the next launch (the app restarts).
|
||||
4. In **Settings > Graphics**, set the **Scaling Filter** to **DLSS**. It engages **only when upscaling** (internal render smaller than the output); at native or high resolution it stays inactive, which is normal. Applies on the next launch (the app restarts).
|
||||
|
||||
⚠️ Experimental: may be unstable depending on the game/GPU. With no `dlss` folder or no DLSS file present, DLSS simply stays unavailable (no crash). Requires a recent NVIDIA RTX GPU.
|
||||
|
||||
### 🇫🇷 NVIDIA DLSS / DLAA (expérimental, RTX uniquement, optionnel)
|
||||
DLSS/DLAA est **désactivé par défaut** et **expérimental**. Aucun fichier NVIDIA n'est inclus (raisons légales). Pour l'activer :
|
||||
1. Crée un dossier nommé **`dlss`** à côté de **`Ryujinx.exe`**.
|
||||
2. Mets-y les fichiers **NVIDIA Streamline** : `sl.interposer.dll`, `sl.common.dll`, `sl.dlss.dll` (sous licence MIT ; du SDK Streamline public).
|
||||
2. Récupère les fichiers **NVIDIA Streamline** (sous licence MIT) : télécharge le [SDK Streamline public](https://github.com/NVIDIA-RTX/Streamline), ouvre le sous-dossier **`bin/x64/development/`**, et copie ces trois fichiers dans ton dossier `dlss` : `sl.interposer.dll`, `sl.common.dll`, `sl.dlss.dll`.
|
||||
- ⚠️ **Important :** prends bien les fichiers de **`bin/x64/development/`**, **pas** ceux de `bin/x64/` (le build *production*). Le DLSS production de NVIDIA ne s'active que pour les applications signées/approuvées et renvoie `ErrorFeatureNotSupported` dans un émulateur — seul le build *development* fonctionne ici (il écrit un `sl.log` verbeux, ce qui est normal pour un build de débogage).
|
||||
3. Le runtime DLSS (`nvngx_dlss.dll`) est **localisé automatiquement** depuis tes propres jeux/pilote installés. S'il n'est pas trouvé, dépose ta propre copie dans le même dossier `dlss`.
|
||||
4. Dans **Paramètres > Graphismes**, mets le **Filtre de mise à l'échelle** sur **DLSS** et choisis un mode (**DLAA** = le plus stable). S'applique au prochain lancement (l'app redémarre).
|
||||
4. Dans **Paramètres > Graphismes**, mets le **Filtre de mise à l'échelle** sur **DLSS**. Il ne s'active **qu'en upscaling** (rendu interne plus petit que la sortie) ; en résolution native ou haute, il reste inactif, c'est normal. S'applique au prochain lancement (l'app redémarre).
|
||||
|
||||
⚠️ Expérimental : peut être instable selon le jeu/la carte. Sans dossier `dlss` ou sans fichier DLSS, DLSS reste simplement indisponible (pas de plantage). Nécessite une carte NVIDIA RTX récente.
|
||||
|
||||
@@ -169,3 +171,9 @@ See [LICENSE.txt](https://git.ryujinx.app/projects/Ryubing/src/branch/master/LIC
|
||||
- **🇫🇷 Code original de ce fork** par **The Roofer Dev** (© 2026), sous licence MIT : intégration du TAA natif, intégration clean-room de NVIDIA DLSS/DLAA/NIS, HDR scRGB natif, cap VRR par jeu. *Code/intégration uniquement — les technologies DLSS, DLAA et NIS appartiennent à NVIDIA.*
|
||||
- This fork bundles **no proprietary NVIDIA files**. [NVIDIA Streamline](https://github.com/NVIDIA-RTX/Streamline) and NVIDIA Image Scaling (NIS) are MIT-licensed (© NVIDIA). The DLSS runtime (`nvngx`) is proprietary and **never bundled** — it is located on the user's own machine.
|
||||
- NVIDIA, DLSS, DLAA and NIS are trademarks of NVIDIA Corporation. This is an independent project, **not affiliated with or endorsed by NVIDIA**.
|
||||
|
||||
## Contact
|
||||
|
||||
Questions or feedback? You can reach me at **therooferdev@gmail.com**.
|
||||
|
||||
**🇫🇷 Contact** — Des questions ou un commentaire ? Vous pouvez me joindre à **therooferdev@gmail.com**.
|
||||
|
||||
@@ -56,9 +56,14 @@ namespace Ryujinx.Graphics.Vulkan.Dlss
|
||||
"VK_NVX_binary_import",
|
||||
"VK_NVX_image_view_handle",
|
||||
"VK_KHR_buffer_device_address",
|
||||
"VK_EXT_buffer_device_address",
|
||||
// NOTE: VK_EXT_buffer_device_address removed -- the Vulkan 1.2 core feature
|
||||
// (featuresVk12.BufferDeviceAddress, VulkanInitialization.cs) already provides this, and the
|
||||
// Vulkan spec FORBIDS enabling both the KHR/core path and the older EXT extension together
|
||||
// (VUID-VkDeviceCreateInfo-ppEnabledExtensionNames-03328 / -04748). Listing both produced
|
||||
// validation errors and an invalid device -- a credible cause of the random device-lost.
|
||||
"VK_NV_optical_flow", // NVOFA (B2): hardware optical flow accelerator for accurate motion vectors
|
||||
"VK_KHR_synchronization2", // required dependency of VK_NV_optical_flow
|
||||
"VK_KHR_format_feature_flags2", // required dependency of VK_NV_optical_flow (was missing -> VUID-01387, invalid device)
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
@@ -127,13 +132,19 @@ namespace Ryujinx.Graphics.Vulkan.Dlss
|
||||
}
|
||||
|
||||
float scaled = baseScale * factor;
|
||||
ResolutionScaleSetter(scaled);
|
||||
|
||||
// DLSS device-lost investigation: snap the internal resolution scale to an INTEGER. A fractional
|
||||
// scale (e.g. 2 x 0.667 = 1.33) makes Ryujinx round each render target's size independently, so a
|
||||
// target's mip can end up 1px smaller than the framebuffer built from it -> VUID-04533/04534 ->
|
||||
// a likely out-of-bounds write and the random device-lost. Integer scales keep mip sizes aligned.
|
||||
float aligned = MathF.Max(1f, MathF.Round(scaled));
|
||||
ResolutionScaleSetter(aligned);
|
||||
|
||||
if (!_modeLogged)
|
||||
{
|
||||
_modeLogged = true;
|
||||
Logger.Info?.Print(LogClass.Gpu,
|
||||
$"DLSS: quality mode {Mode} -> resolution scale {baseScale:0.00} x {factor:0.00} = {scaled:0.00}.");
|
||||
$"DLSS: quality mode {Mode} -> resolution scale {baseScale:0.00} x {factor:0.00} = {scaled:0.00} -> snapped to {aligned:0.00} (integer, mip-aligned).");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -209,6 +209,8 @@ namespace Ryujinx.Graphics.Vulkan.Dlss
|
||||
// that fits this internal resolution and fall back otherwise.
|
||||
if (input.Width >= contentW || input.Height >= contentH)
|
||||
{
|
||||
// DLSS-SR only runs when upscaling (internal render smaller than the on-screen output);
|
||||
// at native/downscale there is nothing to reconstruct, so fall back to the normal path.
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ using Ryujinx.Ava.Utilities;
|
||||
using Ryujinx.Common.Logging;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Threading;
|
||||
|
||||
namespace Ryujinx.Ava.Systems
|
||||
{
|
||||
@@ -91,6 +92,25 @@ namespace Ryujinx.Ava.Systems
|
||||
|
||||
Logger.Info?.Print(LogClass.Application, "DLSS restart: relaunching cold (one slInit per process).");
|
||||
|
||||
// Environment.Exit waits on foreground threads + finalizers. After a real DLSS upscale pass (Quality
|
||||
// mode), the GPU render thread can be stuck on a fence, which hangs the clean exit -- the window
|
||||
// freezes and Windows force-closes it. The GPU/NGX is already disposed and the child has launched, so
|
||||
// guard the exit with a watchdog: if the clean shutdown does not complete quickly, force-terminate
|
||||
// this process so the relaunch always proceeds instead of hanging. The log line tells us, after the
|
||||
// fact, whether the clean exit hung (watchdog fired) or succeeded (it did not).
|
||||
Thread watchdog = new(() =>
|
||||
{
|
||||
Thread.Sleep(3000);
|
||||
Logger.Warning?.Print(LogClass.Application,
|
||||
"DLSS restart: clean exit hung >3s -- force-terminating the old process to complete the relaunch.");
|
||||
Process.GetCurrentProcess().Kill();
|
||||
})
|
||||
{
|
||||
IsBackground = true,
|
||||
Name = "DlssRestartWatchdog",
|
||||
};
|
||||
watchdog.Start();
|
||||
|
||||
Environment.Exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user