On Thu, Dec 22, 2016 at 9:30 AM, Arda Coskunses <[email protected]>
wrote:
> When application window closed unexpectedly due to
> lost window visualtypes getting invlaid parameters
> which is causing a crash. Necessary check is added
> to prevent the crash.
>
Yeah... X11 is racy. Anything can happen.
> ---
> src/vulkan/wsi/wsi_common_x11.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/src/vulkan/wsi/wsi_common_x11.c b/src/vulkan/wsi/wsi_common_
> x11.c
> index afb7809..8afff8b 100644
> --- a/src/vulkan/wsi/wsi_common_x11.c
> +++ b/src/vulkan/wsi/wsi_common_x11.c
> @@ -354,6 +354,9 @@ x11_surface_get_capabilities(VkIcdSurfaceBase
> *icd_surface,
> xcb_visualtype_t *visual =
> get_visualtype_for_window(conn, window, &visual_depth);
>
> + if (!visual)
> + return VK_ERROR_OUT_OF_HOST_MEMORY;
>
I think VK_ERROR_SURFACE_LOST_KHR would be more appropriate here.
> +
> geom = xcb_get_geometry_reply(conn, geom_cookie, &err);
> if (geom) {
> VkExtent2D extent = { geom->width, geom->height };
> --
> 2.7.4
>
> _______________________________________________
> mesa-dev mailing list
> [email protected]
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev