Add AMD FSR3 framegen interface probe and CI validation

This commit is contained in:
Kelsi 2026-03-08 22:47:46 -07:00
parent 7d89aabae5
commit a49decd9a6
10 changed files with 232 additions and 5 deletions

View file

@ -6,6 +6,12 @@ on:
pull_request: pull_request:
branches: [master] branches: [master]
env:
WOWEE_AMD_FSR2_REPO: https://github.com/GPUOpen-Effects/FidelityFX-FSR2.git
WOWEE_AMD_FSR2_REF: master
WOWEE_FFX_SDK_REPO: https://github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK.git
WOWEE_FFX_SDK_REF: v1.1.4
jobs: jobs:
build: build:
name: Build (${{ matrix.arch }}) name: Build (${{ matrix.arch }})
@ -60,7 +66,9 @@ jobs:
- name: Fetch AMD FSR2 SDK - name: Fetch AMD FSR2 SDK
run: | run: |
rm -rf extern/FidelityFX-FSR2 rm -rf extern/FidelityFX-FSR2
git clone --depth 1 https://github.com/GPUOpen-Effects/FidelityFX-FSR2.git extern/FidelityFX-FSR2 git clone --depth 1 --branch "${WOWEE_AMD_FSR2_REF}" "${WOWEE_AMD_FSR2_REPO}" extern/FidelityFX-FSR2
rm -rf extern/FidelityFX-SDK
git clone --depth 1 --branch "${WOWEE_FFX_SDK_REF}" "${WOWEE_FFX_SDK_REPO}" extern/FidelityFX-SDK
- name: Check AMD FSR2 Vulkan permutation headers - name: Check AMD FSR2 Vulkan permutation headers
run: | run: |
@ -74,12 +82,26 @@ jobs:
echo "WoWee CMake will bootstrap vendored headers." echo "WoWee CMake will bootstrap vendored headers."
fi fi
- name: Check FidelityFX-SDK Vulkan framegen files
run: |
set -euo pipefail
SDK_DIR="$PWD/extern/FidelityFX-SDK/sdk"
test -f "$SDK_DIR/include/FidelityFX/host/ffx_frameinterpolation.h"
test -f "$SDK_DIR/include/FidelityFX/gpu/frameinterpolation/ffx_frameinterpolation_callbacks_glsl.h"
test -f "$SDK_DIR/include/FidelityFX/gpu/opticalflow/ffx_opticalflow_callbacks_glsl.h"
test -f "$SDK_DIR/src/backends/vk/CMakeShadersFrameinterpolation.txt"
test -f "$SDK_DIR/src/backends/vk/CMakeShadersOpticalflow.txt"
echo "FidelityFX-SDK Vulkan framegen files detected."
- name: Configure (AMD ON) - name: Configure (AMD ON)
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DWOWEE_ENABLE_AMD_FSR2=ON run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DWOWEE_ENABLE_AMD_FSR2=ON
- name: Assert AMD FSR2 target - name: Assert AMD FSR2 target
run: cmake --build build --target wowee_fsr2_amd_vk --parallel $(nproc) run: cmake --build build --target wowee_fsr2_amd_vk --parallel $(nproc)
- name: Assert AMD FSR3 framegen probe target
run: cmake --build build --target wowee_fsr3_framegen_amd_vk_probe --parallel $(nproc)
- name: Build - name: Build
run: cmake --build build --parallel $(nproc) run: cmake --build build --parallel $(nproc)
@ -119,7 +141,9 @@ jobs:
- name: Fetch AMD FSR2 SDK - name: Fetch AMD FSR2 SDK
run: | run: |
rm -rf extern/FidelityFX-FSR2 rm -rf extern/FidelityFX-FSR2
git clone --depth 1 https://github.com/GPUOpen-Effects/FidelityFX-FSR2.git extern/FidelityFX-FSR2 git clone --depth 1 --branch "${WOWEE_AMD_FSR2_REF}" "${WOWEE_AMD_FSR2_REPO}" extern/FidelityFX-FSR2
rm -rf extern/FidelityFX-SDK
git clone --depth 1 --branch "${WOWEE_FFX_SDK_REF}" "${WOWEE_FFX_SDK_REPO}" extern/FidelityFX-SDK
- name: Configure - name: Configure
run: | run: |
@ -134,6 +158,9 @@ jobs:
- name: Assert AMD FSR2 target - name: Assert AMD FSR2 target
run: cmake --build build --target wowee_fsr2_amd_vk --parallel $(sysctl -n hw.logicalcpu) run: cmake --build build --target wowee_fsr2_amd_vk --parallel $(sysctl -n hw.logicalcpu)
- name: Assert AMD FSR3 framegen probe target
run: cmake --build build --target wowee_fsr3_framegen_amd_vk_probe --parallel $(sysctl -n hw.logicalcpu)
- name: Build - name: Build
run: cmake --build build --parallel $(sysctl -n hw.logicalcpu) run: cmake --build build --parallel $(sysctl -n hw.logicalcpu)
@ -239,7 +266,9 @@ jobs:
shell: msys2 {0} shell: msys2 {0}
run: | run: |
rm -rf extern/FidelityFX-FSR2 rm -rf extern/FidelityFX-FSR2
git clone --depth 1 https://github.com/GPUOpen-Effects/FidelityFX-FSR2.git extern/FidelityFX-FSR2 git clone --depth 1 --branch "${WOWEE_AMD_FSR2_REF}" "${WOWEE_AMD_FSR2_REPO}" extern/FidelityFX-FSR2
rm -rf extern/FidelityFX-SDK
git clone --depth 1 --branch "${WOWEE_FFX_SDK_REF}" "${WOWEE_FFX_SDK_REPO}" extern/FidelityFX-SDK
- name: Configure - name: Configure
shell: msys2 {0} shell: msys2 {0}
@ -249,6 +278,10 @@ jobs:
shell: msys2 {0} shell: msys2 {0}
run: cmake --build build --target wowee_fsr2_amd_vk --parallel $(nproc) run: cmake --build build --target wowee_fsr2_amd_vk --parallel $(nproc)
- name: Assert AMD FSR3 framegen probe target
shell: msys2 {0}
run: cmake --build build --target wowee_fsr3_framegen_amd_vk_probe --parallel $(nproc)
- name: Build - name: Build
shell: msys2 {0} shell: msys2 {0}
run: cmake --build build --parallel $(nproc) run: cmake --build build --parallel $(nproc)
@ -319,7 +352,9 @@ jobs:
shell: msys2 {0} shell: msys2 {0}
run: | run: |
rm -rf extern/FidelityFX-FSR2 rm -rf extern/FidelityFX-FSR2
git clone --depth 1 https://github.com/GPUOpen-Effects/FidelityFX-FSR2.git extern/FidelityFX-FSR2 git clone --depth 1 --branch "${WOWEE_AMD_FSR2_REF}" "${WOWEE_AMD_FSR2_REPO}" extern/FidelityFX-FSR2
rm -rf extern/FidelityFX-SDK
git clone --depth 1 --branch "${WOWEE_FFX_SDK_REF}" "${WOWEE_FFX_SDK_REPO}" extern/FidelityFX-SDK
- name: Configure - name: Configure
shell: msys2 {0} shell: msys2 {0}
@ -329,6 +364,10 @@ jobs:
shell: msys2 {0} shell: msys2 {0}
run: cmake --build build --target wowee_fsr2_amd_vk --parallel $(nproc) run: cmake --build build --target wowee_fsr2_amd_vk --parallel $(nproc)
- name: Assert AMD FSR3 framegen probe target
shell: msys2 {0}
run: cmake --build build --target wowee_fsr3_framegen_amd_vk_probe --parallel $(nproc)
- name: Build - name: Build
shell: msys2 {0} shell: msys2 {0}
run: cmake --build build --parallel $(nproc) run: cmake --build build --parallel $(nproc)

View file

@ -23,6 +23,7 @@ option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
option(WOWEE_BUILD_TESTS "Build tests" OFF) option(WOWEE_BUILD_TESTS "Build tests" OFF)
option(WOWEE_ENABLE_ASAN "Enable AddressSanitizer (Debug builds)" OFF) option(WOWEE_ENABLE_ASAN "Enable AddressSanitizer (Debug builds)" OFF)
option(WOWEE_ENABLE_AMD_FSR2 "Enable AMD FidelityFX FSR2 backend when SDK is present" ON) option(WOWEE_ENABLE_AMD_FSR2 "Enable AMD FidelityFX FSR2 backend when SDK is present" ON)
option(WOWEE_ENABLE_AMD_FSR3_FRAMEGEN "Enable AMD FidelityFX SDK FSR3 frame generation interface probe when SDK is present" ON)
# AMD FidelityFX FSR2 SDK detection (drop-in under extern/FidelityFX-FSR2) # AMD FidelityFX FSR2 SDK detection (drop-in under extern/FidelityFX-FSR2)
set(WOWEE_AMD_FSR2_DIR ${CMAKE_SOURCE_DIR}/extern/FidelityFX-FSR2) set(WOWEE_AMD_FSR2_DIR ${CMAKE_SOURCE_DIR}/extern/FidelityFX-FSR2)
@ -87,6 +88,38 @@ else()
endif() endif()
endif() endif()
# AMD FidelityFX SDK (FSR3 frame generation interfaces) detection under extern/FidelityFX-SDK
set(WOWEE_AMD_FFX_SDK_DIR ${CMAKE_SOURCE_DIR}/extern/FidelityFX-SDK/sdk)
set(WOWEE_AMD_FFX_SDK_FI_HEADER ${WOWEE_AMD_FFX_SDK_DIR}/include/FidelityFX/host/ffx_frameinterpolation.h)
set(WOWEE_AMD_FFX_SDK_OF_HEADER ${WOWEE_AMD_FFX_SDK_DIR}/include/FidelityFX/host/ffx_opticalflow.h)
set(WOWEE_AMD_FFX_SDK_FSR3_HEADER ${WOWEE_AMD_FFX_SDK_DIR}/include/FidelityFX/host/ffx_fsr3upscaler.h)
set(WOWEE_AMD_FFX_SDK_VK_HEADER ${WOWEE_AMD_FFX_SDK_DIR}/include/FidelityFX/host/backends/vk/ffx_vk.h)
if(WOWEE_ENABLE_AMD_FSR3_FRAMEGEN
AND EXISTS ${WOWEE_AMD_FFX_SDK_FI_HEADER}
AND EXISTS ${WOWEE_AMD_FFX_SDK_OF_HEADER}
AND EXISTS ${WOWEE_AMD_FFX_SDK_FSR3_HEADER}
AND EXISTS ${WOWEE_AMD_FFX_SDK_VK_HEADER})
message(STATUS "AMD FidelityFX-SDK framegen headers detected at ${WOWEE_AMD_FFX_SDK_DIR}")
add_compile_definitions(WOWEE_HAS_AMD_FSR3_FRAMEGEN=1)
add_library(wowee_fsr3_framegen_amd_vk_probe STATIC
src/rendering/amd_fsr3_framegen_probe.cpp
)
set_target_properties(wowee_fsr3_framegen_amd_vk_probe PROPERTIES
CXX_STANDARD 17
CXX_STANDARD_REQUIRED ON
)
target_include_directories(wowee_fsr3_framegen_amd_vk_probe PUBLIC
${WOWEE_AMD_FFX_SDK_DIR}/include
)
target_link_libraries(wowee_fsr3_framegen_amd_vk_probe PUBLIC Vulkan::Vulkan)
else()
add_compile_definitions(WOWEE_HAS_AMD_FSR3_FRAMEGEN=0)
if(WOWEE_ENABLE_AMD_FSR3_FRAMEGEN)
message(WARNING "AMD FidelityFX-SDK framegen headers not found at ${WOWEE_AMD_FFX_SDK_DIR}; FSR3 framegen interface probe disabled.")
endif()
endif()
# Opcode registry generation/validation # Opcode registry generation/validation
find_package(Python3 COMPONENTS Interpreter QUIET) find_package(Python3 COMPONENTS Interpreter QUIET)
if(Python3_Interpreter_FOUND) if(Python3_Interpreter_FOUND)
@ -604,6 +637,9 @@ endif()
if(TARGET wowee_fsr2_amd_vk) if(TARGET wowee_fsr2_amd_vk)
target_link_libraries(wowee PRIVATE wowee_fsr2_amd_vk) target_link_libraries(wowee PRIVATE wowee_fsr2_amd_vk)
endif() endif()
if(TARGET wowee_fsr3_framegen_amd_vk_probe)
target_link_libraries(wowee PRIVATE wowee_fsr3_framegen_amd_vk_probe)
endif()
# Link Unicorn if available # Link Unicorn if available
if(HAVE_UNICORN) if(HAVE_UNICORN)

View file

@ -174,12 +174,28 @@ make -j$(nproc)
- `extern/FidelityFX-FSR2` - `extern/FidelityFX-FSR2`
- Source URL: - Source URL:
- `https://github.com/GPUOpen-Effects/FidelityFX-FSR2.git` - `https://github.com/GPUOpen-Effects/FidelityFX-FSR2.git`
- Ref:
- `master` (depth-1 clone)
- The renderer enables the AMD backend only when both are present: - The renderer enables the AMD backend only when both are present:
- `extern/FidelityFX-FSR2/src/ffx-fsr2-api/ffx_fsr2.h` - `extern/FidelityFX-FSR2/src/ffx-fsr2-api/ffx_fsr2.h`
- `extern/FidelityFX-FSR2/src/ffx-fsr2-api/vk/shaders/ffx_fsr2_accumulate_pass_permutations.h` - `extern/FidelityFX-FSR2/src/ffx-fsr2-api/vk/shaders/ffx_fsr2_accumulate_pass_permutations.h`
- If the SDK checkout is missing generated Vulkan permutation headers, CMake auto-bootstraps them from `third_party/fsr2_vk_permutations`. - If the SDK checkout is missing generated Vulkan permutation headers, CMake auto-bootstraps them from `third_party/fsr2_vk_permutations`.
- If SDK files are missing entirely, CMake falls back to the internal non-AMD FSR2 path automatically. - If SDK files are missing entirely, CMake falls back to the internal non-AMD FSR2 path automatically.
### FidelityFX SDK (Framegen Extern)
- Build scripts and CI also fetch:
- `extern/FidelityFX-SDK`
- Source URL:
- `https://github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK.git`
- Ref:
- `v1.1.4` (depth-1 clone)
- This ref includes Vulkan framegen building blocks (`frameinterpolation` + `opticalflow`) and Vulkan shader manifests:
- `sdk/src/backends/vk/CMakeShadersFrameinterpolation.txt`
- `sdk/src/backends/vk/CMakeShadersOpticalflow.txt`
- CMake option:
- `WOWEE_ENABLE_AMD_FSR3_FRAMEGEN=ON` enables a compile-probe target (`wowee_fsr3_framegen_amd_vk_probe`) that validates SDK FI/OF/FSR3/Vulkan interface headers at build time.
### Current FSR Defaults ### Current FSR Defaults
- Upscaling quality default: `Native (100%)` - Upscaling quality default: `Native (100%)`
@ -249,7 +265,10 @@ make -j$(nproc)
- GitHub Actions builds on every push: Linux (x86-64, ARM64), Windows (x86-64, ARM64 via MSYS2), macOS (ARM64) - GitHub Actions builds on every push: Linux (x86-64, ARM64), Windows (x86-64, ARM64 via MSYS2), macOS (ARM64)
- All build jobs are AMD-FSR2-only (`WOWEE_ENABLE_AMD_FSR2=ON`) and explicitly build `wowee_fsr2_amd_vk` - All build jobs are AMD-FSR2-only (`WOWEE_ENABLE_AMD_FSR2=ON`) and explicitly build `wowee_fsr2_amd_vk`
- Each job clones AMD's FSR2 SDK; if generated Vulkan permutation headers are absent upstream, WoWee bootstraps them from `third_party/fsr2_vk_permutations` - Each job clones AMD's FSR2 SDK and FidelityFX-SDK (`v1.1.4`)
- Linux CI asserts FidelityFX-SDK Vulkan framegen files are present (FI/OF GLSL callbacks + Vulkan shader manifests)
- All CI platform jobs explicitly build `wowee_fsr3_framegen_amd_vk_probe`
- If FSR2 generated Vulkan permutation headers are absent upstream, WoWee bootstraps them from `third_party/fsr2_vk_permutations`
- Container build via `container/build-in-container.sh` (Podman) - Container build via `container/build-in-container.sh` (Podman)
## Security ## Security

View file

@ -30,8 +30,28 @@ function Ensure-Fsr2Sdk {
} }
} }
function Ensure-FidelityFxSdk {
$sdkDir = Join-Path $ScriptDir "extern\FidelityFX-SDK"
$sdkHeader = Join-Path $sdkDir "sdk\include\FidelityFX\host\ffx_frameinterpolation.h"
$sdkRef = "v1.1.4"
if (Test-Path $sdkHeader) { return }
if (-not (Get-Command git -ErrorAction SilentlyContinue)) {
Write-Warning "git not found; cannot auto-fetch AMD FidelityFX SDK."
return
}
Write-Host "Fetching AMD FidelityFX SDK ($sdkRef) into $sdkDir ..."
New-Item -ItemType Directory -Path (Join-Path $ScriptDir "extern") -Force | Out-Null
& git clone --depth 1 --branch $sdkRef https://github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK.git $sdkDir
if ($LASTEXITCODE -ne 0) {
Write-Warning "Failed to clone AMD FidelityFX SDK. FSR3 framegen extern will be unavailable."
}
}
Write-Host "Building wowee..." Write-Host "Building wowee..."
Ensure-Fsr2Sdk Ensure-Fsr2Sdk
Ensure-FidelityFxSdk
# Create build directory if it doesn't exist # Create build directory if it doesn't exist
if (-not (Test-Path "build")) { if (-not (Test-Path "build")) {

View file

@ -22,8 +22,27 @@ ensure_fsr2_sdk() {
} }
} }
ensure_fidelityfx_sdk() {
local sdk_dir="extern/FidelityFX-SDK"
local sdk_header="$sdk_dir/sdk/include/FidelityFX/host/ffx_frameinterpolation.h"
local sdk_ref="v1.1.4"
if [ -f "$sdk_header" ]; then
return
fi
if ! command -v git >/dev/null 2>&1; then
echo "Warning: git not found; cannot auto-fetch AMD FidelityFX SDK."
return
fi
echo "Fetching AMD FidelityFX SDK ($sdk_ref) into $sdk_dir ..."
mkdir -p extern
git clone --depth 1 --branch "$sdk_ref" https://github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK.git "$sdk_dir" || {
echo "Warning: failed to clone AMD FidelityFX SDK. FSR3 framegen extern will be unavailable."
}
}
echo "Building wowee..." echo "Building wowee..."
ensure_fsr2_sdk ensure_fsr2_sdk
ensure_fidelityfx_sdk
# Create build directory if it doesn't exist # Create build directory if it doesn't exist
mkdir -p build mkdir -p build

View file

@ -11,6 +11,10 @@ AMD SDK checkout path:
`extern/FidelityFX-FSR2` `extern/FidelityFX-FSR2`
FidelityFX SDK checkout path (framegen extern):
`extern/FidelityFX-SDK` (pinned to `v1.1.4` in build scripts and CI)
Detection expects: Detection expects:
- `extern/FidelityFX-FSR2/src/ffx-fsr2-api/ffx_fsr2.h` - `extern/FidelityFX-FSR2/src/ffx-fsr2-api/ffx_fsr2.h`
@ -21,15 +25,20 @@ Detection expects:
## Build Flags ## Build Flags
- `WOWEE_ENABLE_AMD_FSR2=ON` (default): attempt AMD backend integration. - `WOWEE_ENABLE_AMD_FSR2=ON` (default): attempt AMD backend integration.
- `WOWEE_ENABLE_AMD_FSR3_FRAMEGEN=ON` (default): build AMD FSR3 framegen interface probe when FidelityFX-SDK headers are present.
- `WOWEE_HAS_AMD_FSR2` compile define: - `WOWEE_HAS_AMD_FSR2` compile define:
- `1` when AMD SDK prerequisites are present. - `1` when AMD SDK prerequisites are present.
- `0` when missing, in which case internal fallback remains active. - `0` when missing, in which case internal fallback remains active.
- `WOWEE_HAS_AMD_FSR3_FRAMEGEN` compile define:
- `1` when FidelityFX-SDK FI/OF/FSR3+VK headers are detected.
- `0` when headers are missing (probe target disabled).
## Current Status ## Current Status
- AMD FSR2 Vulkan dispatch path is integrated and used when available. - AMD FSR2 Vulkan dispatch path is integrated and used when available.
- UI displays active backend in settings (`AMD FidelityFX SDK` or `Internal fallback`). - UI displays active backend in settings (`AMD FidelityFX SDK` or `Internal fallback`).
- Runtime settings include persisted FSR2 jitter tuning. - Runtime settings include persisted FSR2 jitter tuning.
- FidelityFX-SDK `v1.1.4` extern is fetched across platforms and validated in Linux CI for Vulkan framegen source presence.
- Startup safety behavior remains enabled: - Startup safety behavior remains enabled:
- persisted FSR2 is deferred until `IN_WORLD` - persisted FSR2 is deferred until `IN_WORLD`
- startup falls back unless `WOWEE_ALLOW_STARTUP_FSR2=1` - startup falls back unless `WOWEE_ALLOW_STARTUP_FSR2=1`
@ -45,6 +54,16 @@ Detection expects:
## CI Notes ## CI Notes
- `build-linux-amd-fsr2` clones AMD's repository and configures with `WOWEE_ENABLE_AMD_FSR2=ON`. - `build-linux-amd-fsr2` clones AMD's repository and configures with `WOWEE_ENABLE_AMD_FSR2=ON`.
- All build jobs clone:
- `GPUOpen-Effects/FidelityFX-FSR2` (`master`)
- `GPUOpen-LibrariesAndSDKs/FidelityFX-SDK` (`v1.1.4`)
- Linux CI additionally checks FidelityFX-SDK Vulkan framegen files:
- `ffx_frameinterpolation_callbacks_glsl.h`
- `ffx_opticalflow_callbacks_glsl.h`
- `CMakeShadersFrameinterpolation.txt`
- `CMakeShadersOpticalflow.txt`
- All CI platform jobs build:
- `wowee_fsr3_framegen_amd_vk_probe`
- Some upstream SDK checkouts do not include generated Vulkan permutation headers. - Some upstream SDK checkouts do not include generated Vulkan permutation headers.
- WoWee bootstraps those headers from the vendored snapshot so AMD backend builds remain cross-platform and deterministic. - WoWee bootstraps those headers from the vendored snapshot so AMD backend builds remain cross-platform and deterministic.
- If SDK headers are missing entirely, WoWee still falls back to the internal backend. - If SDK headers are missing entirely, WoWee still falls back to the internal backend.

View file

@ -283,6 +283,11 @@ public:
#else #else
bool isAmdFsr2SdkAvailable() const { return false; } bool isAmdFsr2SdkAvailable() const { return false; }
#endif #endif
#if WOWEE_HAS_AMD_FSR3_FRAMEGEN
bool isAmdFsr3FramegenSdkAvailable() const { return true; }
#else
bool isAmdFsr3FramegenSdkAvailable() const { return false; }
#endif
void setWaterRefractionEnabled(bool enabled); void setWaterRefractionEnabled(bool enabled);
bool isWaterRefractionEnabled() const; bool isWaterRefractionEnabled() const;

View file

@ -30,8 +30,28 @@ function Ensure-Fsr2Sdk {
} }
} }
function Ensure-FidelityFxSdk {
$sdkDir = Join-Path $ScriptDir "extern\FidelityFX-SDK"
$sdkHeader = Join-Path $sdkDir "sdk\include\FidelityFX\host\ffx_frameinterpolation.h"
$sdkRef = "v1.1.4"
if (Test-Path $sdkHeader) { return }
if (-not (Get-Command git -ErrorAction SilentlyContinue)) {
Write-Warning "git not found; cannot auto-fetch AMD FidelityFX SDK."
return
}
Write-Host "Fetching AMD FidelityFX SDK ($sdkRef) into $sdkDir ..."
New-Item -ItemType Directory -Path (Join-Path $ScriptDir "extern") -Force | Out-Null
& git clone --depth 1 --branch $sdkRef https://github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK.git $sdkDir
if ($LASTEXITCODE -ne 0) {
Write-Warning "Failed to clone AMD FidelityFX SDK. FSR3 framegen extern will be unavailable."
}
}
Write-Host "Clean rebuilding wowee..." Write-Host "Clean rebuilding wowee..."
Ensure-Fsr2Sdk Ensure-Fsr2Sdk
Ensure-FidelityFxSdk
# Remove build directory completely # Remove build directory completely
if (Test-Path "build") { if (Test-Path "build") {

View file

@ -22,8 +22,27 @@ ensure_fsr2_sdk() {
} }
} }
ensure_fidelityfx_sdk() {
local sdk_dir="extern/FidelityFX-SDK"
local sdk_header="$sdk_dir/sdk/include/FidelityFX/host/ffx_frameinterpolation.h"
local sdk_ref="v1.1.4"
if [ -f "$sdk_header" ]; then
return
fi
if ! command -v git >/dev/null 2>&1; then
echo "Warning: git not found; cannot auto-fetch AMD FidelityFX SDK."
return
fi
echo "Fetching AMD FidelityFX SDK ($sdk_ref) into $sdk_dir ..."
mkdir -p extern
git clone --depth 1 --branch "$sdk_ref" https://github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK.git "$sdk_dir" || {
echo "Warning: failed to clone AMD FidelityFX SDK. FSR3 framegen extern will be unavailable."
}
}
echo "Clean rebuilding wowee..." echo "Clean rebuilding wowee..."
ensure_fsr2_sdk ensure_fsr2_sdk
ensure_fidelityfx_sdk
# Remove build directory completely # Remove build directory completely
if [ -d "build" ]; then if [ -d "build" ]; then

View file

@ -0,0 +1,31 @@
#include <cstddef>
#include <FidelityFX/host/ffx_fsr3upscaler.h>
#include <FidelityFX/host/ffx_frameinterpolation.h>
#include <FidelityFX/host/ffx_opticalflow.h>
#include <FidelityFX/host/backends/vk/ffx_vk.h>
namespace wowee::rendering {
// Compile-only probe for AMD FSR3 frame generation interfaces.
// This does not dispatch runtime frame generation yet; it ensures the
// expected SDK headers and core types are available for future integration.
bool amdFsr3FramegenCompileProbe() {
FfxFsr3UpscalerContext fsr3Context{};
FfxFrameInterpolationContext fiContext{};
FfxOpticalflowContext ofContext{};
FfxInterface backend{};
FfxDimensions2D renderSize{};
static_assert(FFX_FSR3UPSCALER_VERSION_MAJOR >= 3, "Expected FSR3 upscaler v3+");
static_assert(FFX_FRAMEINTERPOLATION_VERSION_MAJOR >= 1, "Expected frame interpolation v1+");
static_assert(FFX_OPTICALFLOW_VERSION_MAJOR >= 1, "Expected optical flow v1+");
(void)fsr3Context;
(void)fiContext;
(void)ofContext;
(void)backend;
(void)renderSize;
return true;
}
} // namespace wowee::rendering