diff --git a/.pick_status.json b/.pick_status.json index 325e62839cb..e32ea00dedf 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1554,7 +1554,7 @@ "description": "wsi/common: Do not update present mode with MESA_VK_WSI_PRESENT_MODE.", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "ad71d584cfbe588c54b2b3eaa2e6aa94af68e305", "notes": null diff --git a/src/vulkan/wsi/wsi_common.c b/src/vulkan/wsi/wsi_common.c index c06d4f7ffa2..c85cdfe1853 100644 --- a/src/vulkan/wsi/wsi_common.c +++ b/src/vulkan/wsi/wsi_common.c @@ -1354,9 +1354,14 @@ wsi_common_queue_present(const struct wsi_device *wsi, uint32_t image_index = pPresentInfo->pImageIndices[i]; VkResult result; - /* Update the present mode for this present and any subsequent present. */ - if (present_mode_info && present_mode_info->pPresentModes && swapchain->set_present_mode) + /* Update the present mode for this present and any subsequent present. + * Only update the present mode when MESA_VK_WSI_PRESENT_MODE is not used. + * We should also turn any VkSwapchainPresentModesCreateInfoEXT into a nop, + * but none of the WSI backends use that currently. */ + if (present_mode_info && present_mode_info->pPresentModes && + swapchain->set_present_mode && wsi->override_present_mode == VK_PRESENT_MODE_MAX_ENUM_KHR) { swapchain->set_present_mode(swapchain, present_mode_info->pPresentModes[i]); + } if (swapchain->fences[image_index] == VK_NULL_HANDLE) { const VkFenceCreateInfo fence_info = {