diff --git a/.gitmodules b/.gitmodules index 2ac0b4a64..7747bee9d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,10 +1,12 @@ [submodule "extern/CommonLibSSE-NG"] path = extern/CommonLibSSE-NG url = https://github.com/alandtse/CommonLibVR.git - [submodule "extern/Streamline"] path = extern/Streamline url = https://github.com/FlayaN/Streamline.git [submodule "extern/FidelityFX-SDK"] path = extern/FidelityFX-SDK url = https://github.com/MapleHinata/FidelityFX-SDK.git +[submodule "extern/FidelityFX-SDK-DX12"] + path = extern/FidelityFX-SDK-DX12 + url = https://github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK diff --git a/CMakeLists.txt b/CMakeLists.txt index fa3bfcc4c..ddb8128a8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,7 +44,8 @@ find_package(unordered_dense CONFIG REQUIRED) find_package(efsw CONFIG REQUIRED) find_package(Tracy CONFIG REQUIRED) add_subdirectory(${CMAKE_SOURCE_DIR}/cmake/Streamline) -include(FidelityFX-SDK) +# include(FidelityFX-SDK) +include(FidelityFX-SDK-DX12) target_compile_definitions( ${PROJECT_NAME} diff --git a/CMakePresets.json b/CMakePresets.json index a2f5cf201..156a4efe0 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -35,7 +35,7 @@ "name": "msvc", "hidden": true, "cacheVariables": { - "CMAKE_CXX_FLAGS": "/EHsc /MP /W4 /WX $penv{CXXFLAGS}" + "CMAKE_CXX_FLAGS": "/EHsc /MP /W4 $penv{CXXFLAGS}" }, "generator": "Visual Studio 17 2022", "vendor": { diff --git a/cmake/FidelityFX-SDK-DX12.cmake b/cmake/FidelityFX-SDK-DX12.cmake new file mode 100644 index 000000000..0b474abb2 --- /dev/null +++ b/cmake/FidelityFX-SDK-DX12.cmake @@ -0,0 +1,20 @@ +set(FFX_API_VK OFF) +set(FFX_API_DX12 ON) +set(FFX_BRIXELIZER ON) +set(FFX_ALL OFF) +set(FFX_FSR3 ON) +set(FFX_FSR ON) +set(FFX_AUTO_COMPILE_SHADERS 1) + +add_subdirectory(${CMAKE_SOURCE_DIR}/extern/FidelityFX-SDK-DX12/sdk) + +target_link_libraries( + ${PROJECT_NAME} + PRIVATE + ffx_frameinterpolation_x64 + ffx_fsr3_x64 + ffx_fsr3upscaler_x64 + ffx_opticalflow_x64 + ffx_backend_dx12_x64 + ffx_brixelizer_x64 +) diff --git a/cmake/FidelityFX-SDK.cmake b/cmake/FidelityFX-SDK.cmake index 431c4284c..1101abbbc 100644 --- a/cmake/FidelityFX-SDK.cmake +++ b/cmake/FidelityFX-SDK.cmake @@ -1,5 +1,5 @@ set(FFX_API_VK OFF) -set(FFX_API_DX12 ON) +set(FFX_API_DX12 OFF) set(FFX_ALL OFF) set(FFX_FSR3 ON) set(FFX_FSR ON) diff --git a/extern/FidelityFX-SDK-DX12 b/extern/FidelityFX-SDK-DX12 new file mode 160000 index 000000000..54fbaafdc --- /dev/null +++ b/extern/FidelityFX-SDK-DX12 @@ -0,0 +1 @@ +Subproject commit 54fbaafdc34716811751bea5032700e78f5a0f33 diff --git a/src/FidelityFX.h b/src/FidelityFX.h index a82c2fcc8..89acf0e5a 100644 --- a/src/FidelityFX.h +++ b/src/FidelityFX.h @@ -1,8 +1,10 @@ #pragma once -#include +//#include #include +#include + #include #include