C Specification
To acquire permission to directly access a display in Vulkan on Windows 10, call:
// Provided by VK_NV_acquire_winrt_display
VkResult vkAcquireWinrtDisplayNV(
VkPhysicalDevice physicalDevice,
VkDisplayKHR display);
Parameters
-
physicalDevice
The physical device the display is on. -
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 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
.
Note
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”. |
Note
One example of when Windows 10 loses access to a display is when the display is hot-unplugged. |
Note
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. |
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.