nvpro-samples / vk_streamline

DLSS Super Resolution and DLSS Frame Generation via Streamline

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DLSS Super Resolution and DLSS Frame Generation via Streamline

This sample demonstrates integration of Streamline into a Vulkan-based application and using it to add NVIDIA Reflex, DLSS Super Resolution, and DLSS Frame Generation.

Streamline generally supports two methods of integrating it, either automatically by linking against the sl.interposer.lib library instead of vulkan-1.lib (assuming the application was previously statically linking Vulkan already), or manually by only retrieving the relevant Vulkan entry points from Streamline and having the rest go directly through Vulkan as usual (an application can use the vkGetInstanceProcAddr/vkGetDeviceProcAddr provided by Streamline to fill its dispatch tables). This sample implements both methods, which can be toggled between via a CMake option called STREAMLINE_MANUAL_HOOKING.
When enabled, the sample will link against Vulkan normally, dynamically load Streamline at runtime and only get the required Vulkan functions from it to call. When disabled, the sample will link against sl.interposer.lib instead of vulkan-1.lib.
The manual hooking method can offer better performance because of less overhead (avoids having to redirect all Vulkan calls through Streamline) and is not too difficult to implement when an application already loads all the Vulkan entry points dynamically. It does however also require querying and adding all the necessary Vulkan extensions and features Streamline wants, while the automatic method will add those during device creation behind the scenes without changes to the application.

To debug DLSS, you can replace the DLSS DLLs installed by CMake with their development variants and enable their overlay with a special registry key.
In addition, check out the Streamline ImGui plugin documentation. It can be enabled by adding sl::kFeatureImGUI to the SL_FEATURES array at the top of main.cpp.

Build and Run

Clone https://github.com/nvpro-samples/nvpro_core.git next to this repository (or pull latest master if you already have it).

mkdir build && cd build && cmake .. # Or use CMake GUI

If there are missing dependencies (e.g. glfw), run git submodule update --init --recursive --checkout --force in the nvpro_core repository (and also this one).

Then start the generated .sln in VS or run make -j.

Run vk_streamline or ../../bin_x64/Release/vk_streamline.exe.

License

Released under the Apache License, Version 2.0. Please see the copyright notice in the LICENSE file.

This project uses the NVIDIA nvpro-samples framework and NVIDIA Streamline SDK. Please see the license for nvpro_core here, and the third-party packages it uses here. Please see the license for Streamline here, and the third-party packages it uses here.

About

DLSS Super Resolution and DLSS Frame Generation via Streamline

License:Apache License 2.0


Languages

Language:C++ 83.1%Language:GLSL 8.0%Language:CMake 7.3%Language:C 1.5%