• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2018-2021 The Khronos Group, Inc.
2//
3// SPDX-License-Identifier: CC-BY-4.0
4
5[open,refpage='vkAcquireDrmDisplayEXT',desc='Acquire access to a VkDisplayKHR using DRM',type='protos']
6--
7To acquire permission to directly a display in Vulkan from the Direct
8Rendering Manager (DRM) interface, call:
9
10include::{generated}/api/protos/vkAcquireDrmDisplayEXT.txt[]
11
12  * pname:physicalDevice The physical device the display is on.
13  * pname:drmFd DRM primary file descriptor.
14  * pname:display The display the caller wishes Vulkan to control.
15
16All permissions necessary to control the display are granted to the Vulkan
17instance associated with the provided pname:physicalDevice until the display
18is either released or the connector is unplugged.
19The provided pname:drmFd must correspond to the one owned by the
20pname:physicalDevice.
21If not, the error code ename:VK_ERROR_UNKNOWN must be returned.
22The DRM FD must have DRM master permissions.
23If any error is encountered during the acquisition of the display, the call
24must return the error code ename:VK_ERROR_INITIALIZATION_FAILED.
25
26The provided DRM fd should not be closed before the display is released,
27attempting to do it may result in undefined: behaviour.
28
29include::{generated}/validity/protos/vkAcquireDrmDisplayEXT.txt[]
30--
31
32[open,refpage='vkGetDrmDisplayEXT',desc='Query the VkDisplayKHR corresponding to a DRM connector ID',type='protos']
33--
34Before acquiring a display from the DRM interface, the caller may want to
35select a specific sname:VkDisplayKHR handle by identifying it using a
36pname:connectorId.
37To do so, call:
38
39include::{generated}/api/protos/vkGetDrmDisplayEXT.txt[]
40
41  * pname:physicalDevice The physical device to query the display from.
42  * pname:drmFd DRM primary file descriptor.
43  * pname:connectorId Identifier of the specified DRM connector.
44  * pname:display The corresponding slink:VkDisplayKHR handle will be
45    returned here.
46
47If there is no slink:VkDisplayKHR corresponding to the pname:connectorId on
48the pname:physicalDevice, the returning pname:display must be set to
49dlink:VK_NULL_HANDLE.
50The provided pname:drmFd must correspond to the one owned by the
51pname:physicalDevice.
52If not, the error code ename:VK_ERROR_UNKNOWN must be returned.
53Master permissions are not required, because the file descriptor is just
54used for information gathering purposes.
55The given pname:connectorId must be a resource owned by the provided
56pname:drmFd.
57If not, the error code ename:VK_ERROR_UNKNOWN must be returned.
58If any error is encountered during the identification of the display, the
59call must return the error code ename:VK_ERROR_INITIALIZATION_FAILED.
60
61include::{generated}/validity/protos/vkGetDrmDisplayEXT.txt[]
62--
63