diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..2d8fa5d --- /dev/null +++ b/.gitmodules @@ -0,0 +1,4 @@ +[submodule "dependencies/FidelityFX-SDK"] + path = dependencies/FidelityFX-SDK + url = https://github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK.git + branch = release-FSR3-3.0.3 diff --git a/dependencies/FidelityFX-SDK b/dependencies/FidelityFX-SDK new file mode 160000 index 0000000..a0632ab --- /dev/null +++ b/dependencies/FidelityFX-SDK @@ -0,0 +1 @@ +Subproject commit a0632abf1350bb64c098573d84c42f053f053a6e diff --git a/dependencies/ffx-sdk/placeholder.txt b/dependencies/ffx-sdk/placeholder.txt deleted file mode 100644 index e69de29..0000000 diff --git a/source/maindll/CMakeLists.txt b/source/maindll/CMakeLists.txt index 95c0288..563aa9a 100644 --- a/source/maindll/CMakeLists.txt +++ b/source/maindll/CMakeLists.txt @@ -2,7 +2,9 @@ # Set up the source files and output library # set(CURRENT_PROJECT dlssg_output_dll) + set(SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}") +set(FIDELITYFX_SDK_DIR "${PROJECT_DEPENDENCIES_PATH}/FidelityFX-SDK/sdk") file( GLOB HEADER_FILES @@ -44,7 +46,8 @@ target_include_directories( ${CURRENT_PROJECT} PRIVATE "${SOURCE_DIR}" - "${PROJECT_DEPENDENCIES_PATH}/ffx-sdk" + "${FIDELITYFX_SDK_DIR}/include" + "${FIDELITYFX_SDK_DIR}/src/components" "$ENV{VULKAN_SDK}/include" ) @@ -112,7 +115,8 @@ target_link_options( ${CURRENT_PROJECT} PRIVATE "/DELAYLOAD:gdi32.dll" - "/DELAYLOAD:dxgi.dll") + "/DELAYLOAD:dxgi.dll" +) target_link_libraries( ${CURRENT_PROJECT} @@ -130,6 +134,17 @@ find_package(Vulkan REQUIRED) target_link_options(${CURRENT_PROJECT} PRIVATE "/DELAYLOAD:vulkan-1.dll") target_link_libraries(${CURRENT_PROJECT} PRIVATE Vulkan::Vulkan) +# FidelityFX +target_link_libraries( + ${CURRENT_PROJECT} + PRIVATE + "${FIDELITYFX_SDK_DIR}/bin/ffx_sdk/ffx_backend_dx12_x64$<$:d>.lib" + "${FIDELITYFX_SDK_DIR}/bin/ffx_sdk/ffx_backend_vk_x64$<$:d>.lib" + "${FIDELITYFX_SDK_DIR}/bin/ffx_sdk/ffx_fsr3_x64$<$:d>.lib" + "${FIDELITYFX_SDK_DIR}/bin/ffx_sdk/ffx_frameinterpolation_x64$<$:d>.lib" + "${FIDELITYFX_SDK_DIR}/bin/ffx_sdk/ffx_opticalflow_x64$<$:d>.lib" +) + # # Commands # diff --git a/source/maindll/FFDilator.h b/source/maindll/FFDilator.h index 65cfa00..df79545 100644 --- a/source/maindll/FFDilator.h +++ b/source/maindll/FFDilator.h @@ -9,7 +9,7 @@ #pragma once #include -#include +#include struct FFDilatorDispatchParameters { diff --git a/source/maindll/FFFrameInterpolator.cpp b/source/maindll/FFFrameInterpolator.cpp index 9b6e918..890fd54 100644 --- a/source/maindll/FFFrameInterpolator.cpp +++ b/source/maindll/FFFrameInterpolator.cpp @@ -6,20 +6,6 @@ #include "FFFrameInterpolator.h" #include "Util.h" -#ifdef _DEBUG -#pragma comment(lib, "../../dependencies/ffx-sdk/ffx_fsr3_x64d.lib") -#pragma comment(lib, "../../dependencies/ffx-sdk/ffx_backend_dx12_x64d.lib") -#pragma comment(lib, "../../dependencies/ffx-sdk/ffx_backend_vk_x64d.lib") -#pragma comment(lib, "../../dependencies/ffx-sdk/ffx_frameinterpolation_x64d.lib") -#pragma comment(lib, "../../dependencies/ffx-sdk/ffx_opticalflow_x64d.lib") -#else -#pragma comment(lib, "../../dependencies/ffx-sdk/ffx_fsr3_x64.lib") -#pragma comment(lib, "../../dependencies/ffx-sdk/ffx_backend_dx12_x64.lib") -#pragma comment(lib, "../../dependencies/ffx-sdk/ffx_backend_vk_x64.lib") -#pragma comment(lib, "../../dependencies/ffx-sdk/ffx_frameinterpolation_x64.lib") -#pragma comment(lib, "../../dependencies/ffx-sdk/ffx_opticalflow_x64.lib") -#endif - D3D12_RESOURCE_STATES ffxGetDX12StateFromResourceState(FfxResourceStates state); VkAccessFlags getVKAccessFlagsFromResourceState(FfxResourceStates state); VkImageLayout getVKImageLayoutFromResourceState(FfxResourceStates state); diff --git a/source/maindll/FFInterpolator.cpp b/source/maindll/FFInterpolator.cpp index e94d0b2..4e594e8 100644 --- a/source/maindll/FFInterpolator.cpp +++ b/source/maindll/FFInterpolator.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include "FFExt.h" #include "FFInterpolator.h"