Integrate NVIDIA Super Resolution Tech with Streamline: A Developer's Guide
Want to easily integrate NVIDIA's super-resolution technologies like DLSS into your game or application? Streamline (SL) offers a cross-IHV solution, simplifying the integration of super-resolution and other graphics effects from various hardware vendors. This guide breaks down how to leverage Streamline for a smoother development process and stunning visual results.
What is Streamline and Why Use It?
Streamline is an open-source framework by NVIDIA to help developers incorporate super-resolution technologies (like DLSS), and other graphics effects into their creations. Using Streamline allows a single integration to support multiple vendor-specific technologies.
- Simplified Integration: Implement one integration to support multiple super-resolution technologies.
- Cross-Vendor Compatibility: Supports NVIDIA and other independent hardware vendors.
- Modular Design: Choose which features to integrate based on your needs.
Prerequisites for Using Streamline
Before diving into Streamline integration, ensure your system meets these requirements:
- GPU: DirectX 11 and Vulkan 1.2 or higher.
- OS: Windows 10 20H1 (version 2004 - 10.0.19041) or newer.
- Drivers: Install the latest graphics driver (NVIDIA GPU must be 512.15 or newer).
- Development Tools: VS Code or VS2017/VS2019 with SDK 10.0.19041+.
- Git: Required for cloning the Streamline repository.
Building Streamline from Source in Windows 10
Starting with Streamline 2.0.0, you can recompile SL from source (except for the DLSS-G plugin, which is prebuilt). Follow these steps to build Streamline.
- Clone the Repository: Clone your forked Streamline repository to an NTFS drive (due to symbolic links).
- Run Setup Script: Execute
setup.bat
from a Windows command prompt or PowerShell. This script:- Downloads all build dependencies using NVIDIA's tool packman.
- Generates project build files in
_project\vs2017
(for Windows).
- Build the Project:
- Open
_project\vs2017\streamline.sln
in Visual Studio - Select your desired build configuration.
- Build, or use the provided
build.bat
script with-debug
,-develop
, or-production
flags.
- Open
The target CPU architecture defaults to x86_64. The specific version of Windows, NVIDIA driver, or Vulkan are runtime dependencies, not compile/link time dependencies.
Key Considerations
- Production Builds: Only use production builds for releasing your software.
- DLL Signing: Use original NVIDIA-signed Streamline DLLs or implement your own signing system to prevent malicious module replacements.
- Never Edit MSVC Project files: Always modify the
premake5.lua
. - Headers: NVIDIA does not recommend making changes to the headers in
include
, as these can affect the API itself and can make developer-built components incompatible with NVIDIA-supplied components.
Using Local Builds
After building, find the unsigned DLLs in _artifacts\sl.*\<Config>\
. Copy these to the bin\x64
directory or package them for application use. Remember to use the prebuilt copy of sl.dlss_g.dll
as it cannot be compiled from source.
Configuring and Building a Tree with premake5.lua
All Streamline projects and build information are managed via the premake5.lua
file located in the root directory. This platform-independent build script uses the premake project creation toolchain. Any new projects or changes to existing projects must be listed in this file.
SDK Packaging for Distribution
To package the SDK, execute ./package.bat
with the -debug
, -develop
, or -production
flag (production is default). The packaged SDK will be located in the generated _sdk
folder.
Debugging Tools for Streamline
Streamline offers various tools to help debug and troubleshoot issues:
- SL ImGui: Realtime Data Inspection.
- JSON Configuration Files: Plugin Configurations.
Logging
Streamline 2.7.x introduces the ability to override logging settings (log level, file output, etc.) via the Windows registry or environment variables (environment variables take precedence). The logging override keys can be found in HKEY_LOCAL_MACHINE\SOFTWARE\NVIDIA Corporation\Global\Streamline
.
Registry files (streamline_logging_disable.reg
and streamline_logging_enable.reg
) are provided for quickly enabling/disabling logging. Note that the Streamline interposer configuration (JSON) overrides these logging settings.
Programming Guides
Explore these programming guides to effectively integrate Streamline and its features:
- General Programming Guide:
ProgrammingGuide.md
- Advanced Programming Guide (Manual Hooking):
ProgrammingGuideManualHooking.md
- DLSS Super Resolution
- DLSS Frame Generation
- Reflex
- NIS
Sample Code and Applications
- Sample Plugin Source Code: Located in the Streamline Plugin Source
- Sample Application: Find a sample application using Streamline in its Git Repo
By following this guide, you can harness the power of Streamline to integrate cutting-edge super-resolution technologies into your projects with ease. Take your graphics to the next level with Streamline.