NOTE 1: This document applies to non-production, development builds only.
sl.imgui
won't load in production builds. Additionally, you will need to turn off any checks for signed libraries when loading Streamline libraries in order to be able to load the non-production libraries.
At a high level, the sl.imgui
plugin uses imgui
to show certain metrics/information about specific SL plugins that can be useful for validating and debugging your app integration.
The sl.imgui
plugin is a wrapper around imgui
. On plugin load, sl.imgui
creates its own context and exposes functions for other plugins to:
- Build their UI
- Render their UI (via callbacks, or directly by calling the
sl::imgui::render()
function)
When running a non-Production
build of SL, you should see the imgui
pop-ups on the app screen.
Note 1: plugin may NOT load their UI if they are not engaged/turned on from the app-side.
Note 2: you can toggle the imgui
pop-ups with Ctrl + Shift + Home
hotkey. Hotkey mappings can change in the future. In general, refer to the hotkey shortcuts at the bottom of the screen, or next to the UI control, for ground-truth hotkeys.
Plugin | Debug information | Reference Image |
---|---|---|
Overall Streamline | - Bottom of screen: imgui debug menu keyboard shortcuts and warnings - Right side of screen: imgui debug menu (Each plugin that builds a UI will have its UI show up here) Note: some apps won't let the mouse interact with the imgui menus. For those apps, it's best to change the controls to be hotkey-controllable |
|
sl.interposer |
- SDK build date - SL SDK version |
|
sl.common |
- System (OS, driver, GPU, etc.) - Graphics API - VRAM usage |
|
sl.reflex |
- Mode/FPS cap - Marker usage - Stats on sleep time |
|
sl.dlss |
- Version - Mode - Performance stats |
|
sl.dlss_g |
- Version - Mode - FPS boost stats (i.e., Scaling ) - VRAM consumption - Constants passed in through sl.common |
|
sl.nis |
- Mode - Viewport dimensions - Execution time on GPU |
|
reflex-sync |
- Ignore, NVIDIA Internal Only |
For certain plugins, debugging some GPU buffers can be done through sl.imgui
. For now, only sl.dlss_g
supports this feature.
Note: debug hotkey mappings can change in the future. In general, refer to the hotkey shortcuts at the bottom of the screen, or next to the UI control, for ground-truth hotkeys.
- Turn on
dlssg
from the app-side, and verify that thesl.imgui
pop-up shows thatdlssg
is On - Use the visualizer:
- Turn on visualizer:
Ctrl + Shift + Insert
- Cycle views:
Ctrl + Shift + End
. - Turn off visualizer:
Ctrl + Shift + Insert
- Turn on visualizer:
In addition to the sl.dlssg
input buffers (e.g. depth, motion vectors, etc.), the visualizer should help you view the debug buffers:
The sl.common
plugin's usage of sl.imgui
is an easy to follow example on how to add sl.common
UI and render it. Implementing something similar is advised.
#ifndef SL_PRODUCTION
// 1. Check for UI and register our callback
imgui::ImGUI* ui{};
param::getPointerParam(api::getContext()->parameters, param::imgui::kInterface, &ui);
if (ui)
{
// 2. Define the UI building callback
auto renderUI = [](imgui::ImGUI* ui, bool finalFrame)->void
{
// Use `ui` to build buttons/text/sliders/etc.
};
// 3. Register the callback so sl::imgui can render it
ui->registerRenderCallbacks(renderUI, nullptr);
}
#endif