OSDN Git Service

Refactor physical device feature query.
authorNicolas Capens <capn@google.com>
Tue, 13 Nov 2018 19:06:37 +0000 (14:06 -0500)
committerNicolas Capens <nicolascapens@google.com>
Wed, 14 Nov 2018 15:38:59 +0000 (15:38 +0000)
commitd5f1489286b828cebfaf32be446b2379b17e925a
treecc5792a329fd2b564bfcce5c66175b16c3e7a126
parentae8d464198721634cee63316607e9653d79b8a55
Refactor physical device feature query.

VkPhysicalDeviceFeatures only contains VkBool32 members, and is also
described by the spec as a "structure that contains boolean indicators
of all the features to be enabled", as well as "For each feature, a
value of VK_TRUE specifies that the feature is supported on this
physical device, and VK_FALSE specifies that the feature is not
supported". Hence we can safely process it as an array of VkBool32.

This is also more likely to return false early when a requested feature
is not supported.

Bug b/117974925

Change-Id: I106ba6abf5f29874cde91fdaafd1dd9560aabfa9
Reviewed-on: https://swiftshader-review.googlesource.com/c/22512
Tested-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Corentin Wallez <cwallez@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
src/Vulkan/VkPhysicalDevice.cpp
src/Vulkan/libVulkan.cpp