diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2023-01-28 01:28:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-28 01:28:35 +0100 |
commit | 6fa86989f10ef9f87701147e4b4b426f309edac4 (patch) | |
tree | e4b3c203e4a2349ec8f72e5f5d162eab2a1d9ecd /src/video_core/host_shaders/CMakeLists.txt | |
parent | Merge pull request #9666 from liamwhite/wait-for-me (diff) | |
parent | video_core/opengl: Add FSR upscaling filter to the OpenGL renderer (diff) | |
download | yuzu-6fa86989f10ef9f87701147e4b4b426f309edac4.tar yuzu-6fa86989f10ef9f87701147e4b4b426f309edac4.tar.gz yuzu-6fa86989f10ef9f87701147e4b4b426f309edac4.tar.bz2 yuzu-6fa86989f10ef9f87701147e4b4b426f309edac4.tar.lz yuzu-6fa86989f10ef9f87701147e4b4b426f309edac4.tar.xz yuzu-6fa86989f10ef9f87701147e4b4b426f309edac4.tar.zst yuzu-6fa86989f10ef9f87701147e4b4b426f309edac4.zip |
Diffstat (limited to 'src/video_core/host_shaders/CMakeLists.txt')
-rw-r--r-- | src/video_core/host_shaders/CMakeLists.txt | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/src/video_core/host_shaders/CMakeLists.txt b/src/video_core/host_shaders/CMakeLists.txt index e968ae220..dad7b07d4 100644 --- a/src/video_core/host_shaders/CMakeLists.txt +++ b/src/video_core/host_shaders/CMakeLists.txt @@ -3,12 +3,16 @@ set(FIDELITYFX_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/externals/FidelityFX-FSR/ffx-fsr) -set(GLSL_INCLUDES - fidelityfx_fsr.comp +set(FIDELITYFX_FILES ${FIDELITYFX_INCLUDE_DIR}/ffx_a.h ${FIDELITYFX_INCLUDE_DIR}/ffx_fsr1.h ) +set(GLSL_INCLUDES + fidelityfx_fsr.comp + ${FIDELITYFX_FILES} +) + set(SHADER_FILES astc_decoder.comp blit_color_float.frag @@ -24,6 +28,9 @@ set(SHADER_FILES fxaa.vert opengl_convert_s8d24.comp opengl_copy_bc4.comp + opengl_fidelityfx_fsr.frag + opengl_fidelityfx_fsr_easu.frag + opengl_fidelityfx_fsr_rcas.frag opengl_present.frag opengl_present.vert opengl_present_scaleforce.frag @@ -118,6 +125,25 @@ foreach(FILENAME IN ITEMS ${SHADER_FILES}) endif() endforeach() +foreach(FILEPATH IN ITEMS ${FIDELITYFX_FILES}) + get_filename_component(FILENAME ${FILEPATH} NAME) + string(REPLACE "." "_" HEADER_NAME ${FILENAME}) + set(SOURCE_FILE ${FILEPATH}) + set(SOURCE_HEADER_FILE ${SHADER_DIR}/${HEADER_NAME}.h) + add_custom_command( + OUTPUT + ${SOURCE_HEADER_FILE} + COMMAND + ${CMAKE_COMMAND} -P ${HEADER_GENERATOR} ${SOURCE_FILE} ${SOURCE_HEADER_FILE} ${INPUT_FILE} + MAIN_DEPENDENCY + ${SOURCE_FILE} + DEPENDS + ${INPUT_FILE} + # HEADER_GENERATOR should be included here but msbuild seems to assume it's always modified + ) + set(SHADER_HEADERS ${SHADER_HEADERS} ${SOURCE_HEADER_FILE}) +endforeach() + set(SHADER_SOURCES ${SHADER_FILES}) list(APPEND SHADER_SOURCES ${GLSL_INCLUDES}) |