vulkan: Wait for device to be idle before create/recreating swapchain
authorJosé Roberto de Souza <jose.souza@intel.com>
Wed, 12 Jul 2023 20:26:27 +0000 (13:26 -0700)
committerJosé Roberto de Souza <jose.souza@intel.com>
Thu, 13 Jul 2023 12:40:55 +0000 (05:40 -0700)
commit526c0404c28aafa2e5632c26657c1a9dbd713a96
tree390c15af4c668c38c96e40b3fa3c65a7b9fb985c
parentcdacfc5a21f4963f63261d74aee9ee72d9f2e3c5
vulkan: Wait for device to be idle before create/recreating swapchain

Wait for device to be idle because this function is also called in
window resizes.
And if we destroy old swapchain it also destroy the old VkImages,
those images could be in use by a vulkan render.

This fixes a issue reported in Mesa repository when running
GTK with Xe KMD.

Fixes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9044
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
gdk/gdkvulkancontext.c