GPUOpen-LibrariesAndSDKs / FidelityFX-SDK

The main repository for the FidelityFX SDK.
Other
835 stars 80 forks source link

ENABLE_TEXTURE1D_USAGE flags result in incompatible HLSL bindings #45

Closed Nukem9 closed 1 month ago

Nukem9 commented 7 months ago

Bug. I haven't checked FSR code exhaustively (e.g. upscaling) but I do know this applies to frame interpolation at the minimum.

Passing the flag FFX_XXXXX_ENABLE_TEXTURE1D_USAGE to ffxFsr3ContextCreate or ffxFrameInterpolationContextCreate results in TEXTURE1D creation for resources with a height of 1. FFX_FRAMEINTERPOLATION_RESOURCE_IDENTIFIER_COUNTERS ("FI_Counters") happens to be one of said resources.

Texture creation is fine by itself. However, backend HLSL shaders hardcode their SRV types. A Texture2D is always used for FFX_FRAMEINTERPOLATION_BIND_SRV_COUNTERS which is bound to the FFX_FRAMEINTERPOLATION_RESOURCE_IDENTIFIER_COUNTERS Texture1D resource from above. These aren't compatible.

From what I can tell reads/writes to the counter variables end up being 0, always, and interpolation stops working. You'll only see duplicated frames.