Skip to content

Commit

Permalink
FidelityFX FSR v2.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
rys committed Jun 22, 2022
0 parents commit c8fc17d
Show file tree
Hide file tree
Showing 164 changed files with 50,572 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
bin/
/.vs/fidelityfx-fsr2/v16
/.vs
out/
65 changes: 65 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
variables:
SampleName: FSR2_Sample
CMakeConfig: -G "Visual Studio 16 2019" -A x64
GIT_SUBMODULE_STRATEGY: normal
FF_USE_FASTZIP: "true"

This comment has been minimized.

Copy link
@ijunxyz123

ijunxyz123 Aug 23, 2024

docs/media/super-resolution-temporal/overview.svg

This comment has been minimized.

Copy link
@ijunxyz123

ijunxyz123 Aug 23, 2024

docs/media/super-resolution-temporal/overview.svg

ARTIFACT_COMPRESSION_LEVEL: "fast"

stages:
- build
- deploy

build_dx12:
tags:
- windows
- amd64
stage: build
artifacts:
paths:
- bin/
script:
- 'cmake -A x64 -S . -B build/DX12 -DGFX_API=DX12'
- 'cmake --build build/DX12 --config Release --parallel 4 -- /p:CL_MPcount=16'

build_vk:
tags:
- windows
- amd64
stage: build
artifacts:
paths:
- bin/
script:
- 'cmake -A x64 -S . -B build/VK -DGFX_API=VK'
- 'cmake --build build/VK --config Release --parallel 4 -- /p:CL_MPcount=16'

package_sample:
tags:
- windows
- amd64
stage: deploy
dependencies:
- build_dx12
- build_vk
script:
- echo "Packaging build"
- echo cd .\bin\ > %SampleName%_DX12.bat
- echo start %SampleName%_DX12.exe >> %SampleName%_DX12.bat
- copy %VULKAN_SDK%\Bin\glslc.exe bin
- echo cd .\bin\ > %SampleName%_VK.bat
- echo start %SampleName%_VK.exe >> %SampleName%_VK.bat
artifacts:
name: "%SampleName%-%CI_COMMIT_TAG%-%CI_COMMIT_REF_NAME%-%CI_COMMIT_SHORT_SHA%"
paths:
- "bin/"
- "media/cauldron-media/AbandonedWarehouse/"
- "media/cauldron-media/Sponza-New/"
- "media/cauldron-media/envmaps/"
- "media/cauldron-media/noise/"
- "media/cauldron-media/color_ramp_bt2020_dcip3/"
- "media/cauldron-media/readme.md"
- "media/cauldron-media/screenshot.png"
- "README.md"
- "LICENSE.txt"
- "%SampleName%_DX12.bat"
- "%SampleName%_VK.bat"
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[submodule "media/cauldron-media"]
path = media/cauldron-media
url = ../../GPUOpen-LibrariesAndSDKs/Cauldron-Media.git
[submodule "libs/cauldron"]
path = libs/cauldron
url = ../../GPUOpen-LibrariesAndSDKs/Cauldron.git
90 changes: 90 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# This file is part of the FidelityFX SDK.
#
# Copyright (c) 2022 Advanced Micro Devices, Inc. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

cmake_minimum_required(VERSION 3.12.1)

option (GFX_API_DX12 "Build with DX12" ON)

if(NOT DEFINED GFX_API)
project (FSR2_Sample)
else()
project (FSR2_Sample_${GFX_API})

set_property(DIRECTORY ${CMAKE_PROJECT_DIR} PROPERTY VS_STARTUP_PROJECT ${PROJECT_NAME})

if(GFX_API STREQUAL DX12)
set(GFX_API_DX12 ON)
set(GFX_API_VK OFF)
elseif(GFX_API STREQUAL VK)
set(GFX_API_DX12 OFF)
set(GFX_API_VK ON)
else()
message(STATUS "----------------------------------------------------------------------------------------")
message(STATUS "")
message(STATUS "** Almost there!!")
message(STATUS "")
message(STATUS " This framework supports DX12 and VULKAN, you need to invoke cmake in one of these ways:")
message(STATUS "")
message(STATUS " Examples:")
message(STATUS " Generate selected one:")
message(STATUS " cmake <project_root_dir> -DGFX_API=DX12")
message(STATUS " cmake <project_root_dir> -DGFX_API=VK")
message(STATUS " Generate with switches (Default is ON):")
message(STATUS " cmake <project_root_dir> [-DGFX_API_DX12=ON|OFF] [-DGFX_API_VK=ON|OFF]")
message(STATUS "")
message(STATUS "----------------------------------------------------------------------------------------")
message(FATAL_ERROR "")
endif()
endif()

# Check MSVC toolset version, Visual Studio 2019 required
if(MSVC_TOOLSET_VERSION VERSION_LESS 142)
message(FATAL_ERROR "Cannot find MSVC toolset version 142 or greater. Please make sure Visual Studio 2019 or newer installed")
endif()

# ouput exe to bin directory
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_HOME_DIRECTORY}/bin)

foreach( OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES} )
string( TOUPPER ${OUTPUTCONFIG} OUTPUTCONFIG )
set( CMAKE_RUNTIME_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CMAKE_HOME_DIRECTORY}/bin )
endforeach( OUTPUTCONFIG CMAKE_CONFIGURATION_TYPES )

add_compile_options(/MP)
add_compile_definitions($<$<CONFIG:RelWithDebInfo>:USE_PIX>)

# override build options in ffx-fsr2-api cmake
option (FFX_FSR2_API_DX12 "Build FSR 2.0 DX12 backend" ${GFX_API_DX12})
option (FFX_FSR2_API_VK "Build FSR 2.0 Vulkan backend" ${GFX_API_VK})

# reference libs used by both backends
add_subdirectory(libs/cauldron)
add_subdirectory(src/Common)
add_subdirectory(src/ffx-fsr2-api)

if(GFX_API_VK)
find_package(Vulkan REQUIRED)
add_subdirectory(src/VK)
endif()
if(GFX_API_DX12)
add_subdirectory(src/DX12)
endif()

19 changes: 19 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) 2022 Advanced Micro Devices, Inc. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Loading

0 comments on commit c8fc17d

Please sign in to comment.