mirror of
https://github.com/optiscaler/OptiScaler.git
synced 2026-09-22 05:15:50 +00:00
small fixes
This commit is contained in:
@@ -821,9 +821,7 @@ NVSDK_NGX_API NVSDK_NGX_Result NVSDK_NGX_D3D12_EvaluateFeature(ID3D12GraphicsCom
|
||||
if (InFeatureHandle == nullptr)
|
||||
{
|
||||
LOG_DEBUG("InFeatureHandle is null");
|
||||
return NVSDK_NGX_Result_Fail;
|
||||
// returning success to prevent breaking flow of the app
|
||||
// return NVSDK_NGX_Result_Success;
|
||||
return NVSDK_NGX_Result_FAIL_FeatureNotFound;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -832,26 +830,20 @@ NVSDK_NGX_API NVSDK_NGX_Result NVSDK_NGX_D3D12_EvaluateFeature(ID3D12GraphicsCom
|
||||
|
||||
auto evaluateStart = GetTicks();
|
||||
|
||||
auto handleId = InFeatureHandle->Id;
|
||||
LOG_DEBUG("FeatureId: {0}", handleId);
|
||||
|
||||
if (!InCmdList)
|
||||
{
|
||||
LOG_ERROR("InCmdList is null!!!");
|
||||
return NVSDK_NGX_Result_Fail;
|
||||
}
|
||||
|
||||
auto handleId = InFeatureHandle->Id;
|
||||
if (handleId < 1000000)
|
||||
{
|
||||
if (Config::Instance()->DLSSEnabled.value_or(true) && NVNGXProxy::D3D12_EvaluateFeature() != nullptr)
|
||||
{
|
||||
LOG_DEBUG("D3D12_EvaluateFeature for ({0})", handleId);
|
||||
auto start = Util::MillisecondsNow();
|
||||
auto result = NVNGXProxy::D3D12_EvaluateFeature()(InCmdList, InFeatureHandle, InParameters, InCallback);
|
||||
Config::Instance()->upscaleTimes.push_back(Util::MillisecondsNow() - start);
|
||||
Config::Instance()->upscaleTimes.pop_front();
|
||||
LOG_DEBUG("D3D12_EvaluateFeature result for ({0}): {1:X}", handleId, (UINT)result);
|
||||
|
||||
return result;
|
||||
}
|
||||
else
|
||||
@@ -1152,10 +1144,7 @@ NVSDK_NGX_API NVSDK_NGX_Result NVSDK_NGX_D3D12_EvaluateFeature(ID3D12GraphicsCom
|
||||
// Record the first timestamp (before FSR2 upscaling)
|
||||
InCmdList->EndQuery(ImGuiOverlayDx::queryHeap, D3D12_QUERY_TYPE_TIMESTAMP, 0);
|
||||
|
||||
//auto start = Util::MillisecondsNow();
|
||||
bool evalResult = deviceContext->Evaluate(InCmdList, InParameters);
|
||||
//Config::Instance()->upscaleTimes.push_back(Util::MillisecondsNow() - start);
|
||||
//Config::Instance()->upscaleTimes.pop_front();
|
||||
|
||||
// Record the second timestamp (after FSR2 upscaling)
|
||||
InCmdList->EndQuery(ImGuiOverlayDx::queryHeap, D3D12_QUERY_TYPE_TIMESTAMP, 1);
|
||||
|
||||
@@ -724,9 +724,7 @@ NVSDK_NGX_API NVSDK_NGX_Result NVSDK_NGX_VULKAN_EvaluateFeature(VkCommandBuffer
|
||||
if (InFeatureHandle == nullptr)
|
||||
{
|
||||
LOG_DEBUG("InFeatureHandle is null");
|
||||
return NVSDK_NGX_Result_Fail;
|
||||
// returning success to prevent breaking flow of the app
|
||||
// return NVSDK_NGX_Result_Success;
|
||||
return NVSDK_NGX_Result_FAIL_FeatureNotFound;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -744,10 +742,8 @@ NVSDK_NGX_API NVSDK_NGX_Result NVSDK_NGX_VULKAN_EvaluateFeature(VkCommandBuffer
|
||||
{
|
||||
if (Config::Instance()->DLSSEnabled.value_or(true) && NVNGXProxy::VULKAN_EvaluateFeature() != nullptr)
|
||||
{
|
||||
auto start = Util::MillisecondsNow();
|
||||
LOG_DEBUG("VULKAN_EvaluateFeature for ({0})", handleId);
|
||||
auto result = NVNGXProxy::VULKAN_EvaluateFeature()(InCmdBuffer, InFeatureHandle, InParameters, InCallback);
|
||||
Config::Instance()->upscaleTimes.push_back(Util::MillisecondsNow() - start);
|
||||
Config::Instance()->upscaleTimes.pop_front();
|
||||
LOG_INFO("VULKAN_EvaluateFeature result for ({0}): {1:X}", handleId, (UINT)result);
|
||||
return result;
|
||||
}
|
||||
@@ -947,7 +943,6 @@ NVSDK_NGX_API NVSDK_NGX_Result NVSDK_NGX_VULKAN_EvaluateFeature(VkCommandBuffer
|
||||
|
||||
Config::Instance()->RenderMenu = true;
|
||||
|
||||
//auto start = Util::MillisecondsNow();
|
||||
// Record the first timestamp (before FSR2)
|
||||
vkCmdWriteTimestamp(InCmdBuffer, VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, ImGuiOverlayVk::queryPool, 0);
|
||||
|
||||
@@ -957,9 +952,6 @@ NVSDK_NGX_API NVSDK_NGX_Result NVSDK_NGX_VULKAN_EvaluateFeature(VkCommandBuffer
|
||||
vkCmdWriteTimestamp(InCmdBuffer, VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT, ImGuiOverlayVk::queryPool, 1);
|
||||
ImGuiOverlayVk::vkUpscaleTrig = true;
|
||||
|
||||
//Config::Instance()->upscaleTimes.push_back(Util::MillisecondsNow() - start);
|
||||
//Config::Instance()->upscaleTimes.pop_front();
|
||||
|
||||
return upscaleResult ? NVSDK_NGX_Result_Success : NVSDK_NGX_Result_Fail;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user