turnip: Fix result of vkEnumerate*LayerProperties
authorChad Versace <chadversary@chromium.org>
Wed, 7 Nov 2018 06:52:57 +0000 (23:52 -0700)
committerChia-I Wu <olvaffe@gmail.com>
Mon, 11 Mar 2019 17:01:33 +0000 (10:01 -0700)
The functions must not return VK_ERROR_LAYER_NOT_PRESENT. The spec
reserves that error for vkEnumerate*ExtensionProperties.

src/freedreno/vulkan/tu_device.c

index ac6d575c7266ab2d39f2c6fa8a215e74aed4bfa4..b3ea522bfdf25733615dcde15d9b4932bd942b78 100644 (file)
@@ -1088,13 +1088,8 @@ VkResult
 tu_EnumerateInstanceLayerProperties(uint32_t *pPropertyCount,
                                     VkLayerProperties *pProperties)
 {
-   if (pProperties == NULL) {
-      *pPropertyCount = 0;
-      return VK_SUCCESS;
-   }
-
-   /* None supported at this time */
-   return vk_error(NULL, VK_ERROR_LAYER_NOT_PRESENT);
+   *pPropertyCount = 0;
+   return VK_SUCCESS;
 }
 
 VkResult
@@ -1102,13 +1097,8 @@ tu_EnumerateDeviceLayerProperties(VkPhysicalDevice physicalDevice,
                                   uint32_t *pPropertyCount,
                                   VkLayerProperties *pProperties)
 {
-   if (pProperties == NULL) {
-      *pPropertyCount = 0;
-      return VK_SUCCESS;
-   }
-
-   /* None supported at this time */
-   return vk_error(NULL, VK_ERROR_LAYER_NOT_PRESENT);
+   *pPropertyCount = 0;
+   return VK_SUCCESS;
 }
 
 void