From 4e27079352348af63062bee92fa88679dbfc9c79 Mon Sep 17 00:00:00 2001 From: cdozdil Date: Thu, 11 Jan 2024 15:44:24 +0300 Subject: [PATCH 1/2] added ffx-sdk as submodule --- .gitmodules | 4 ++++ CyberXeSS/CyberXeSS.vcxproj | 1 - external/ffx-sdk | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) create mode 160000 external/ffx-sdk diff --git a/.gitmodules b/.gitmodules index af2b53f4..4d89297f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -13,3 +13,7 @@ [submodule "external/spdlog"] path = external/spdlog url = https://github.com/gabime/spdlog.git +[submodule "external/ffx-sdk"] + path = external/ffx-sdk + url = https://github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK.git + branch = release-FSR3-3.0.3 diff --git a/CyberXeSS/CyberXeSS.vcxproj b/CyberXeSS/CyberXeSS.vcxproj index dcb0ecfa..1b01b3ed 100644 --- a/CyberXeSS/CyberXeSS.vcxproj +++ b/CyberXeSS/CyberXeSS.vcxproj @@ -82,7 +82,6 @@ $(SolutionDir)external\simpleini;$(SolutionDir)external\nvngx_dlss_sdk;$(SolutionDir)external\unordered_dense\include;$(SolutionDir)external\xess\inc\xess;$(SolutionDir)external\vulkan\include;$(SolutionDir)external\ffx-sdk\sdk\include;$(SolutionDir)external\spdlog\include;C:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29\Include;$(IncludePath) $(SolutionDir)external\xess\lib;C:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29\Lib\x64;$(LibraryPath) nvngx - E:\Games\God of War $(SolutionDir)external\simpleini;$(SolutionDir)external\nvngx_dlss_sdk;$(SolutionDir)external\unordered_dense\include;$(SolutionDir)external\xess\inc\xess;$(SolutionDir)external\vulkan\include;$(SolutionDir)external\ffx-sdk\sdk\include;$(SolutionDir)external\spdlog\include;C:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29\Include;$(IncludePath) diff --git a/external/ffx-sdk b/external/ffx-sdk new file mode 160000 index 00000000..a0632abf --- /dev/null +++ b/external/ffx-sdk @@ -0,0 +1 @@ +Subproject commit a0632abf1350bb64c098573d84c42f053f053a6e From e7ef8875effe0d392791d0d62811e4c6da7907dc Mon Sep 17 00:00:00 2001 From: cdozdil Date: Sun, 14 Jan 2024 16:41:03 +0300 Subject: [PATCH 2/2] amd rainbox color fix --- CyberXeSS/Config.cpp | 1 + CyberXeSS/Config.h | 1 + CyberXeSS/CyberXess.h | 11 +++++++++++ nvngx.ini | 3 +++ 4 files changed, 16 insertions(+) diff --git a/CyberXeSS/Config.cpp b/CyberXeSS/Config.cpp index 52c2ecff..d5092425 100644 --- a/CyberXeSS/Config.cpp +++ b/CyberXeSS/Config.cpp @@ -82,6 +82,7 @@ void Config::Reload() } DisableReactiveMask = readBool("Hotfix", "DisableReactiveMask"); + ColorResourceBarrier = readBool("Hotfix", "ColorResourceBarrier"); } } diff --git a/CyberXeSS/Config.h b/CyberXeSS/Config.h index a40ca9ff..77590759 100644 --- a/CyberXeSS/Config.h +++ b/CyberXeSS/Config.h @@ -48,6 +48,7 @@ public: //Hotfix for Steam Deck std::optional DisableReactiveMask; + std::optional ColorResourceBarrier; void Reload(); diff --git a/CyberXeSS/CyberXess.h b/CyberXeSS/CyberXess.h index eb33f8b7..803edd3c 100644 --- a/CyberXeSS/CyberXess.h +++ b/CyberXeSS/CyberXess.h @@ -734,6 +734,17 @@ public: { LOG("FeatureContext::XeSSExecuteDx12 Color exist..", spdlog::level::debug); params.pColorTexture = (ID3D12Resource*)initParams->Color; + + if (instance->MyConfig->ColorResourceBarrier.value_or(false)) + { + D3D12_RESOURCE_BARRIER barrier = {}; + barrier.Type = D3D12_RESOURCE_BARRIER_TYPE_TRANSITION; + barrier.Transition.pResource = params.pColorTexture; + barrier.Transition.StateBefore = D3D12_RESOURCE_STATE_COMMON; + barrier.Transition.StateBefore = D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE; + barrier.Transition.Subresource = 0; + commandList->ResourceBarrier(1, &barrier); + } } else { diff --git a/nvngx.ini b/nvngx.ini index 47bd496f..ca7597c5 100644 --- a/nvngx.ini +++ b/nvngx.ini @@ -106,3 +106,6 @@ QualityRatioUltraPerformance=auto ; You can enable and test if it fix or break something ; Default false DisableReactiveMask=auto +; Resource barrier fix for rainbow colors on AMD cards +; Default false +ColorResourceBarrier=auto \ No newline at end of file