[PATCH 1/2] winevulkan: Adequate vkEnumerateInstanceLayerProperties to the Vulkan spec

Liam Middlebrook lmiddlebrook at nvidia.com
Tue Mar 16 17:59:14 CDT 2021


This matches my reading of the Vulkan specification, thanks for finding 
this.

Signed-off-by: Liam Middlebrook <lmiddlebrook at nvidia.com>

On 3/6/21 12:46 PM, Victor Hermann Chiletto wrote:
> 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>
> ---
>   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-devel mailing list