GPUOpen-LibrariesAndSDKs / FidelityFX-SDK

The main repository for the FidelityFX SDK.
Other
834 stars 78 forks source link

amd_fidelityfx_vk null exception while creating context #73

Open cdozdil opened 2 months ago

cdozdil commented 2 months ago

Hello,

I was testing Vulkan backend but keep getting access violation error on this line at ffx_vk.cpp. After changing this line on same file as below problem dissapeared for me.

backendContext->vkFunctionTable.vkGetBufferMemoryRequirements2KHR = (PFN_vkGetBufferMemoryRequirements2KHR)vkDeviceContext->vkDeviceProcAddr(backendContext->device, "vkGetBufferMemoryRequirements2");
cdozdil commented 1 month ago

With pull request #77 I have tried to solve this and one another extension issue I have noticed.

lordOznek commented 1 week ago

Hello! You might need to load the extension VK_KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME to make it works. But as you have pointed out in your merge request, this function is now in core Vulkan 1.1. Maybe this function should always be used (assuming Vulkan 1.1 is supported)?

HerveRV commented 1 week ago

vkGetBufferMemoryRequirements2KHR on my RTX3080Ti is NULL vkGetBufferMemoryRequirements2 is defined

->

vkGetBufferMemoryRequirements2KHR = vkGetBufferMemoryRequirements2; // After vulkan initialisation

lordOznek commented 1 week ago

With the latest driver, your GPU has this extension available. Please refer to https://vulkan.gpuinfo.org/displayreport.php?id=32759#extensions

Have you make sure the extension is loaded during device creation (see VkDeviceCreateInfo::ppEnabledExenstionNames)?

HerveRV commented 1 week ago

I use Volk for vulkan initialisation, i think it doesn"t fill all the functions. But i override the vkDeviceProcAddr function in ffx::CreateBackendVKDesc BackendVKDesc, and it solved all my FSR problems (but not the framegeneration crash at this time :D)

I give you the information in case off it can help you...

cdozdil commented 1 week ago

Hi,

Thanks for advice, as far I as remeber FSR3.1 upscaler uses 4 (2 or 3 of them for debugging) Vulkan extensions and last time when I have checked they weren't listed in the docs at all. So it might be better if AMD add this info to FSR docs to prevent confusion.

Hello! You might need to load the extension VK_KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME to make it works. But as you have pointed out in your merge request, this function is now in core Vulkan 1.1. Maybe this function should always be used (assuming Vulkan 1.1 is supported)?