Skip to content

Commit

Permalink
Replace attempts by games to set DLSS Presets A-D with E, when DLSS v…
Browse files Browse the repository at this point in the history
…ersion is >= 3.8.10
  • Loading branch information
Kaldaien committed Nov 13, 2024
1 parent 92eca53 commit 617a337
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 2 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
24.11.11
24.11.13
========
+ Replace attempts by games to set DLSS Presets A-D with E, when DLSS version
is >= 3.8.10.
* Needed for Nixxes games, since they explicitly request Preset C instead of
DLSS default.

24.11.11
========
+ Reinstate background render mode as default policy in Metaphor: ReFantazio.
+ Allow Steam Input to hook and override WinMM Joystick APIs by default;
Expand Down
2 changes: 1 addition & 1 deletion include/SpecialK/DLL_VERSION.H
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#define SK_YEAR 24
#define SK_MONTH 11
#define SK_DATE 11
#define SK_DATE 13
#define SK_REV_N 0
#define SK_REV 0

Expand Down
1 change: 1 addition & 0 deletions include/SpecialK/render/ngx/ngx.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ struct SK_DLSS_Context
static bool hasDLAAQualityLevel (void) { return ( Version.major > 3 || ( Version.major == 3 && ( Version.minor > 1 || ( Version.minor == 1 && Version.build >= 13 ) ) ) ); };
static bool hasAlphaUpscaling (void) { return ( Version.major > 3 || ( Version.major == 3 && ( Version.minor > 6 ) ) ); };
static bool hasPresetE (void) { return ( Version.major > 3 || ( Version.major == 3 && ( Version.minor > 6 ) ) ); };
static bool hasPresetsAThroughD (void) { return ( Version.major < 3 || ( Version.major == 3 && ( Version.minor < 8 || ( Version.minor == 8 && Version.build <= 9 ) ) ) ); };

static void showIndicator (bool show);
static bool isIndicatorShown (void);
Expand Down
39 changes: 39 additions & 0 deletions src/render/ngx/ngx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,19 @@ NVSDK_NGX_Parameter_SetI_Detour (NVSDK_NGX_Parameter* InParameter, const char* I
{
InValue = config.nvidia.dlss.forced_preset;
}

if (! SK_DLSS_Context::dlss_s::hasPresetsAThroughD ())
{
if (InValue > NVSDK_NGX_DLSS_Hint_Render_Preset_Default &&
InValue <= NVSDK_NGX_DLSS_Hint_Render_Preset_D)
{
SK_RunOnce (
SK_LOGi0 (L"Replacing Non-Existent DLSS 3.8.10+ Preset With E")
);

InValue = NVSDK_NGX_DLSS_Hint_Render_Preset_E;
}
}
}

NVSDK_NGX_Parameter_SetI_Original (InParameter, InName, InValue);
Expand Down Expand Up @@ -364,6 +377,19 @@ NVSDK_NGX_Parameter_SetUI_Detour (NVSDK_NGX_Parameter* InParameter, const char*
{
InValue = config.nvidia.dlss.forced_preset;
}

if (! SK_DLSS_Context::dlss_s::hasPresetsAThroughD ())
{
if (InValue > NVSDK_NGX_DLSS_Hint_Render_Preset_Default &&
InValue <= NVSDK_NGX_DLSS_Hint_Render_Preset_D)
{
SK_RunOnce (
SK_LOGi0 (L"Replacing Non-Existent DLSS 3.8.10+ Preset With E")
);

InValue = NVSDK_NGX_DLSS_Hint_Render_Preset_E;
}
}
}

NVSDK_NGX_Parameter_SetUI_Original (InParameter, InName, InValue);
Expand Down Expand Up @@ -410,6 +436,19 @@ NVSDK_NGX_Parameter_SetULL_Detour (NVSDK_NGX_Parameter* InParameter, const char*
{
InValue = config.nvidia.dlss.forced_preset;
}

if (! SK_DLSS_Context::dlss_s::hasPresetsAThroughD ())
{
if (InValue > NVSDK_NGX_DLSS_Hint_Render_Preset_Default &&
InValue <= NVSDK_NGX_DLSS_Hint_Render_Preset_D)
{
SK_RunOnce (
SK_LOGi0 (L"Replacing Non-Existent DLSS 3.8.10+ Preset With E")
);

InValue = NVSDK_NGX_DLSS_Hint_Render_Preset_E;
}
}
}

NVSDK_NGX_Parameter_SetULL_Original (InParameter, InName, InValue);
Expand Down

0 comments on commit 617a337

Please sign in to comment.