more fixes

This commit is contained in:
cdozdil
2024-11-25 01:42:47 +03:00
parent 2f42fb7590
commit 212ce75393
5 changed files with 13 additions and 16 deletions
+2 -3
View File
@@ -1566,9 +1566,8 @@ NVSDK_NGX_API NVSDK_NGX_Result NVSDK_NGX_D3D12_EvaluateFeature(ID3D12GraphicsCom
{
std::unique_lock<std::shared_mutex> lock(FrameGen_Dx12::ffxMutex);
#endif
//Config::Instance()->dxgiSkipSpoofing = true;
retCode = FfxApiProxy::D3D12_Dispatch()(&FrameGen_Dx12::fgContext, &dfgPrepare.header);
//Config::Instance()->dxgiSkipSpoofing = false;
retCode = FfxApiProxy::D3D12_Dispatch()(&FrameGen_Dx12::fgContext, &dfgPrepare.header);
#ifdef USE_MUTEX_FOR_FFX
}
+1 -1
View File
@@ -82,7 +82,7 @@
<IncludePath>$(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;$(SolutionDir)external\freetype;$(IncludePath)</IncludePath>
<LibraryPath>$(ProjectDir)fsr2\lib;$(ProjectDir)fsr2_212\lib;$(ProjectDir)fsr31\lib;$(ProjectDir)vulkan;$(ProjectDir)d3dx;$(ProjectDir)detours;$(SolutionDir)external\xess\lib;$(SolutionDir)external\freetype;$(LibraryPath)</LibraryPath>
<TargetName>dxgi</TargetName>
<OutDir>D:\Folders\Games\Cyberpunk 2077\bin\x64\</OutDir>
<OutDir>..\..\..\Games\Steam\steamapps\common\DEAD RISING DELUXE REMASTER DEMO</OutDir>
<IntDir>.\x64\Debug</IntDir>
<TargetExt>.dll</TargetExt>
</PropertyGroup>
+1 -1
View File
@@ -359,6 +359,7 @@ public:
return _xessVersion;
}
static PFN_xessD3D12CreateContext D3D12CreateContext() { return _xessD3D12CreateContext; }
static PFN_xessD3D12BuildPipelines D3D12BuildPipelines() { return _xessD3D12BuildPipelines; }
static PRN_xessD3D12Init D3D12Init() { return _xessD3D12Init; }
@@ -384,6 +385,5 @@ public:
static PFN_xessD3D12GetResourcesToDump xessD3D12GetResourcesToDump() { return _xessD3D12GetResourcesToDump; }
static PFN_xessD3D12GetProfilingData xessD3D12GetProfilingData() { return _xessD3D12GetProfilingData; }
static PFN_xessSetContextParameterF xessSetContextParameterF() { return _xessSetContextParameterF; }
};
+8 -10
View File
@@ -658,9 +658,8 @@ static void GetHudless(ID3D12GraphicsCommandList* This)
{
std::unique_lock<std::shared_mutex> lock(FrameGen_Dx12::ffxMutex);
#endif
//Config::Instance()->dxgiSkipSpoofing = true;
retCode = FfxApiProxy::D3D12_Dispatch()(&FrameGen_Dx12::fgContext, &dfgPrepare.header);
//Config::Instance()->dxgiSkipSpoofing = false;
#ifdef USE_MUTEX_FOR_FFX
}
@@ -753,10 +752,9 @@ static void CaptureHudless(ID3D12GraphicsCommandList* cmdList, ResourceInfo* res
if (Config::Instance()->FGCaptureResources)
{
captureMutex.lock();
std::unique_lock<std::shared_mutex> lock(captureMutex);
fgCaptureList.insert(resource->buffer);
Config::Instance()->FGCapturedResourceCount = fgCaptureList.size();
captureMutex.unlock();
}
GetHudless(cmdList);
@@ -1785,21 +1783,17 @@ static void hkDispatch(ID3D12GraphicsCommandList* This, UINT ThreadGroupCountX,
#ifdef USE_MUTEX_FOR_FFX
static HRESULT hkFGPresent(void* This, UINT SyncInterval, UINT Flags)
{
std::unique_lock<std::shared_mutex> lock(FrameGen_Dx12::ffxMutex);
auto fIndex = fgFrameIndex;
LOG_DEBUG("{}", fIndex);
LOG_DEBUG("fc: {}, fi: {}", frameCounter, fIndex);
if (Config::Instance()->FGResetCapturedResources)
{
LOG_DEBUG("FGResetCapturedResources");
captureMutex.lock();
std::unique_lock<std::shared_mutex> lock(captureMutex);
fgCaptureList.clear();
Config::Instance()->FGCapturedResourceCount = 0;
Config::Instance()->FGResetCapturedResources = false;
captureMutex.unlock();
}
// Skip calculations etc
@@ -1809,6 +1803,9 @@ static HRESULT hkFGPresent(void* This, UINT SyncInterval, UINT Flags)
return o_FGSCPresent(This, SyncInterval, Flags);
}
LOG_DEBUG("Waiting mutex");
std::unique_lock<std::shared_mutex> lock(FrameGen_Dx12::ffxMutex);
// If dispatch still not called
if (!fgDispatchCalled && Config::Instance()->FGHUDFix.value_or(false) && FrameGen_Dx12::fgIsActive &&
Config::Instance()->FGUseFGSwapChain.value_or(true) && Config::Instance()->OverlayMenu.value_or(true) &&
@@ -1821,6 +1818,7 @@ static HRESULT hkFGPresent(void* This, UINT SyncInterval, UINT Flags)
}
auto result = o_FGSCPresent(This, SyncInterval, Flags);
LOG_DEBUG("Result: {:X}", result);
#ifdef USE_PRESENT_FOR_FT
float msDelta = 0.0;
+1 -1
View File
@@ -21,7 +21,7 @@
#define VER_MAJOR_VERSION 0
#define VER_MINOR_VERSION 7
#define VER_HOTFIX_VERSION 0
#define VER_BUILD_NUMBER 68
#define VER_BUILD_NUMBER 681
#define VER_PRE_RELEASE