Victor Hermann Chiletto : winevulkan: Adequate vkEnumerateInstanceLayerProperties to the Vulkan spec.

Alexandre Julliard julliard at winehq.org
Fri Mar 19 16:42:01 CDT 2021


Module: wine
Branch: master
Commit: dff2f63210a33e25a78897fb1d276b75705740ba
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=dff2f63210a33e25a78897fb1d276b75705740ba

Author: Victor Hermann Chiletto <v at hnn.net.br>
Date:   Sat Mar  6 17:46:29 2021 -0300

winevulkan: Adequate vkEnumerateInstanceLayerProperties to the Vulkan spec.

The section for vkEnumerateInstanceLayerProperties states [1]:

On success, this command returns
 * VK_SUCCESS
 * VK_INCOMPLETE

On failure, this command returns
 * VK_ERROR_OUT_OF_HOST_MEMORY
 * VK_ERROR_OUT_OF_DEVICE_MEMORY

Always setting the layer count to zero and returning VK_SUCCESS is
valid, as even if the function is given an array in pProperties, it's
filled with zero layers

[1]: https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkEnumerateInstanceLayerProperties.html

Signed-off-by: Victor Hermann Chiletto <v at hnn.net.br>
Signed-off-by: Joshua Ashton <joshua at froggi.es>
Signed-off-by: Liam Middlebrook <lmiddlebrook at nvidia.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/winevulkan/vulkan.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/dlls/winevulkan/vulkan.c b/dlls/winevulkan/vulkan.c
index d24fcb2f64b..971394eb9dd 100644
--- a/dlls/winevulkan/vulkan.c
+++ b/dlls/winevulkan/vulkan.c
@@ -1065,13 +1065,8 @@ VkResult WINAPI wine_vkEnumerateInstanceLayerProperties(uint32_t *count, VkLayer
 {
     TRACE("%p, %p\n", count, properties);
 
-    if (!properties)
-    {
-        *count = 0;
-        return VK_SUCCESS;
-    }
-
-    return VK_ERROR_LAYER_NOT_PRESENT;
+    *count = 0;
+    return VK_SUCCESS;
 }
 
 VkResult WINAPI wine_vkEnumerateInstanceVersion(uint32_t *version)




More information about the wine-cvs mailing list