-
Notifications
You must be signed in to change notification settings - Fork 48
Passing driver settings
DXVK-NVAPI newer than Commit c13ab33 allows to pass driver settings to an application; when requested by an application. Those driver settings are set with environment variables.
DXVK_NVAPI_DRS_SETTINGS allows providing custom values for arbitrary driver settings with keys and values of DWORD (u32) types. Format is setting1=value1,setting2=value2,… where both settingN and valueN are unsigned 32-bit integers and can be prefixed with 0x or 0X to parse them as hexadecimal numbers. Additionally, several well known settings are supported in their named/text form, for both keys and values. Each supported named setting can also be configured with a dedicated environment variable. The name of said environment variable is case-sensitive, the value is not. If a setting is set via both DXVK_NVAPI_DRS_SETTINGS and its own dedicated environment variable, the latter takes precedence.
- Key:
NGX_DLAA_OVERRIDE - Values:
DLAA_DEFAULTDLAA_ONDEFAULT
Example 1: DXVK_NVAPI_DRS_SETTINGS=ngx_dlaa_override=dlaa_on
Example 2: DXVK_NVAPI_DRS_NGX_DLAA_OVERRIDE=dlaa_on
- Key:
NGX_DLSS_OVERRIDE_OPTIMAL_SETTINGS - Values:
NONEPERF_TO_9XDEFAULT
Example 1: DXVK_NVAPI_DRS_SETTINGS=ngx_dlss_override_optimal_settings=perf_to_9x
Example 2: DXVK_NVAPI_DRS_NGX_DLSS_OVERRIDE_OPTIMAL_SETTINGS=perf_to_9x
- Key:
NGX_DLSS_SR_MODE - Values:
PERFORMANCEBALANCEDQUALITYSNIPPET_CONTROLLEDDLAAULTRA_PERFORMANCECUSTOMDEFAULT
Example 1: DXVK_NVAPI_DRS_SETTINGS=ngx_dlss_sr_mode=dlaa
Example 2: DXVK_NVAPI_DRS_NGX_DLSS_SR_MODE=dlaa
Use Override DLSS-SR scaling ratio for specifying CUSTOM scales. Setting a custom scale of 75% can be achieved with DXVK_NVAPI_DRS_NGX_DLSS_RR_MODE=custom,NGX_DLSS_RR_OVERRIDE_SCALING_RATIO=75.
Before https://github.com/jp7677/dxvk-nvapi/commit/0bcef80fac77ee7a4f13556228bdd5617b83af53 , CUSTOM scales can be set with the key 0x10E41DF5, thus setting a custom scale of 75% can be achieved with DXVK_NVAPI_DRS_NGX_DLSS_SR_MODE=custom,DXVK_NVAPI_DRS_SETTINGS=0x10E41DF5=75.
Available since https://github.com/jp7677/dxvk-nvapi/commit/0bcef80fac77ee7a4f13556228bdd5617b83af53.
This requires Override DLSS-SR performance mode to be set to CUSTOM.
- Key:
NGX_DLSS_SR_OVERRIDE_SCALING_RATIO - Values:
<VALUE>MINMAXDEFAULT
Example 1: DXVK_NVAPI_DRS_SETTINGS=ngx_dlss_sr_override_scaling_ratio=75
Example 2: DXVK_NVAPI_DRS_NGX_DLSS_SR_OVERRIDE_SCALING_RATIO=75
Valid VALUEs are from 33 to 100.
- Key:
NGX_DLSS_SR_OVERRIDE - Values:
OFFONDEFAULT
Example 1: DXVK_NVAPI_DRS_SETTINGS=ngx_dlss_sr_override=on
Example 2: DXVK_NVAPI_DRS_NGX_DLSS_SR_OVERRIDE=on
Presets K-O available since https://github.com/jp7677/dxvk-nvapi/commit/84238d8b9d4f245c1cdc987dabb3d6ff18f78705.
- Key:
NGX_DLSS_SR_OVERRIDE_RENDER_PRESET_SELECTION - Values:
OFFRENDER_PRESET_ARENDER_PRESET_BRENDER_PRESET_CRENDER_PRESET_DRENDER_PRESET_ERENDER_PRESET_FRENDER_PRESET_GRENDER_PRESET_HRENDER_PRESET_IRENDER_PRESET_JRENDER_PRESET_KRENDER_PRESET_LRENDER_PRESET_MRENDER_PRESET_NRENDER_PRESET_ORENDER_PRESET_LATESTDEFAULT
Example 1: DXVK_NVAPI_DRS_SETTINGS=ngx_dlss_sr_override_render_preset_selection=render_preset_latest
Example 2: DXVK_NVAPI_DRS_NGX_DLSS_SR_OVERRIDE_RENDER_PRESET_SELECTION=render_preset_latest
- Key:
NGX_DLSS_RR_MODE - Values:
PERFORMANCEBALANCEDQUALITYSNIPPET_CONTROLLEDDLAAULTRA_PERFORMANCECUSTOMDEFAULT
Example 1: DXVK_NVAPI_DRS_SETTINGS=ngx_dlss_rr_mode=dlaa
Example 2: DXVK_NVAPI_DRS_NGX_DLSS_RR_MODE=dlaa
Use Override DLSS-RR scaling ratio for specifying CUSTOM scales. Setting a custom scale of 90% can be achieved with DXVK_NVAPI_DRS_NGX_DLSS_RR_MODE=custom,NGX_DLSS_RR_OVERRIDE_SCALING_RATIO=90.
Before https://github.com/jp7677/dxvk-nvapi/commit/0bcef80fac77ee7a4f13556228bdd5617b83af53 , CUSTOM scales can be set with the key 0x10C7D4A2, thus setting a custom scale of 90% can be achieved with DXVK_NVAPI_DRS_NGX_DLSS_RR_MODE=custom,DXVK_NVAPI_DRS_SETTINGS=0x10C7D4A2=90.
Available since https://github.com/jp7677/dxvk-nvapi/commit/0bcef80fac77ee7a4f13556228bdd5617b83af53.
This requires Override DLSS-RR performance mode to be set to CUSTOM.
- Key:
NGX_DLSS_RR_OVERRIDE_SCALING_RATIO - Values:
<VALUE>MINMAXDEFAULT
Example 1: DXVK_NVAPI_DRS_SETTINGS=ngx_dlss_rr_override_scaling_ratio=75
Example 2: DXVK_NVAPI_DRS_NGX_DLSS_RR_OVERRIDE_SCALING_RATIO=75
Valid VALUEs are from 33 to 100.
- Key:
NGX_DLSS_RR_OVERRIDE - Values:
OFFONDEFAULT
Example 1: DXVK_NVAPI_DRS_SETTINGS=ngx_dlss_rr_override=on
Example 2: DXVK_NVAPI_DRS_NGX_DLSS_RR_OVERRIDE=on
Presets G-O available since https://github.com/jp7677/dxvk-nvapi/commit/84238d8b9d4f245c1cdc987dabb3d6ff18f78705.
- Key:
NGX_DLSS_RR_OVERRIDE_RENDER_PRESET_SELECTION - Values:
OFFRENDER_PRESET_ARENDER_PRESET_BRENDER_PRESET_CRENDER_PRESET_DRENDER_PRESET_ERENDER_PRESET_FRENDER_PRESET_GRENDER_PRESET_HRENDER_PRESET_IRENDER_PRESET_JRENDER_PRESET_KRENDER_PRESET_LRENDER_PRESET_MRENDER_PRESET_NRENDER_PRESET_ORENDER_PRESET_LATESTDEFAULT
Example 1: DXVK_NVAPI_DRS_SETTINGS=ngx_dlss_rr_override_render_preset_selection=render_preset_latest
Example 2: DXVK_NVAPI_DRS_NGX_DLSS_RR_OVERRIDE_RENDER_PRESET_SELECTION=render_preset_latest
- Key:
NGX_DLSSG_MULTI_FRAME_COUNT - Values:
<VALUE>MINMAXDEFAULT
Example 1: DXVK_NVAPI_DRS_SETTINGS=ngx_dlssg_multi_frame_count=3
Example 2: DXVK_NVAPI_DRS_NGX_DLSSG_MULTI_FRAME_COUNT=3
Valid VALUEs are: 0 (application-controlled), 1 (2x), 2 (3x) and 3 (4x).
- Key:
NGX_DLSS_FG_OVERRIDE - Values:
OFFONDEFAULT
Example 1: DXVK_NVAPI_DRS_SETTINGS=ngx_dlss_fg_override=on
Example 2: DXVK_NVAPI_DRS_NGX_DLSS_FG_OVERRIDE=on
Applying driver settings does not override NGX snippets/dlls. Use PROTON_ENABLE_NGX_UPDATER=1 (See ngx.html from the NVIDIA driver documentation) for automatic snippets updates and then add the DRS settings that enable DLSS overrides:
- NGX_DLSS_SR_OVERRIDE=on
- NGX_DLSS_RR_OVERRIDE=on
- NGX_DLSS_FG_OVERRIDE=on
Overriding DLSS snippets for all three mentioned NGX features and force latest preset for DLSS-SR and DLSS-RR looks like this with a one liner suitable for e.g. launch options:
PROTON_ENABLE_NGX_UPDATER=1 DXVK_NVAPI_DRS_SETTINGS=NGX_DLSS_SR_OVERRIDE=on,NGX_DLSS_RR_OVERRIDE=on,NGX_DLSS_FG_OVERRIDE=on,NGX_DLSS_SR_OVERRIDE_RENDER_PRESET_SELECTION=render_preset_latest,NGX_DLSS_RR_OVERRIDE_RENDER_PRESET_SELECTION=render_preset_latest
or like this with separate environment variables:
PROTON_ENABLE_NGX_UPDATER=1DXVK_NVAPI_DRS_NGX_DLSS_SR_OVERRIDE=onDXVK_NVAPI_DRS_NGX_DLSS_RR_OVERRIDE=onDXVK_NVAPI_DRS_NGX_DLSS_FG_OVERRIDE=onDXVK_NVAPI_DRS_NGX_DLSS_SR_OVERRIDE_RENDER_PRESET_SELECTION=render_preset_latestDXVK_NVAPI_DRS_NGX_DLSS_RR_OVERRIDE_RENDER_PRESET_SELECTION=render_preset_latest
or like this when putting those options into Proton's user_settings.py:
{
"PROTON_ENABLE_NGX_UPDATER": "1",
"DXVK_NVAPI_DRS_NGX_DLSS_SR_OVERRIDE": "on",
"DXVK_NVAPI_DRS_NGX_DLSS_RR_OVERRIDE": "on",
"DXVK_NVAPI_DRS_NGX_DLSS_FG_OVERRIDE": "on",
"DXVK_NVAPI_DRS_NGX_DLSS_SR_OVERRIDE_RENDER_PRESET_SELECTION": "render_preset_latest",
"DXVK_NVAPI_DRS_NGX_DLSS_RR_OVERRIDE_RENDER_PRESET_SELECTION": "render_preset_latest"
}Note that PROTON_ENABLE_NGX_UPDATER had some issues before R570 driver release and there's still some chance that it won't work in all titles. If you start seeing games quietly failing to launch, this variable may be the cause.
DXVK-NVAPI logging shows which settings have been provided from the environment and, more important, which settings have been requested from an application.
As a side note, NGX offers registry settings for enabling graphical indicators for DLSS and DLSSG. Those can be used to validate a different snippet or preset. For convenience, those registry settings can be set with a DXVK-NVAPI tweak: DXVK_NVAPI_SET_NGX_DEBUG_OPTIONS=DLSSIndicator=1024,DLSSGIndicator=2 for showing indicators and DXVK_NVAPI_SET_NGX_DEBUG_OPTIONS=DLSSIndicator=0,DLSSGIndicator=0 for hiding the indicators. Be aware, this tweak permanently modifies the registry. The NGX indicators are only active when DLSS is active, which usually means that entering in-game is needed. Once activated, it looks like this:

(Bottom left and top left)