diff options
author | Jason Ekstrand <[email protected]> | 2015-09-01 16:44:42 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2015-09-04 17:55:42 -0700 |
commit | 9a7600c9b58b0fc62033bb993016d3d7d4b8810a (patch) | |
tree | 97844b4b101abe029de11680a6d75738eeee876b | |
parent | 8af3624651345e68ab833dcf98ca00da5a6afd4e (diff) |
vk/device: Use an array for device extensions
-rw-r--r-- | src/vulkan/anv_device.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/vulkan/anv_device.c b/src/vulkan/anv_device.c index 70c0c9d490a..25fedf908b8 100644 --- a/src/vulkan/anv_device.c +++ b/src/vulkan/anv_device.c @@ -657,6 +657,9 @@ VkResult anv_GetGlobalExtensionProperties( return VK_SUCCESS; } +static const VkExtensionProperties device_extensions[] = { +}; + VkResult anv_GetPhysicalDeviceExtensionProperties( VkPhysicalDevice physicalDevice, const char* pLayerName, @@ -664,12 +667,16 @@ VkResult anv_GetPhysicalDeviceExtensionProperties( VkExtensionProperties* pProperties) { if (pProperties == NULL) { - *pCount = 0; + *pCount = ARRAY_SIZE(device_extensions); return VK_SUCCESS; } - /* None supported at this time */ - return vk_error(VK_ERROR_INVALID_EXTENSION); + assert(*pCount < ARRAY_SIZE(device_extensions)); + + *pCount = ARRAY_SIZE(device_extensions); + memcpy(pProperties, device_extensions, sizeof(device_extensions)); + + return VK_SUCCESS; } VkResult anv_GetGlobalLayerProperties( |