summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2016-10-26 13:05:51 +1000
committerDave Airlie <[email protected]>2016-10-27 11:43:15 +1000
commitca035006c86a5055c8e640f49c858f04770681eb (patch)
treed51e5dd1180b09a82aa3abccd559fa04cf0fc2fb
parent1cdca1eb16ab33da338dda076794efd4bf859f7b (diff)
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 <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
-rw-r--r--src/vulkan/wsi/wsi_common_x11.c4
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 47eeb3e5e21..efd3fb55299 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);