+ if (wsi_wl->wsi->force_bgra8_unorm_first) {
+ /* Find BGRA8_UNORM in the list and swap it to the first position if we
+ * can find it. Some apps get confused if SRGB is first in the list.
+ */
+ VkFormat *first_fmt = u_vector_head(display->formats);
+ VkFormat *iter_fmt;
+ u_vector_foreach(iter_fmt, display->formats) {
+ if (*iter_fmt == VK_FORMAT_B8G8R8A8_UNORM) {
+ *iter_fmt = *first_fmt;
+ *first_fmt = VK_FORMAT_B8G8R8A8_UNORM;
+ break;
+ }
+ }
+ }
+