Add support for DLSSG DispatchFlags

This commit is contained in:
FakeMichau
2026-06-04 20:17:28 +02:00
parent 4165d6fc2c
commit ec9d9b8d9d
4 changed files with 41 additions and 0 deletions
+14
View File
@@ -281,6 +281,20 @@ OverrideForceDMFG=auto
; Default (auto) is 0.0 (monitor's refresh rate)
FramerateTargetDMFG=auto
; Any set of flags is accepted, for example 0x14100000
; For reference https://github.com/artur-graniszewski/dlss-enabler-main/blob/a92464d468eb0d91ae17befa66c6bf6229f20b9f/Utils/DlssgProxy.cpp#L1033
; Any set of flags - Default (auto) is 0
DispatchFlags = auto
; Controls value set to DLSSG.ShowDebug
; uint32_t - Default (auto) is 0
ShowDebug = auto
; Disable hudless resource being sent to DLSSG
; Might be required for some sets of DispatchFlags, see the reference
; true or false - Default (auto) is false
DisableHudless = auto
; -------------------------------------------------------
[OptiFG]
+8
View File
@@ -225,6 +225,9 @@ bool Config::Reload(std::filesystem::path iniPath)
FGDLSSGFramerateTargetDMFG.set_from_config(readFloat("DLSSG", "FramerateTargetDMFG"));
FGDLSSGOverrideForceDMFG.set_from_config(readBool("DLSSG", "OverrideForceDMFG"));
FGDLSSGDispatchFlags.set_from_config(readUInt("DLSSG", "DispatchFlags"));
FGDLSSGShowDebug.set_from_config(readUInt("DLSSG", "ShowDebug"));
FGDLSSGDisableHudless.set_from_config(readBool("DLSSG", "DisableHudless"));
}
// FSR FG Inputs
@@ -937,6 +940,11 @@ bool Config::SaveIni()
GetFloatValue(Instance()->FGDLSSGFramerateTargetDMFG.value_for_config()).c_str());
ini.SetValue("DLSSG", "OverrideForceDMFG",
GetBoolValue(Instance()->FGDLSSGOverrideForceDMFG.value_for_config()).c_str());
ini.SetValue("DLSSG", "DispatchFlags",
GetIntValue(Instance()->FGDLSSGDispatchFlags.value_for_config()).c_str());
ini.SetValue("DLSSG", "ShowDebug", GetIntValue(Instance()->FGDLSSGShowDebug.value_for_config()).c_str());
ini.SetValue("DLSSG", "DisableHudless",
GetBoolValue(Instance()->FGDLSSGDisableHudless.value_for_config()).c_str());
}
// OptiFG
+6
View File
@@ -574,6 +574,12 @@ class Config
CustomOptional<bool> FGDLSSGForceDMFG { false }; // Overrides Opti's DLSSG mode to Dynamic
CustomOptional<float> FGDLSSGFramerateTargetDMFG { 0.0f }; // 0.0 means auto-detects the display refresh rate
// As per
// https://github.com/artur-graniszewski/dlss-enabler-main/blob/a92464d468eb0d91ae17befa66c6bf6229f20b9f/Utils/DlssgProxy.cpp#L1033
CustomOptional<uint32_t> FGDLSSGDispatchFlags { 0 };
CustomOptional<uint32_t> FGDLSSGShowDebug { 0 };
CustomOptional<bool> FGDLSSGDisableHudless { false };
// fakenvapi
CustomOptional<bool> UseFakenvapi { true };
CustomOptional<bool> ForceXeLL { false };
+13
View File
@@ -457,6 +457,19 @@ NVSDK_NGX_Result Nvngx_FG::D3D12_EvaluateFeature(ID3D12GraphicsCommandList* InCm
}
}
uint32_t showDebug = Config::Instance()->FGDLSSGShowDebug.value_or_default();
uint32_t flags = Config::Instance()->FGDLSSGDispatchFlags.value_or_default();
bool disableHudless = Config::Instance()->FGDLSSGDisableHudless.value_or_default();
if (showDebug)
InParameters->Set("DLSSG.ShowDebug", showDebug);
if (flags)
InParameters->Set("DLSSG.DispatchFlags", flags);
if (disableHudless)
InParameters->Set("DLSSG.HUDLess", (void*) nullptr);
NVSDK_NGX_Handle TempHandle = { .Id = InFeatureHandle->Id - DLSSG_MOD_ID_OFFSET };
return _DLSSG_D3D12_EvaluateFeature(InCmdList, &TempHandle, InParameters, InCallback);
}