vkGetDrmDisplayEXT(3)

Name

vkGetDrmDisplayEXT - Query the VkDisplayKHR corresponding to a DRM connector ID

C Specification

Before acquiring a display from the DRM interface, the caller may want to select a specific VkDisplayKHR handle by identifying it using a connectorId. To do so, call:

// Provided by VK_EXT_acquire_drm_display
VkResult vkGetDrmDisplayEXT(
    VkPhysicalDevice                            physicalDevice,
    int32_t                                     drmFd,
    uint32_t                                    connectorId,
    VkDisplayKHR*                               display);

Parameters

  • physicalDevice The physical device to query the display from.

  • drmFd DRM primary file descriptor.

  • connectorId Identifier of the specified DRM connector.

  • display The corresponding VkDisplayKHR handle will be returned here.

Description

If there is no VkDisplayKHR corresponding to the connectorId on the physicalDevice, the returning display must be VK_NULL_HANDLE. The provided drmFd must correspond to the one owned by the physicalDevice. If not, the error code VK_ERROR_UNKNOWN must be returned. Mast⁠er permissions are not required, because the file descriptor is just used for information gathering purposes. The given connectorId must be a resource owned by the provided drmFd. If not, the error code VK_ERROR_UNKNOWN must be returned. If any error is encountered during the identification of the display, the call must return the error code VK_ERROR_INITIALIZATION_FAILED.

Valid Usage (Implicit)
  • VUID-vkGetDrmDisplayEXT-physicalDevice-parameter
    physicalDevice must be a valid VkPhysicalDevice handle

  • VUID-vkGetDrmDisplayEXT-display-parameter
    display must be a valid pointer to a VkDisplayKHR handle

Return Codes
Success
  • VK_SUCCESS

Failure
  • VK_ERROR_INITIALIZATION_FAILED

  • VK_ERROR_OUT_OF_HOST_MEMORY

  • VK_ERROR_UNKNOWN

  • VK_ERROR_VALIDATION_FAILED

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.