fixed mixing of ffx_dx12 and ffx_vk

This commit is contained in:
cdozdil
2025-01-22 00:20:22 +03:00
parent c646735561
commit 5045abc4bc
7 changed files with 11 additions and 7 deletions
+3
View File
@@ -6,6 +6,9 @@
#include "FfxApi_Proxy.h"
#include "NVNGX_Parameter.h"
#include "ffx_upscale.h"
#include "dx12/ffx_api_dx12.h"
static std::map<ffxContext, ffxCreateContextDescUpscale> _initParams;
static std::map<ffxContext, NVSDK_NGX_Parameter*> _nvParams;
static std::map<ffxContext, NVSDK_NGX_Handle*> _contexts;
-2
View File
@@ -1,8 +1,6 @@
#pragma once
#include "ffx_api.h"
#include "ffx_upscale.h"
#include "dx12/ffx_api_dx12.h"
ffxReturnCode_t ffxCreateContext_Dx12(ffxContext* context, ffxCreateContextDescHeader* desc, const ffxAllocationCallbacks* memCb);
ffxReturnCode_t ffxDestroyContext_Dx12(ffxContext* context, const ffxAllocationCallbacks* memCb);
+1 -3
View File
@@ -46,7 +46,6 @@ public:
spdlog::info("");
State::Instance().upscalerDisableHook = true;
//Config::Instance()->dxgiSkipSpoofing = true;
LOG_DEBUG("Loading amd_fidelityfx_dx12.dll methods");
@@ -74,7 +73,7 @@ public:
_D3D12_Query = (PfnFfxQuery)DetourFindFunction("amd_fidelityfx_dx12.dll", "ffxQuery");
}
if (/*Config::Instance()->FfxInputs.value_or_default() && */_D3D12_CreateContext != nullptr)
if (_D3D12_CreateContext != nullptr)
{
DetourTransactionBegin();
DetourUpdateThread(GetCurrentThread());
@@ -171,7 +170,6 @@ public:
spdlog::info("");
State::Instance().upscalerDisableHook = true;
//Config::Instance()->dxgiSkipSpoofing = true;
LOG_DEBUG("Loading amd_fidelityfx_vk.dll methods");
+2 -2
View File
@@ -1,9 +1,9 @@
#pragma once
#include "../../FfxApi_Proxy.h"
#include "ffx_upscale.h"
#include "../IFeature.h"
#include "../../detours/detours.h"
//#include "../../detours/detours.h"
inline static void FfxLogCallback(uint32_t type, const wchar_t* message)
{
@@ -2,6 +2,8 @@
#include "../../Config.h"
#include "../../Util.h"
#include "../../FfxApi_Proxy.h"
#include "FSR31Feature_Dx11On12.h"
FSR31FeatureDx11on12::FSR31FeatureDx11on12(unsigned int InHandleId, NVSDK_NGX_Parameter* InParameters) : FSR31Feature(InHandleId, InParameters), IFeature_Dx11wDx12(InHandleId, InParameters), IFeature_Dx11(InHandleId, InParameters), IFeature(InHandleId, InParameters)
@@ -2,6 +2,8 @@
#include "../../Config.h"
#include "../../Util.h"
#include "../../FfxApi_Proxy.h"
#include "FSR31Feature_Dx12.h"
FSR31FeatureDx12::FSR31FeatureDx12(unsigned int InHandleId, NVSDK_NGX_Parameter* InParameters) : FSR31Feature(InHandleId, InParameters), IFeature_Dx12(InHandleId, InParameters), IFeature(InHandleId, InParameters)
@@ -2,6 +2,7 @@
#include "../../Config.h"
#include "../../Util.h"
#include "../../FfxApi_Proxy.h"
#include "FSR31Feature_Vk.h"
#include "nvsdk_ngx_vk.h"