Function Prototype

vkAcquireWinrtDisplayNV

Acquire access to a VkDisplayKHR

To acquire permission to directly access a display in Vulkan on Windows 10, call:

VkResult vkAcquireWinrtDisplayNV(
    VkPhysicalDevice physicalDevice,
    VkDisplayKHR display);
  • physicalDevice The physical device the display is on.
  • display The display the caller wishes to control in Vulkan.

All permissions necessary to control the display are granted to the Vulkan instance associated with physicalDevice until the display is released or the application is terminated. Permission to access the display may be revoked by events that cause Windows 10 itself to lose access to display. If this has happened, operations which require access to the display must fail with an appropriate error code. If permission to access display has already been acquired by another entity, the call must return the error code VK_ERROR_INITIALIZATION_FAILED.

The Vulkan instance acquires control of a winrt::Windows::Devices::Display::Core::DisplayTarget by performing an operation equivalent to winrt::Windows::Devices::Display::Core::DisplayManager.TryAcquireTarget() on the DisplayTarget.

One example of when Windows 10 loses access to a display is when the display is hot-unplugged.

One example of when a display has already been acquired by another entity is when the Windows desktop compositor (DWM) is in control of the display. Beginning with Windows 10 version 2004 it is possible to cause DWM to release a display by using the Advanced display settings sub-page of the Display settings control panel. vkAcquireWinrtDisplayNV does not itself cause DWM to release a display; this action must be performed outside of Vulkan.

Valid Usage (Implicit)

VUID-vkAcquireWinrtDisplayNV-display-parent

display must have been created, allocated, or retrieved from physicalDevice