···719719 extent.height = w2;
720720 }
721721722722+ /*
723723+ * For all direct mode outputs 2 is what we want since we want to run
724724+ * lockstep with the display. Most direct mode swapchains only supports
725725+ * FIFO mode, and since there is no commonly available Vulkan API to
726726+ * wait for a specific VBLANK event, even just the latest, we can set
727727+ * the number of images to two and then acquire immediately after
728728+ * present. Since the old images are being displayed and the new can't
729729+ * be flipped this will block until the flip has gone through. Crude but
730730+ * works well enough on both AMD(Mesa) and Nvidia(Blob).
731731+ *
732732+ * When not in direct mode and display to a composited window we
733733+ * probably want 3, but most compositors on Linux sets the minImageCount
734734+ * to 3 anyways so we get what we want.
735735+ */
736736+ const uint32_t preferred_at_least_image_count = 2;
737737+722738 // Get the image count.
723723- const uint32_t preferred_at_least_image_count = 3;
724739 uint32_t image_count = select_image_count(cts, surface_caps, preferred_at_least_image_count);
725740726741