diff options
author | Jason Ekstrand <jason.ekstrand@intel.com> | 2021-01-30 11:03:27 -0600 |
---|---|---|
committer | Marge Bot <eric+marge@anholt.net> | 2021-02-04 20:02:12 +0000 |
commit | 0260b4a7e74c4ef3aa64a9dfe37895654584bd86 (patch) | |
tree | 9a0b6f5708ecc816384730dccf1fe7676c2b8e8f /src/intel | |
parent | f26b336331f9fb63eabbe3ab6949f924d7d28113 (diff) |
vulkan: Add a common helper for enumerating instance extension properties
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Tested-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8792>
Diffstat (limited to 'src/intel')
-rw-r--r-- | src/intel/vulkan/anv_device.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index 356d5f8ed55..4349f8f79ea 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -681,17 +681,11 @@ VkResult anv_EnumerateInstanceExtensionProperties( uint32_t* pPropertyCount, VkExtensionProperties* pProperties) { - VK_OUTARRAY_MAKE(out, pProperties, pPropertyCount); + if (pLayerName) + return vk_error(VK_ERROR_LAYER_NOT_PRESENT); - for (int i = 0; i < VK_INSTANCE_EXTENSION_COUNT; i++) { - if (anv_instance_extensions_supported.extensions[i]) { - vk_outarray_append(&out, prop) { - *prop = vk_instance_extensions[i]; - } - } - } - - return vk_outarray_status(&out); + return vk_enumerate_instance_extension_properties( + &anv_instance_extensions_supported, pPropertyCount, pProperties); } static void |