1// Copyright 2018-2021 The Khronos Group, Inc. 2// 3// SPDX-License-Identifier: CC-BY-4.0 4 5[open,refpage='vkAcquireXlibDisplayEXT',desc='Acquire access to a VkDisplayKHR using Xlib',type='protos'] 6-- 7To acquire permission to directly access a display in Vulkan from an X11 8server, call: 9 10include::{generated}/api/protos/vkAcquireXlibDisplayEXT.txt[] 11 12 * pname:physicalDevice The physical device the display is on. 13 * pname:dpy A connection to the X11 server that currently owns 14 pname:display. 15 * pname:display The display the caller wishes to control in Vulkan. 16 17All permissions necessary to control the display are granted to the Vulkan 18instance associated with pname:physicalDevice until the display is released 19or the X11 connection specified by pname:dpy is terminated. 20Permission to access the display may: be temporarily revoked during periods 21when the X11 server from which control was acquired itself loses access to 22pname:display. 23During such periods, operations which require access to the display must: 24fail with an approriate error code. 25If the X11 server associated with pname:dpy does not own pname:display, or 26if permission to access it has already been acquired by another entity, the 27call must: return the error code ename:VK_ERROR_INITIALIZATION_FAILED. 28 29[NOTE] 30.Note 31==== 32One example of when an X11 server loses access to a display is when it loses 33ownership of its virtual terminal. 34==== 35 36include::{generated}/validity/protos/vkAcquireXlibDisplayEXT.txt[] 37-- 38 39[open,refpage='vkGetRandROutputDisplayEXT',desc='Query the VkDisplayKHR corresponding to an X11 RandR Output',type='protos'] 40-- 41When acquiring displays from an X11 server, an application may also wish to 42enumerate and identify them using a native handle rather than a 43sname:VkDisplayKHR handle. 44To determine the sname:VkDisplayKHR handle corresponding to an X11 RandR 45Output, call: 46 47include::{generated}/api/protos/vkGetRandROutputDisplayEXT.txt[] 48 49 * pname:physicalDevice The physical device to query the display handle on. 50 * pname:dpy A connection to the X11 server from which pname:rrOutput was 51 queried. 52 * pname:rrOutput An X11 RandR output ID. 53 * pname:pDisplay The corresponding slink:VkDisplayKHR handle will be 54 returned here. 55 56If there is no slink:VkDisplayKHR corresponding to pname:rrOutput on 57pname:physicalDevice, dlink:VK_NULL_HANDLE must: be returned in 58pname:pDisplay. 59 60include::{generated}/validity/protos/vkGetRandROutputDisplayEXT.txt[] 61-- 62