[Mesa-dev] [PATCH 2/3] anv: error out of anv_init_wsi() if build platform-less

Jason Ekstrand jason at jlekstrand.net
Sun May 29 17:06:46 UTC 2016


No, if we have no platforms, it should succeed at setting up all zero of
them.
On May 29, 2016 9:41 AM, "Emil Velikov" <emil.l.velikov at gmail.com> wrote:

> From: Emil Velikov <emil.velikov at collabora.com>
>
> Strictly speaking one can build 'platform-less', thus we should error
> out in that case.
>
> Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
> ---
> Not 100% sure if this is the correct error. NO_PLATFORM or
> NOT_SUPPORTED_PLATFORM seems like a better choice yet is seems to be
> missing in the vulkan API.
> ---
>  src/intel/vulkan/anv_wsi.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/intel/vulkan/anv_wsi.c b/src/intel/vulkan/anv_wsi.c
> index 006944a..4ccafb2 100644
> --- a/src/intel/vulkan/anv_wsi.c
> +++ b/src/intel/vulkan/anv_wsi.c
> @@ -26,7 +26,7 @@
>  VkResult
>  anv_init_wsi(struct anv_physical_device *physical_device)
>  {
> -   VkResult result;
> +   VkResult result = VK_ERROR_INITIALIZATION_FAILED;
>
>     memset(physical_device->wsi, 0, sizeof(physical_device->wsi));
>
> @@ -46,7 +46,7 @@ anv_init_wsi(struct anv_physical_device *physical_device)
>     }
>  #endif
>
> -   return VK_SUCCESS;
> +   return result;
>  }
>
>  void
> --
> 2.8.2
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160529/38c9f895/attachment.html>


More information about the mesa-dev mailing list