vulkan_test_applications
vulkan_test_applications copied to clipboard
Support for VkPhysicalDeviceProtectedMemoryFeatures should be properly queried before being used
The device creation in CreateDeviceForSwapchain seems to assume that the extension offering VkPhysicalDeviceProtectedMemoryFeatures is always supported:
https://github.com/google/vulkan_test_applications/blob/master/vulkan_helpers/helper_functions.cpp#L643-L651
I think the support for this extension should be queried with vkGetPhysicalDeviceFeatures2, and it should not be used unless it is supported. Swiftshader reports that it does not support this extension, and fails when a CreateDeviceInfo has a pNext with a VkPhysicalDeviceProtectedMemoryFeatures struct.