Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.5.3, 6.6.0
-
-
bd78047df (dev)
Description
The QVulkanWindow::setEnabledFeaturesModifier method is used to set a callback allowing us to modify the VkPhysicalDeviceFeatures struct passed to the VkDeviceCreateInfo.
Here, the 6.5 LTS documentation says:
By default QVulkanWindow enables all Vulkan 1.0 core features that the physical device reports as supported, with certain exceptions. In praticular, robustBufferAccess is always disabled in order to avoid unexpected performance hits.
This however is not always sufficient when working with Vulkan 1.1 or 1.2 features and extensions. Hence this callback mechanism.
The VkPhysicalDeviceFeatures reference passed in is all zeroed out at the point when the function is invoked. It is up to the function to change members to true, or set up pNext chains as it sees fit.
Here is the issue:
The VkPhysicalDeviceFeatures struct does not contain any pNext pointer, restraining from setting up any other device features where as VkPhysicalDeviceFeatures2 does but has only been introduced with Vulkan 1.1.
typedef struct VkPhysicalDeviceFeatures2 { VkStructureType sType; void* pNext; VkPhysicalDeviceFeatures features; } VkPhysicalDeviceFeatures2;
I am assuming that QT does not want to drop support for Vulkan 1.0 just because of this issue. Instead an overload could be made to the setEnabledFeaturesModifier method allowing us to set a callback to a VkPhysicalDeviceFeatures2 ?
Alternatively the extension VK_KHR_get_physical_device_properties2 exposes a VkPhysicalDeviceFeatures2KHR with Vulkan 1.0.
For reference, the callback seems to have been added with this issue https://bugreports.qt.io/browse/QTBUG-99803
Thank you for your help.