-
Brian Ho authored
To load the Vulkan instance function pointers, we currently use the Vulkan API version of the VkInstance (returned via vkEnumerateInstanceVersion) which refers to the maximum supported version of the Vulkan implementation on the system. The actual hardware, however, may only support up to an earlier API version. When the API versions differ between the VkInstance and the VkPhysicalDevices, the spec mandates that you must use the lowest API version [1]. More concretely, this bug manifests in Chrome when the VkInstance supports 1.1, but the GPU only supports 1.0. In this case, we load 1.1-specific functions like vkGetPhysicalDeviceFeatures2, but when we actually try to run them on our 1.0 VkPhysicalDevice, the GPU process crashes [2]. This CL fixes this bug by explicitly checking the VkPhysicalDevice's API version instead of just seeing if vkGetPhysicalDeviceFeatures2 is non-null. [1] https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/VkPhysicalDeviceProperties.html [2] https://cs.chromium.org/chromium/src/gpu/vulkan/vulkan_instance.cc?l=282&rcl=cf2dfbbe19a94a77242a325388eeaeb62f530483 Bug: 1012880 Change-Id: I5e60bae02cf47e3c94f0ac9ba1ed60c0712e8d8b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1853871Reviewed-by:
Peng Huang <penghuang@chromium.org> Commit-Queue: Brian Ho <hob@chromium.org> Cr-Commit-Position: refs/heads/master@{#704822}
cf6b0582