[Mesa-dev] [PATCH 2/2] vulkan/wsi/x11: add support for IMMEDIATE present mode
Jason Ekstrand
jason at jlekstrand.net
Wed Oct 26 04:35:45 UTC 2016
Sure. I'm not 100% clear on what async means, but I think I have the
general idea.
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
On Tue, Oct 25, 2016 at 8:13 PM, Dave Airlie <airlied at gmail.com> wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> We shouldn't be using ASYNC here, that would be used
> for immediate mode, so let's implement that.
>
> 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 bae1d18..77aea1d 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,
> };
>
> @@ -642,7 +643,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);
>
> --
> 2.5.5
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20161025/4d9d63b4/attachment-0001.html>
More information about the mesa-dev
mailing list