Mesa (master): wsi/x11: Create a present queue for VK_PRESENT_MODE_FIFO_RELAXED_KHR

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Sep 21 21:13:05 UTC 2020


Module: Mesa
Branch: master
Commit: 54b9013e4c83a74b2806195bc41d774ca060112b
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=54b9013e4c83a74b2806195bc41d774ca060112b

Author: Adam Jackson <ajax at redhat.com>
Date:   Mon Sep 21 15:48:22 2020 -0400

wsi/x11: Create a present queue for VK_PRESENT_MODE_FIFO_RELAXED_KHR

This activates the target_msc computation that we'd otherwise be using
if we were just FIFO; otherwise we'd always set target_msc = 0 and it'd
act like IMMEDIATE.

Fixes: 77d25627933 "wsi/x11: Hook up VK_PRESENT_MODE_FIFO_RELAXED_KHR"
Fixes: mesa/mesa#3512
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6804>

---

 src/vulkan/wsi/wsi_common_x11.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/vulkan/wsi/wsi_common_x11.c b/src/vulkan/wsi/wsi_common_x11.c
index 9d9f29f2b76..ff7e90ac92f 100644
--- a/src/vulkan/wsi/wsi_common_x11.c
+++ b/src/vulkan/wsi/wsi_common_x11.c
@@ -1606,6 +1606,7 @@ x11_surface_create_swapchain(VkIcdSurfaceBase *icd_surface,
    }
 
    if ((chain->base.present_mode == VK_PRESENT_MODE_FIFO_KHR ||
+       chain->base.present_mode == VK_PRESENT_MODE_FIFO_RELAXED_KHR ||
        chain->base.present_mode == VK_PRESENT_MODE_MAILBOX_KHR) && !chain->base.wsi->sw) {
       chain->has_present_queue = true;
 
@@ -1619,7 +1620,8 @@ x11_surface_create_swapchain(VkIcdSurfaceBase *icd_surface,
          goto fail_init_images;
       }
 
-      if (chain->base.present_mode == VK_PRESENT_MODE_FIFO_KHR) {
+      if (chain->base.present_mode == VK_PRESENT_MODE_FIFO_KHR ||
+          chain->base.present_mode == VK_PRESENT_MODE_FIFO_RELAXED_KHR) {
          chain->has_acquire_queue = true;
 
          ret = wsi_queue_init(&chain->acquire_queue, chain->base.image_count + 1);



More information about the mesa-commit mailing list