Mesa (master): vulkan/wsi/x11: add support for IMMEDIATE present mode
Dave Airlie
airlied at kemper.freedesktop.org
Thu Oct 27 02:10:28 UTC 2016
Module: Mesa
Branch: master
Commit: ca035006c86a5055c8e640f49c858f04770681eb
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ca035006c86a5055c8e640f49c858f04770681eb
Author: Dave Airlie <airlied at redhat.com>
Date: Wed Oct 26 13:05:51 2016 +1000
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 at jlekstrand.net>
Signed-off-by: Dave Airlie <airlied at redhat.com>
---
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 47eeb3e..efd3fb5 100644
--- a/src/vulkan/wsi/wsi_common_x11.c
+++ b/src/vulkan/wsi/wsi_common_x11.c
@@ -141,6 +141,7 @@ static const VkSurfaceFormatKHR formats[] = {
};
static const VkPresentModeKHR present_modes[] = {
+ VK_PRESENT_MODE_IMMEDIATE_KHR,
VK_PRESENT_MODE_MAILBOX_KHR,
};
@@ -643,7 +644,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);
More information about the mesa-commit
mailing list