ValveSoftware / gamescope

SteamOS session compositing window manager
Other
3.04k stars 198 forks source link

AFMF support? #1213

Open superkeka opened 6 months ago

superkeka commented 6 months ago

Even ROG Ally has AFMF support

https://www.youtube.com/watch?v=9CwpTarQzF0

Lawstorant commented 6 months ago

AFMF is a feature of the Windows-based AMD software package. FSR 3.1 which includes FSR frame generation for Vulkan hasn't been released yet so there isn't really a way to implement FG into gamescope.

Eckoa commented 6 months ago

Even ROG Ally has AFMF support

https://www.youtube.com/watch?v=9CwpTarQzF0

I dont see how this really applies to gamescope as that is the AMD Windows driver which isnt used on Linux and AMDs linux driver is definitely not for gaming considering RADVs advantages.

That said I can understand requesting it as a feature if at all possible but saying things like "Even the ROG Ally has it" has very little merit in the overall context of things. There is also the problem of FSR versions past 1 needing things like motion vectors.

It might be possible depending on what is required and once Vulkan support source is released and its all decoupled from FSR but i wouldnt hold your breath.

Globetrotter129 commented 3 months ago

AFMF is a feature of the Windows-based AMD software package. FSR 3.1 which includes FSR frame generation for Vulkan hasn't been released yet so there isn't really a way to implement FG into gamescope.

It was released today

Pahheb commented 3 months ago

AFMF is a feature of the Windows-based AMD software package. FSR 3.1 which includes FSR frame generation for Vulkan hasn't been released yet so there isn't really a way to implement FG into gamescope.

It was released today

That's correct. However, according to AMD: The updated AMD FSR 3.1 SDK will be available for developers on GPUOpen in July 2024.

Which means that developers will get their hands on the source code around that time and we could expect frame generation by the end of the summer.

sharkautarch commented 2 months ago

In case people have missed it, AMD has released the FidelityFx 1.1 Sdk which includes FSR 3, and also includes frame interpolation. https://www.phoronix.com/news/AMD-FidelityFX-SDK-1.1 UPDATE: I’ve now found that one of the source files for vulkan frame interpolation depend on windows-only apis: (or at least they include a windows-only header, and the comment makes it sound like they use stuff from the header. Haven’t checked the rest of the source file to confirm this for sure yet)

https://github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK/blob/v1.1.0/sdk/src/backends/vk/FrameInterpolationSwapchain/FrameInterpolationSwapchainVK.h

// NOTES regarding using win32 objects:
//   - On Windows, critical section and events are faster than their std counterparts
//   - using Win32 threads to set the priorities
//   - this needs to be ported to standard C++ or other platform if necessary
#include <Windows.h>

Important caveat though: from what I’ve seen, it seems like AMD only released pre-built binaries/libraries for windows. Though the source code has also been released. So I’m not sure if some of the functionality might only be meant to work for windows. If that is the case, that probably wouldn’t be too big of an issue for integrating fsr3/frame interpolation into Proton/dxvk. But it could be an obstacle to integrating it into gamescope.

Now I will say, on the bright side, it seems like the frame interpolation feature is designed so that it can be used with other upscalers besides just fsr3 https://github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK/releases/tag/v1.1.0

FSR 3.1 contains significant updates: … FSR3.1 adds the ability to decouple the frame interpolation process from that of upscaling, so it can be used with any upscaler the user desires, or at native resolution.

tho I’m not sure if that actually means you can use your own custom upscaler, or if they really meant to say that frame interpolation works with any of the upscalers provided in the SDK. See also, this: https://github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK/issues/75

Also see this issue someone was having w/ the fsr3 vulkan backend: https://github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK/issues/73

And also, from the limited reading of the integration guide thingy: https://gpuopen.com/presentations/2024/FidelityFX_Super_Resolution_3-1_Release-Overview_and_Integration.pdf It seems like you have to manage three custom APIs from the SDK to do frame interpolation: custom swapchain api, custom upscaler api (I’m not sure if the upscaler api is mandatory), and their frame interpolation api.

I also took a look at a bit of the source files and it seems like the frame interpolation shaders are compute shaders

So suffice it to say that it will definitely be hard to integrate this into a native-Linux program (gamescope)