GPUOpen-Effects / FidelityFX-FSR2

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

Fix unifed memory heap being ignored on vulkan #87

Closed JMS55 closed 2 weeks ago

JMS55 commented 1 year ago

On my iGPU with 8gb of unifed memory between the CPU and GPU, vkGetPhysicalDeviceMemoryProperties() reports only a single heap. The heap has VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT set. This causes BackendContext_VK::findMemoryTypeIndex() to skip the heap. As there are no other heaps, the function returns UINT32_MAX, resulting in failed context creation.

This patch modifies the loop to only skip the heap if at least one satisfactory heap has already been found.

GPU Info: AdapterInfo { name: "Intel(R) UHD Graphics 620 (KBL GT2)", vendor: 32902, device: 22807, device_type: IntegratedGpu, driver: "Intel open-source Mesa driver", driver_info: "Mesa 22.3.3", backend: Vulkan }