Class NVAcquireWinrtDisplay
Acquire” a “DisplayTarget” using a “WinRT” command such as “winrt::Windows::Devices::Display::Core::DisplayManager.TryAcquireTarget()”.
When control is acquired the application has exclusive access to the display until control is released or the application terminates. An application’s attempt to acquire is denied if a different application has already acquired the display.
- Name String
VK_NV_acquire_winrt_display- Extension Type
- Device extension
- Registered Extension Number
- 346
- Revision
- 1
- Extension and Version Dependencies
VK_EXT_direct_mode_display- Contact
- Jeff Juliano jjuliano
Other Extension Metadata
- Last Modified Date
- 2020-09-29
- IP Status
- No known IP claims.
- Contributors
- Jeff Juliano, NVIDIA
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe extension name.static final intThe extension specification version. -
Method Summary
Modifier and TypeMethodDescriptionstatic intnvkGetWinrtDisplayNV(org.lwjgl.vulkan.VkPhysicalDevice physicalDevice, int deviceRelativeId, long pDisplay) Unsafe version of:GetWinrtDisplayNVstatic intvkAcquireWinrtDisplayNV(org.lwjgl.vulkan.VkPhysicalDevice physicalDevice, long display) Acquire access to a VkDisplayKHR.static intvkGetWinrtDisplayNV(org.lwjgl.vulkan.VkPhysicalDevice physicalDevice, int deviceRelativeId, long[] pDisplay) Array version of:GetWinrtDisplayNVstatic intvkGetWinrtDisplayNV(org.lwjgl.vulkan.VkPhysicalDevice physicalDevice, int deviceRelativeId, LongBuffer pDisplay) Query the VkDisplayKHR corresponding to a WinRT DisplayTarget.
-
Field Details
-
VK_NV_ACQUIRE_WINRT_DISPLAY_SPEC_VERSION
public static final int VK_NV_ACQUIRE_WINRT_DISPLAY_SPEC_VERSIONThe extension specification version.- See Also:
-
VK_NV_ACQUIRE_WINRT_DISPLAY_EXTENSION_NAME
The extension name.- See Also:
-
-
Method Details
-
vkAcquireWinrtDisplayNV
public static int vkAcquireWinrtDisplayNV(org.lwjgl.vulkan.VkPhysicalDevice physicalDevice, long display) Acquire access to a VkDisplayKHR.C Specification
To acquire permission to directly access a display in Vulkan on Windows 10, call:
VkResult vkAcquireWinrtDisplayNV( VkPhysicalDevice physicalDevice, VkDisplayKHR display);Description
All permissions necessary to control the display are granted to the Vulkan instance associated with
physicalDeviceuntil 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 todisplay. If this has happened, operations which require access to the display must fail with an appropriate error code. If permission to accessdisplayhas already been acquired by another entity, the call must return the error codeERROR_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.AcquireWinrtDisplayNVdoes not itself cause DWM to release a display; this action must be performed outside of Vulkan.Valid Usage (Implicit)
physicalDevicemust be a validVkPhysicalDevicehandledisplaymust be a validVkDisplayKHRhandledisplaymust have been created, allocated, or retrieved fromphysicalDevice
Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
physicalDevice- The physical device the display is on.display- The display the caller wishes to control in Vulkan.
-
nvkGetWinrtDisplayNV
public static int nvkGetWinrtDisplayNV(org.lwjgl.vulkan.VkPhysicalDevice physicalDevice, int deviceRelativeId, long pDisplay) Unsafe version of:GetWinrtDisplayNV -
vkGetWinrtDisplayNV
public static int vkGetWinrtDisplayNV(org.lwjgl.vulkan.VkPhysicalDevice physicalDevice, int deviceRelativeId, LongBuffer pDisplay) Query the VkDisplayKHR corresponding to a WinRT DisplayTarget.C Specification
When acquiring displays on Windows 10, an application may also wish to enumerate and identify them using a native handle rather than a
VkDisplayKHRhandle.To determine the
VkDisplayKHRhandle corresponding to a “winrt::Windows::Devices::Display::Core::DisplayTarget”, call:VkResult vkGetWinrtDisplayNV( VkPhysicalDevice physicalDevice, uint32_t deviceRelativeId, VkDisplayKHR* pDisplay);Description
If there is no
VkDisplayKHRcorresponding todeviceRelativeIdonphysicalDevice,NULL_HANDLEmust be returned inpDisplay.Valid Usage (Implicit)
physicalDevicemust be a validVkPhysicalDevicehandlepDisplaymust be a valid pointer to aVkDisplayKHRhandle
Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
physicalDevice- The physical device on which to query the display handle.deviceRelativeId- The value of the “AdapterRelativeId” property of a “DisplayTarget” that is enumerated by a “DisplayAdapter” with an “Id” property matching thedeviceLUIDproperty of aVkPhysicalDeviceIDPropertiesforphysicalDevice.pDisplay- The correspondingVkDisplayKHRhandle will be returned here.
-
vkGetWinrtDisplayNV
public static int vkGetWinrtDisplayNV(org.lwjgl.vulkan.VkPhysicalDevice physicalDevice, int deviceRelativeId, long[] pDisplay) Array version of:GetWinrtDisplayNV
-