FidelityFX-SDK icon indicating copy to clipboard operation
FidelityFX-SDK copied to clipboard

FrameinterpolationSwapchainDX12 doesn't support BGRA8 swapchain/backbuffer formats

Open Nukem9 opened this issue 1 year ago • 3 comments

This is half bug, half feature request.

When a BGRA8 swap chain desc is passed to ffxCreateFrameinterpolationSwapchainDX12, GetFfxSurfaceFormat or ffxGetSurfaceFormatDX12 are called at some point and trip an assertion due to the lack of backend support. Under certain circumstances the code crashes. I didn't see this stated in the documentation anywhere. I could be blind though.

I implemented a workaround by adding relevant formats to the FfxSurfaceFormat enum and adding more switch cases.

Nukem9 avatar Jan 08 '24 17:01 Nukem9

Can I get a list of all missing surface formats you'd like to also be supported?

Thanks,

Jason

jlacroixAMD avatar Jan 08 '24 23:01 jlacroixAMD

Can I get a list of all missing surface formats you'd like to also be supported?

DXGI_FORMAT_B8G8R8A8_UNORM       =>  FFX_SURFACE_FORMAT_B8G8R8A8_UNORM
DXGI_FORMAT_B8G8R8A8_UNORM_SRGB  =>  FFX_SURFACE_FORMAT_B8G8R8A8_SRGB
DXGI_FORMAT_B8G8R8A8_TYPELESS    =>  FFX_SURFACE_FORMAT_B8G8R8A8_TYPELESS

These are just R8G8B8A8's counterparts. TYPELESS isn't supported on swap chains (?) but it's occasionally needed for HUD-less input resources. Thanks in advance.

Nukem9 avatar Jan 09 '24 17:01 Nukem9

I've added the formats to a local branch. They should appear in the next public release of the SDK.

Thanks,

Jason

jlacroixAMD avatar Jan 10 '24 01:01 jlacroixAMD