cleanup some unused code

This commit is contained in:
cdozdil
2024-05-18 18:41:10 +03:00
parent 50ea2b020d
commit 9814565e28
5 changed files with 2 additions and 87 deletions
@@ -155,23 +155,6 @@ bool DLSSFeatureDx12::Evaluate(ID3D12GraphicsCommandList* InCommandList, const N
if (_EvaluateFeature != nullptr)
{
if (Config::Instance()->changeRCAS)
{
if (RCAS != nullptr && RCAS.get() != nullptr)
{
spdlog::trace("DLSSFeatureDx12::Evaluate sleeping before CAS.reset() for 250ms");
std::this_thread::sleep_for(std::chrono::milliseconds(250));
RCAS.reset();
}
else
{
Config::Instance()->changeRCAS = false;
spdlog::trace("DLSSFeatureDx12::Evaluate sleeping before CAS creation for 250ms");
std::this_thread::sleep_for(std::chrono::milliseconds(250));
RCAS = std::make_unique<RCAS_Dx12>("RCAS", Device);
}
}
ProcessEvaluateParams(InParameters);
ID3D12Resource* paramOutput = nullptr;
@@ -134,23 +134,6 @@ bool FSR2FeatureDx11on12::Evaluate(ID3D11DeviceContext* InDeviceContext, const N
Dx11DeviceContext = dc;
}
if (Config::Instance()->changeRCAS)
{
if (RCAS != nullptr && RCAS.get() != nullptr)
{
spdlog::trace("FSR2FeatureDx11on12::Evaluate sleeping before RCAS.reset() for 250ms");
std::this_thread::sleep_for(std::chrono::milliseconds(250));
RCAS.reset();
}
else
{
Config::Instance()->changeRCAS = false;
spdlog::trace("FSR2FeatureDx11on12::Evaluate sleeping before RCAS creation for 250ms");
std::this_thread::sleep_for(std::chrono::milliseconds(250));
RCAS = std::make_unique<RCAS_Dx12>("RCAS", Dx12Device);
}
}
FfxFsr2DispatchDescription params{};
InParameters->Get(NVSDK_NGX_Parameter_Jitter_Offset_X, &params.jitterOffset.x);
@@ -132,23 +132,6 @@ bool FSR2FeatureDx11on12_212::Evaluate(ID3D11DeviceContext* InDeviceContext, con
Dx11DeviceContext = dc;
}
if (Config::Instance()->changeRCAS)
{
if (RCAS != nullptr && RCAS.get() != nullptr)
{
spdlog::trace("FSR2FeatureDx11on12_212::Evaluate sleeping before RCAS.reset() for 250ms");
std::this_thread::sleep_for(std::chrono::milliseconds(250));
RCAS.reset();
}
else
{
Config::Instance()->changeRCAS = false;
spdlog::trace("FSR2FeatureDx11on12_212::Evaluate sleeping before RCAS creation for 250ms");
std::this_thread::sleep_for(std::chrono::milliseconds(250));
RCAS = std::make_unique<RCAS_Dx12>("RCAS", Dx12Device);
}
}
Fsr212::FfxFsr2DispatchDescription params{};
InParameters->Get(NVSDK_NGX_Parameter_Jitter_Offset_X, &params.jitterOffset.x);
+2 -19
View File
@@ -167,23 +167,6 @@ bool XeSSFeatureDx11::Evaluate(ID3D11DeviceContext* InDeviceContext, const NVSDK
dumpCount += Config::Instance()->xessDebugFrames;
}
if (Config::Instance()->changeRCAS)
{
if (RCAS != nullptr && RCAS.get() != nullptr)
{
spdlog::trace("XeSSFeatureDx11::Evaluate sleeping before CAS.reset() for 250ms");
std::this_thread::sleep_for(std::chrono::milliseconds(250));
RCAS.reset();
}
else
{
Config::Instance()->changeRCAS = false;
spdlog::trace("XeSSFeatureDx11::Evaluate sleeping before CAS creation for 250ms");
std::this_thread::sleep_for(std::chrono::milliseconds(250));
RCAS = std::make_unique<RCAS_Dx12>("RCAS", Dx12Device);
}
}
// creatimg params for XeSS
xess_result_t xessResult;
xess_d3d12_execute_params_t params{};
@@ -259,7 +242,7 @@ bool XeSSFeatureDx11::Evaluate(ID3D11DeviceContext* InDeviceContext, const NVSDK
// RCAS
if (!Config::Instance()->changeRCAS &&
Config::Instance()->RcasEnabled.value_or(true) &&
sharpness > 0.0f &&
(sharpness > 0.0f || Config::Instance()->MotionSharpnessEnabled.value_or(false)) &&
RCAS != nullptr && RCAS.get() != nullptr &&
RCAS->CreateBufferResource(Dx12Device, params.pOutputTexture, D3D12_RESOURCE_STATE_UNORDERED_ACCESS))
{
@@ -326,13 +309,13 @@ bool XeSSFeatureDx11::Evaluate(ID3D11DeviceContext* InDeviceContext, const NVSDK
RCAS != nullptr && RCAS.get() != nullptr)
{
spdlog::debug("XeSSFeatureDx11::Evaluate Apply CAS");
if (params.pOutputTexture != RCAS->Buffer())
ResourceBarrier(Dx12CommandList, params.pOutputTexture, D3D12_RESOURCE_STATE_UNORDERED_ACCESS, D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE);
RCAS->SetBufferState(Dx12CommandList, D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE);
RcasConstants rcasConstants{};
rcasConstants.Sharpness = sharpness;
rcasConstants.DisplayWidth = DisplayWidth();
rcasConstants.DisplayHeight = DisplayHeight();
@@ -55,23 +55,6 @@ bool XeSSFeatureDx12::Evaluate(ID3D12GraphicsCommandList* InCommandList, const N
dumpCount += Config::Instance()->xessDebugFrames;
}
if (Config::Instance()->changeRCAS)
{
if (RCAS != nullptr && RCAS.get() != nullptr)
{
spdlog::trace("XeSSFeatureDx12::Evaluate sleeping before RCAS.reset() for 250ms");
std::this_thread::sleep_for(std::chrono::milliseconds(250));
RCAS.reset();
}
else
{
Config::Instance()->changeRCAS = false;
spdlog::trace("XeSSFeatureDx12::Evaluate sleeping before CAS creation for 250ms");
std::this_thread::sleep_for(std::chrono::milliseconds(250));
RCAS = std::make_unique<RCAS_Dx12>("RCAS", Device);
}
}
xess_result_t xessResult;
xess_d3d12_execute_params_t params{};