GPUOpen-Effects / FidelityFX-FSR2

FidelityFX Super Resolution 2
Other
1.96k stars 179 forks source link

Linker overrides VK fsr2GetPermutationBlobByIndex with the DX12 version #43

Open PotatoOfDoom opened 2 years ago

PotatoOfDoom commented 2 years ago

When statically compiling FSR 2.0 and linking an application with support for both renderers, the function fsr2GetPermutationBlobByIndex of the Vulkan backend gets overridden by the DirectX 12 version. This means that the Vulkan pipeline gets initialized with DirectX 12 shaders, which obviously leads to a crash. I guess renaming the function to something like fsr2GetPermutationBlobByIndexVK and fsr2GetPermutationBlobByIndexDX12 is the proper way to fix this.

PotatoOfDoom commented 2 years ago

I just looked at the UE4 plugin and it seems like this problem has been bypassed in the plugin in FFXFSR2Vulkan.cpp in line 61. Do you still intend to change the function name in the main repo or is redefining it via a macro the official way to get around this issue?