#ffi #fsr2 #graphics

sys fsr2-sys

Unsafe FFI bindings for AMD's FidelityFX Super Resolution 2 library (FSR2)

7 releases

0.1.6 May 24, 2023
0.1.5 May 24, 2023

#648 in Graphics APIs

Download history 6/week @ 2023-11-05 12/week @ 2023-11-12 6/week @ 2023-11-19 27/week @ 2023-11-26 11/week @ 2023-12-03 3/week @ 2023-12-10 11/week @ 2023-12-17 18/week @ 2023-12-24 2/week @ 2023-12-31 11/week @ 2024-01-07 4/week @ 2024-01-14 3/week @ 2024-01-21 23/week @ 2024-01-28 12/week @ 2024-02-04 34/week @ 2024-02-11 175/week @ 2024-02-18

244 downloads per month
Used in phobos

MIT/Apache

8MB
5.5K SLoC

C++ 4K SLoC // 0.1% comments Rust 745 SLoC GLSL 392 SLoC // 0.3% comments HLSL 381 SLoC // 0.3% comments Batch 86 SLoC // 0.1% comments

Contains (DOS exe, 7.5MB) glslangValidator.exe, (DOS exe, 240KB) FidelityFX_SC.exe

FidelityFX Super Resolution 2.2 (FSR 2.2)

AMD FidelityFX Super Resolution 2 (FSR 2) is an open source, high-quality solution for producing high resolution frames from lower resolution inputs.

This crate provides unsafe, 1:1 Rust bindings for the FSR2 library. For documentation on how to use the library, please refer to https://github.com/GPUOpen-Effects/FidelityFX-FSR2.

The crate uses a custom fork of FSR2 with minimal changes:

  • Removed dependency on cauldron-media to avoid downloading unused sample assets
  • Does not build sample backends by default
  • Vulkan backend does not link to Vulkan at all, instead relies on provided function pointers on initialization.

Known issues

  • Bindings for the DirectX12 backend are currently missing.
  • Computer can freeze for a couple seconds during build. This is due to FSR2 generating shader permutations using a bunch of threads.

Dependencies