[Mesa-dev] [PATCH] vulkan/wsi/x11: don't crash on null visual
Eero Tamminen
eero.t.tamminen at intel.com
Fri Dec 23 11:31:55 UTC 2016
Hi,
Either this, or the other commit fixed segfault with vkreplay on DOTA2
Vulkan trace (segfault happened in trace before DOTA2 came to its main
menu).
- Eero
On 23.12.2016 00:10, Jason Ekstrand wrote:
> pushed
>
> On Thu, Dec 22, 2016 at 1:56 PM, Jason Ekstrand <jason at jlekstrand.net
> <mailto:jason at jlekstrand.net>> wrote:
>
> Reviewed-by: Jason Ekstrand <jason at jlekstrand.net
> <mailto:jason at jlekstrand.net>>
>
> On Thu, Dec 22, 2016 at 1:55 PM, Arda Coskunses
> <acoskunses at gmail.com <mailto:acoskunses at gmail.com>> 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.
> ---
> 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..08b0479 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_SURFACE_LOST_KHR;
> +
> geom = xcb_get_geometry_reply(conn, geom_cookie, &err);
> if (geom) {
> VkExtent2D extent = { geom->width, geom->height };
> --
> 2.7.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> <mailto:mesa-dev at lists.freedesktop.org>
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
> <https://lists.freedesktop.org/mailman/listinfo/mesa-dev>
>
>
>
>
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
More information about the mesa-dev
mailing list