diff --git a/OptiScaler/Config.h b/OptiScaler/Config.h index 3ad60a1f..89a56964 100644 --- a/OptiScaler/Config.h +++ b/OptiScaler/Config.h @@ -243,6 +243,9 @@ public: float ScreenWidth = 800.0; float ScreenHeight = 450.0; + std::string setInputApiName; + std::string currentInputApiName; + IFeature* CurrentFeature = nullptr; bool Reload(std::filesystem::path iniPath); diff --git a/OptiScaler/NVNGX_DLSS_Dx12.cpp b/OptiScaler/NVNGX_DLSS_Dx12.cpp index 42c04982..6a7da507 100644 --- a/OptiScaler/NVNGX_DLSS_Dx12.cpp +++ b/OptiScaler/NVNGX_DLSS_Dx12.cpp @@ -854,6 +854,13 @@ NVSDK_NGX_API NVSDK_NGX_Result NVSDK_NGX_D3D12_EvaluateFeature(ID3D12GraphicsCom auto evaluateStart = GetTicks(); + if (Config::Instance()->setInputApiName.length() == 0) + Config::Instance()->currentInputApiName = "DLSS"; + else + Config::Instance()->currentInputApiName = Config::Instance()->setInputApiName; + + Config::Instance()->setInputApiName.clear(); + if (!InCmdList) { LOG_ERROR("InCmdList is null!!!"); diff --git a/OptiScaler/OptiScaler.vcxproj b/OptiScaler/OptiScaler.vcxproj index 3cf50d84..4759ecc3 100644 --- a/OptiScaler/OptiScaler.vcxproj +++ b/OptiScaler/OptiScaler.vcxproj @@ -82,7 +82,7 @@ $(SolutionDir)external\vulkan\include;$(SolutionDir)external\nvngx_dlss_sdk;$(SolutionDir)external\xess\inc\xess;$(SolutionDir)external\FidelityFX-SDK\ffx-api\include\ffx_api;$(SolutionDir)external\simpleini;$(SolutionDir)external\unordered_dense\include;$(SolutionDir)external\spdlog\include;$(IncludePath) $(ProjectDir)fsr2\lib;$(ProjectDir)fsr2_212\lib;$(ProjectDir)fsr31\lib;$(ProjectDir)vulkan;$(ProjectDir)d3dx;$(ProjectDir)detours;$(SolutionDir)external\xess\lib;$(LibraryPath) dxgi - D:\Folders\Games\Deep Rock Galactic\FSD\Binaries\Win64\ + D:\Folders\Games\Cyberpunk 2077\bin\x64\ .\x64\Debug diff --git a/OptiScaler/XeSS_Dx12.cpp b/OptiScaler/XeSS_Dx12.cpp index 254599df..8fe7070e 100644 --- a/OptiScaler/XeSS_Dx12.cpp +++ b/OptiScaler/XeSS_Dx12.cpp @@ -279,6 +279,8 @@ XESS_API xess_result_t xessD3D12Execute(xess_context_handle_t hContext, ID3D12Gr params->Set(NVSDK_NGX_Parameter_MotionVectors, pExecParams->pVelocityTexture); params->Set(NVSDK_NGX_Parameter_Output, pExecParams->pOutputTexture); + Config::Instance()->setInputApiName = "XeSS"; + if (NVSDK_NGX_D3D12_EvaluateFeature(pCommandList, handle, params, nullptr) == NVSDK_NGX_Result_Success) return XESS_RESULT_SUCCESS; diff --git a/OptiScaler/imgui/imgui_common.cpp b/OptiScaler/imgui/imgui_common.cpp index de8273b5..f7f24a2f 100644 --- a/OptiScaler/imgui/imgui_common.cpp +++ b/OptiScaler/imgui/imgui_common.cpp @@ -841,7 +841,10 @@ void ImGuiCommon::RenderMenu() break; case NVNGX_DX12: - ImGui::Text("DirectX 12 %s- %s (%d.%d.%d)", Config::Instance()->IsRunningOnDXVK ? "(DXVK)" : "", Config::Instance()->CurrentFeature->Name(), Config::Instance()->CurrentFeature->Version().major, Config::Instance()->CurrentFeature->Version().minor, Config::Instance()->CurrentFeature->Version().patch); + ImGui::Text("DirectX 12 %s- %s (%d.%d.%d)", Config::Instance()->IsRunningOnDXVK ? "(DXVK) " : "", Config::Instance()->CurrentFeature->Name(), Config::Instance()->CurrentFeature->Version().major, Config::Instance()->CurrentFeature->Version().minor, Config::Instance()->CurrentFeature->Version().patch); + + ImGui::SameLine(0.0f, 6.0f); + ImGui::Text("Source Api: %s", Config::Instance()->currentInputApiName.c_str()); if (Config::Instance()->CurrentFeature->Name() != "DLSSD") AddDx12Backends(¤tBackend, ¤tBackendName); @@ -849,7 +852,7 @@ void ImGuiCommon::RenderMenu() break; default: - ImGui::Text("Vulkan %s- %s (%d.%d.%d)", Config::Instance()->IsRunningOnDXVK ? "(DXVK)" : "", Config::Instance()->CurrentFeature->Name(), Config::Instance()->CurrentFeature->Version().major, Config::Instance()->CurrentFeature->Version().minor, Config::Instance()->CurrentFeature->Version().patch); + ImGui::Text("Vulkan %s- %s (%d.%d.%d)", Config::Instance()->IsRunningOnDXVK ? "(DXVK) " : "", Config::Instance()->CurrentFeature->Name(), Config::Instance()->CurrentFeature->Version().major, Config::Instance()->CurrentFeature->Version().minor, Config::Instance()->CurrentFeature->Version().patch); if (Config::Instance()->CurrentFeature->Name() != "DLSSD") AddVulkanBackends(¤tBackend, ¤tBackendName);