Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

Commit

Permalink
Properly submodule fidelityfx sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
Nukem9 committed Jan 16, 2024
1 parent 2894e77 commit 1ce05a9
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 18 deletions.
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions dependencies/FidelityFX-SDK
Submodule FidelityFX-SDK added at a0632a
Empty file.
19 changes: 17 additions & 2 deletions source/maindll/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
)

Expand Down Expand Up @@ -112,7 +115,8 @@ target_link_options(
${CURRENT_PROJECT}
PRIVATE
"/DELAYLOAD:gdi32.dll"
"/DELAYLOAD:dxgi.dll")
"/DELAYLOAD:dxgi.dll"
)

target_link_libraries(
${CURRENT_PROJECT}
Expand All @@ -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$<$<CONFIG:Debug>:d>.lib"
"${FIDELITYFX_SDK_DIR}/bin/ffx_sdk/ffx_backend_vk_x64$<$<CONFIG:Debug>:d>.lib"
"${FIDELITYFX_SDK_DIR}/bin/ffx_sdk/ffx_fsr3_x64$<$<CONFIG:Debug>:d>.lib"
"${FIDELITYFX_SDK_DIR}/bin/ffx_sdk/ffx_frameinterpolation_x64$<$<CONFIG:Debug>:d>.lib"
"${FIDELITYFX_SDK_DIR}/bin/ffx_sdk/ffx_opticalflow_x64$<$<CONFIG:Debug>:d>.lib"
)

#
# Commands
#
Expand Down
2 changes: 1 addition & 1 deletion source/maindll/FFDilator.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#pragma once

#include <FidelityFX/host/ffx_fsr3upscaler.h>
#include <FidelityFX/components/fsr3upscaler/ffx_fsr3upscaler_private.h>
#include <fsr3upscaler/ffx_fsr3upscaler_private.h>

struct FFDilatorDispatchParameters
{
Expand Down
14 changes: 0 additions & 14 deletions source/maindll/FFFrameInterpolator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion source/maindll/FFInterpolator.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <FidelityFX/host/ffx_frameinterpolation.h>
#include <FidelityFX/components/frameinterpolation/ffx_frameinterpolation_private.h>
#include <frameinterpolation/ffx_frameinterpolation_private.h>
#include "FFExt.h"
#include "FFInterpolator.h"

Expand Down

0 comments on commit 1ce05a9

Please sign in to comment.