libvulkan: Slightly better handling of swapchain re-creation
Previously we would fail vkCreateSwapchainKHR if
VkSwapchainCreateInfo::oldSwapchain was used, because we were unable
to dequeue all buffers for the new swapchain from an already-used
native window.
Now we disconnect and re-connect to the native window in order to
fully reset state, and allow us to dequeue all buffers. Additionally,
we tag the old swapchain as out-of-date, so future image acquires and
presents will fail with VK_ERROR_OUT_OF_DATE_KHR on that swapchain.
This is less than ideal, but better than what we had, and the best we
have time to do for N.
Bug: 26927424
Change-Id: Ifaa5048376f72a63ecb1dca3d1ff85dbee2c24d0
diff --git a/vulkan/libvulkan/driver.h b/vulkan/libvulkan/driver.h
index 210c3c7..a02ebd7 100644
--- a/vulkan/libvulkan/driver.h
+++ b/vulkan/libvulkan/driver.h
@@ -98,6 +98,7 @@
std::bitset<ProcHook::EXTENSION_COUNT> hook_extensions;
+ VkDevice driver_device;
DeviceDriverTable driver;
};