Skip to content

Commit 3f2cecf

Browse files
committed
DisableReactiveMask change
1 parent b0abb15 commit 3f2cecf

File tree

3 files changed

+9
-52
lines changed

3 files changed

+9
-52
lines changed

Diff for: CyberXeSS/CyberXeSS.vcxproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
<IncludePath>$(SolutionDir)external\simpleini;$(SolutionDir)external\nvngx_dlss_sdk;$(SolutionDir)external\unordered_dense\include;$(SolutionDir)external\xess\inc\xess;$(SolutionDir)external\vulkan\include;$(SolutionDir)external\ffx-sdk\sdk\include;$(SolutionDir)external\fmt\include;$(SolutionDir)external\spdlog\include;C:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29\Include;$(IncludePath)</IncludePath>
8383
<LibraryPath>$(SolutionDir)external\xess\lib;C:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29\Lib\x64;$(LibraryPath)</LibraryPath>
8484
<TargetName>nvngx</TargetName>
85-
<OutDir>F:\Games\Steam\steamapps\common\Returnal\Returnal\Binaries\Win64</OutDir>
85+
<OutDir>D:\Games\Stranger of Paradise - Final Fantasy Origin</OutDir>
8686
</PropertyGroup>
8787
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
8888
<IncludePath>$(SolutionDir)external\simpleini;$(SolutionDir)external\nvngx_dlss_sdk;$(SolutionDir)external\unordered_dense\include;$(SolutionDir)external\xess\inc\xess;$(SolutionDir)external\vulkan\include;$(SolutionDir)external\ffx-sdk\sdk\include;$(SolutionDir)external\fmt\include;$(SolutionDir)external\spdlog\include;C:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29\Include;$(IncludePath)</IncludePath>

Diff for: CyberXeSS/CyberXessDx11.cpp

+8-31
Original file line numberDiff line numberDiff line change
@@ -192,18 +192,15 @@ NVSDK_NGX_Result NVSDK_NGX_D3D11_CreateFeature(ID3D11DeviceContext* InDevCtx, NV
192192
{
193193
spdlog::info("NVSDK_NGX_D3D11_CreateFeature");
194194

195-
if (CyberXessContext::instance()->Dx11Device == nullptr)
196-
{
197-
ID3D11Device* device;
198-
InDevCtx->GetDevice(&device);
195+
ID3D11Device* device;
196+
InDevCtx->GetDevice(&device);
199197

200-
auto result = device->QueryInterface(IID_PPV_ARGS(&CyberXessContext::instance()->Dx11Device));
198+
auto dx11DeviceResult = device->QueryInterface(IID_PPV_ARGS(&CyberXessContext::instance()->Dx11Device));
201199

202-
if (result != S_OK)
203-
{
204-
spdlog::error("NVSDK_NGX_D3D11_CreateFeature QueryInterface ID3D11Device5 result: {0:x}", result);
205-
return NVSDK_NGX_Result_Fail;
206-
}
200+
if (dx11DeviceResult != S_OK)
201+
{
202+
spdlog::error("NVSDK_NGX_D3D11_CreateFeature QueryInterface ID3D11Device5 result: {0:x}", dx11DeviceResult);
203+
return NVSDK_NGX_Result_Fail;
207204
}
208205

209206
if (CyberXessContext::instance()->Dx12Device == nullptr)
@@ -338,26 +335,6 @@ NVSDK_NGX_Result NVSDK_NGX_D3D11_EvaluateFeature(ID3D11DeviceContext* InDevCtx,
338335
deviceContext->XeSSDestroy();
339336
}
340337

341-
if (!CyberXessContext::instance()->MyConfig->DisableReactiveMaskSetFromIni)
342-
{
343-
ID3D11Resource* paramMask = nullptr;
344-
if (InParameters->Get(NVSDK_NGX_Parameter_DLSS_Input_Bias_Current_Color_Mask, &paramMask) != NVSDK_NGX_Result_Success)
345-
InParameters->Get(NVSDK_NGX_Parameter_DLSS_Input_Bias_Current_Color_Mask, (void**)&paramMask);
346-
347-
if (paramMask != nullptr && !deviceContext->XeSSMaskEnabled())
348-
{
349-
spdlog::debug("NVSDK_NGX_D3D11_EvaluateFeature bias mask exist, enabling reactive mask!");
350-
CyberXessContext::instance()->MyConfig->DisableReactiveMask = false;
351-
deviceContext->XeSSDestroy();
352-
}
353-
else if (paramMask == nullptr && deviceContext->XeSSMaskEnabled())
354-
{
355-
spdlog::debug("NVSDK_NGX_D3D11_EvaluateFeature bias mask does not exist, disabling reactive mask!");
356-
CyberXessContext::instance()->MyConfig->DisableReactiveMask = true;
357-
deviceContext->XeSSDestroy();
358-
}
359-
}
360-
361338
if (!deviceContext->XeSSIsInited())
362339
{
363340
deviceContext->XeSSInit(CyberXessContext::instance()->Dx12Device, InParameters);
@@ -368,7 +345,7 @@ NVSDK_NGX_Result NVSDK_NGX_D3D11_EvaluateFeature(ID3D11DeviceContext* InDevCtx,
368345
return NVSDK_NGX_Result_Fail;
369346
}
370347
}
371-
348+
372349
NVSDK_NGX_Result evResult = NVSDK_NGX_Result_Success;
373350
if (!deviceContext->XeSSExecuteDx11(instance->Dx12CommandList, instance->Dx12CommandQueue, instance->Dx11Device, InDevCtx, InParameters, deviceContext))
374351
evResult = NVSDK_NGX_Result_Fail;

Diff for: CyberXeSS/CyberXessDx12.cpp

-20
Original file line numberDiff line numberDiff line change
@@ -260,26 +260,6 @@ NVSDK_NGX_API NVSDK_NGX_Result NVSDK_NGX_D3D12_EvaluateFeature(ID3D12GraphicsCom
260260
deviceContext->XeSSDestroy();
261261
}
262262

263-
if (!CyberXessContext::instance()->MyConfig->DisableReactiveMaskSetFromIni)
264-
{
265-
ID3D12Resource* paramMask = nullptr;
266-
if (InParameters->Get(NVSDK_NGX_Parameter_DLSS_Input_Bias_Current_Color_Mask, &paramMask) != NVSDK_NGX_Result_Success)
267-
InParameters->Get(NVSDK_NGX_Parameter_DLSS_Input_Bias_Current_Color_Mask, (void**)&paramMask);
268-
269-
if (paramMask != nullptr && (!deviceContext->XeSSMaskEnabled() || !deviceContext->XeSSIsInited()))
270-
{
271-
spdlog::error("NVSDK_NGX_D3D12_EvaluateFeature bias mask exist, enabling reactive mask!");
272-
CyberXessContext::instance()->MyConfig->DisableReactiveMask = false;
273-
deviceContext->XeSSDestroy();
274-
}
275-
else if (paramMask == nullptr && deviceContext->XeSSMaskEnabled())
276-
{
277-
spdlog::error("NVSDK_NGX_D3D12_EvaluateFeature bias mask does not exist, disabling reactive mask!");
278-
CyberXessContext::instance()->MyConfig->DisableReactiveMask = true;
279-
deviceContext->XeSSDestroy();
280-
}
281-
}
282-
283263
if (!deviceContext->XeSSIsInited())
284264
{
285265
deviceContext->XeSSInit(CyberXessContext::instance()->Dx12Device, InParameters);

0 commit comments

Comments
 (0)