vkAcquireXlibDisplayEXT(3)

# vkAcquireXlibDisplayEXT(3) Manual Page

## Name

vkAcquireXlibDisplayEXT - Acquire access to a VkDisplayKHR using Xlib

Loading… please wait.

## C Specification

To acquire permission to directly access a display in Vulkan from an X11 server, call:

    // Provided by VK_EXT_acquire_xlib_display
    VkResult vkAcquireXlibDisplayEXT(
        VkPhysicalDevice                            physicalDevice,
        Display*                                    dpy,
        VkDisplayKHR                                display);

## Parameters

- `physicalDevice` The physical device the display is on.

- `dpy` A connection to the X11 server that currently owns `display`.

- `display` The display the caller wishes to control in Vulkan.

## Description

All permissions necessary to control the display are granted to the Vulkan instance associated with `physicalDevice` until the display is released or the X11 connection specified by `dpy` is terminated. Permission to access the display may be temporarily revoked during periods when the X11 server from which control was acquired itself loses access to `display`. During such periods, operations which require access to the display must fail with an approriate error code. If the X11 server associated with `dpy` does not own `display`, or if permission to access it has already been acquired by another entity, the call must return the error code `VK_ERROR_INITIALIZATION_FAILED`.

| Note One example of when an X11 server loses access to a display is when it loses ownership of its virtual terminal.

Valid Usage (Implicit)

- VUID-vkAcquireXlibDisplayEXT-physicalDevice-parameter
  `physicalDevice` must be a valid VkPhysicalDevice handle

- VUID-vkAcquireXlibDisplayEXT-dpy-parameter
  `dpy` must be a valid pointer to a `Display` value

- VUID-vkAcquireXlibDisplayEXT-display-parameter
  `display` must be a valid VkDisplayKHR handle

- VUID-vkAcquireXlibDisplayEXT-display-parent
  `display` must have been created, allocated, or retrieved from `physicalDevice`

Return Codes

On success, this command returns

  - `VK_SUCCESS`

On failure, this command returns

  - `VK_ERROR_OUT_OF_HOST_MEMORY`

  - `VK_ERROR_INITIALIZATION_FAILED`

## See Also

VkDisplayKHR, VkPhysicalDevice

## Document Notes

For more information, see the Vulkan Specification

This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.

## Copyright

Copyright 2014-2021 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0