Skip to content

Commit

Permalink
fix dlss 3 function exports
Browse files Browse the repository at this point in the history
  • Loading branch information
PotatoOfDoom committed Apr 6, 2023
1 parent d54a273 commit 41bfe5e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
23 changes: 19 additions & 4 deletions CyberFSR/CyberFsrDx12.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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<const NvParameter*>(InParameters);

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
1 change: 1 addition & 0 deletions CyberFSR/framework.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#define NV_WINDOWS
#define NVSDK_NGX
#define NGX_ENABLE_DEPRECATED_GET_PARAMETERS
#define NGX_ENABLE_DEPRECATED_SHUTDOWN
#include <nvsdk_ngx.h>
#include <nvsdk_ngx_vk.h>

Expand Down

0 comments on commit 41bfe5e

Please sign in to comment.