diff options
author | Dave Airlie <airlied@redhat.com> | 2016-10-26 13:05:51 +1000 |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2016-11-28 12:17:51 +0000 |
commit | 6eceac3a029c86175c68e2759439ee070972ad79 (patch) | |
tree | 7b1de2d7efbd1835809560fab2dfbeb1e69d08a7 | |
parent | 2e3e5c0e73cf4e3156823367084fd6e2d8286be8 (diff) | |
download | external_mesa3d-6eceac3a029c86175c68e2759439ee070972ad79.zip external_mesa3d-6eceac3a029c86175c68e2759439ee070972ad79.tar.gz external_mesa3d-6eceac3a029c86175c68e2759439ee070972ad79.tar.bz2 |
vulkan/wsi/x11: add support for IMMEDIATE present mode
We shouldn't be using ASYNC here, that would be used
for immediate mode, so let's implement that.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit ca035006c86a5055c8e640f49c858f04770681eb)
-rw-r--r-- | src/vulkan/wsi/wsi_common_x11.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/vulkan/wsi/wsi_common_x11.c b/src/vulkan/wsi/wsi_common_x11.c index 9ce3842..75eab6c 100644 --- a/src/vulkan/wsi/wsi_common_x11.c +++ b/src/vulkan/wsi/wsi_common_x11.c @@ -143,6 +143,7 @@ static const VkSurfaceFormatKHR formats[] = { }; static const VkPresentModeKHR present_modes[] = { + VK_PRESENT_MODE_IMMEDIATE_KHR, VK_PRESENT_MODE_MAILBOX_KHR, }; @@ -654,7 +655,8 @@ x11_queue_present(struct wsi_swapchain *anv_chain, int64_t divisor = 0; int64_t remainder = 0; - options |= XCB_PRESENT_OPTION_ASYNC; + if (chain->base.present_mode == VK_PRESENT_MODE_IMMEDIATE_KHR) + options |= XCB_PRESENT_OPTION_ASYNC; xshmfence_reset(image->shm_fence); |