From 41bfe5e10be2841ea53ee19d9a139d3c9f97177e Mon Sep 17 00:00:00 2001 From: PotatoOfDoom <8769019+PotatoOfDoom@users.noreply.github.com> Date: Thu, 6 Apr 2023 17:19:48 +0200 Subject: [PATCH] fix dlss 3 function exports --- CyberFSR/CyberFsrDx12.cpp | 23 +++++++++++++++++++---- CyberFSR/framework.h | 1 + 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/CyberFSR/CyberFsrDx12.cpp b/CyberFSR/CyberFsrDx12.cpp index 6d89273..1d5af43 100644 --- a/CyberFSR/CyberFsrDx12.cpp +++ b/CyberFSR/CyberFsrDx12.cpp @@ -35,14 +35,14 @@ NVSDK_NGX_Result NVSDK_NGX_D3D12_Init_with_ProjectID(const char* InProjectId, NV return NVSDK_NGX_D3D12_Init_Ext(0x1337, InApplicationDataPath, InDevice, InFeatureInfo, InSDKVersion, 0); } -NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_D3D12_Shutdown(void) +NVSDK_NGX_Result NVSDK_NGX_D3D12_Shutdown(void) { CyberFsrContext::instance()->NvParameterInstance->Params.clear(); CyberFsrContext::instance()->Contexts.clear(); return NVSDK_NGX_Result_Success; } -NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_D3D12_Shutdown1(ID3D12Device* InDevice) +NVSDK_NGX_Result NVSDK_NGX_D3D12_Shutdown1(ID3D12Device* InDevice) { CyberFsrContext::instance()->NvParameterInstance->Params.clear(); CyberFsrContext::instance()->Contexts.clear(); @@ -94,11 +94,11 @@ void Fsr2MessageCallback(FfxFsr2MsgType type, const wchar_t* message) printf("[WARNING] %ls\n", message); break; } - + } NVSDK_NGX_Result NVSDK_NGX_D3D12_CreateFeature(ID3D12GraphicsCommandList* InCmdList, NVSDK_NGX_Feature InFeatureID, - const NVSDK_NGX_Parameter* InParameters, NVSDK_NGX_Handle** OutHandle) + NVSDK_NGX_Parameter* InParameters, NVSDK_NGX_Handle** OutHandle) { const auto inParams = static_cast(InParameters); @@ -178,6 +178,16 @@ NVSDK_NGX_Result NVSDK_NGX_D3D12_ReleaseFeature(NVSDK_NGX_Handle* InHandle) return NVSDK_NGX_Result_Success; } +NVSDK_NGX_Result NVSDK_NGX_D3D12_GetFeatureRequirements(IDXGIAdapter *Adapter, const NVSDK_NGX_FeatureDiscoveryInfo *FeatureDiscoveryInfo, NVSDK_NGX_FeatureRequirement *OutSupported) +{ + *OutSupported = NVSDK_NGX_FeatureRequirement(); + OutSupported->FeatureSupported = NVSDK_NGX_FeatureSupportResult_Supported; + OutSupported->MinHWArchitecture = 0; + //Some windows 10 os version + strcpy_s(OutSupported->MinOSVersion, "10.0.19045.2728"); + return NVSDK_NGX_Result_Success; +} + NVSDK_NGX_Result NVSDK_NGX_D3D12_EvaluateFeature(ID3D12GraphicsCommandList* InCmdList, const NVSDK_NGX_Handle* InFeatureHandle, const NVSDK_NGX_Parameter* InParameters, PFN_NVSDK_NGX_ProgressCallback InCallback) { ID3D12RootSignature* orgRootSig = nullptr; @@ -261,5 +271,10 @@ NVSDK_NGX_Result NVSDK_NGX_D3D12_EvaluateFeature(ID3D12GraphicsCommandList* InCm myCommandList = InCmdList; + return NVSDK_NGX_Result_Success; +} + +NVSDK_NGX_Result NVSDK_NGX_UpdateFeature(const NVSDK_NGX_Application_Identifier *ApplicationId, const NVSDK_NGX_Feature FeatureID) +{ return NVSDK_NGX_Result_Success; } \ No newline at end of file diff --git a/CyberFSR/framework.h b/CyberFSR/framework.h index 8b66e3a..e7f675d 100644 --- a/CyberFSR/framework.h +++ b/CyberFSR/framework.h @@ -25,6 +25,7 @@ #define NV_WINDOWS #define NVSDK_NGX #define NGX_ENABLE_DEPRECATED_GET_PARAMETERS +#define NGX_ENABLE_DEPRECATED_SHUTDOWN #include #include