1// Copyright (c) 2020 NVIDIA Corporation 2// 3// SPDX-License-Identifier: CC-BY-4.0 4 5include::{generated}/meta/{refprefix}VK_NV_acquire_winrt_display.adoc[] 6 7=== Other Extension Metadata 8 9*Last Modified Date*:: 10 2020-09-29 11*IP Status*:: 12 No known IP claims. 13*Contributors*:: 14 - Jeff Juliano, NVIDIA 15 16=== Description 17 18This extension allows an application to take exclusive control of a display 19on Windows 10 provided that the display is not already controlled by a 20compositor. 21Examples of compositors include the Windows desktop compositor, other 22applications using this Vulkan extension, and applications that 23https://docs.microsoft.com/en-us/uwp/api/windows.devices.display.core.displaymanager.tryacquiretarget["`Acquire`"] 24a 25https://docs.microsoft.com/en-us/uwp/api/windows.devices.display.core.displaytarget["`DisplayTarget`"] 26using a https://docs.microsoft.com/en-us/uwp/api/["`WinRT`"] command such as 27https://docs.microsoft.com/en-us/uwp/api/windows.devices.display.core.displaymanager.tryacquiretarget["`winrt::Windows::Devices::Display::Core::DisplayManager.TryAcquireTarget()`"]. 28 29When control is acquired the application has exclusive access to the display 30until control is released or the application terminates. 31An application's attempt to acquire is denied if a different application has 32already acquired the display. 33 34include::{generated}/interfaces/VK_NV_acquire_winrt_display.adoc[] 35 36=== Issues 37 381) What should the platform substring be for this extension: 39 40*RESOLVED*: The platform substring is "`Winrt`". 41 42The substring "`Winrt`" matches the fact that the OS API exposing the 43acquire and release functionality is called "`WinRT`". 44 45The substring "`Win32`" is wrong because the related "`WinRT`" API is 46explicitly *not* a "`Win32`" API. 47"`WinRT`" is a competing API family to the "`Win32`" API family. 48 49The substring "`Windows`" is suboptimal because there could be more than one 50relevant API on the Windows platform. 51There is preference to use the more-specific substring "`Winrt`". 52 532) Should flink:vkAcquireWinrtDisplayNV take a winRT DisplayTarget, or a 54Vulkan display handle as input? 55 56*RESOLVED*: A Vulkan display handle. 57This matches the design of flink:vkAcquireXlibDisplayEXT. 58 593) Should the acquire command be platform-independent named 60"`vkAcquireDisplayNV`", or platform-specific named 61"`vkAcquireWinrtDisplayNV`"? 62 63*RESOLVED*: Add a platform-specific command. 64 65The inputs to the Acquire command are all Vulkan types. 66None are WinRT types. 67This opens the possibility of the winrt extension defining a 68platform-independent acquire command. 69 70The X11 acquire command does need to accept a platform-specific parameter. 71This could be handled by adding to a platform-independent acquire command a 72params struct to which platform-dependent types can be chained by 73pname:pNext pointer. 74 75The prevailing opinion is that it would be odd to create a second 76platform-independent function that is used on the Windows 10 platform, but 77that is not used for the X11 platform. 78Since a Windows 10 platform-specific command is needed anyway for converting 79between vkDisplayKHR and platform-native handles, opinion was to create a 80platform-specific acquire function. 81 824) Should the flink:vkGetWinrtDisplayNV parameter identifying a display be 83named "`deviceRelativeId`" or "`adapterRelativeId`"? 84 85*RESOLVED*: The WinRT name is "`AdapterRelativeId`". 86The name "`adapter`" is the Windows analog to a Vulkan "`physical device`". 87Vulkan already has precedent to use the name sname:deviceLUID for the 88concept that Windows APIs call "`AdapterLuid`". 89Keeping form with this precedent, the name "`deviceRelativeId`" is chosen. 90 915) Does flink:vkAcquireWinrtDisplayNV cause the Windows desktop compositor 92to release a display? 93 94*RESOLVED*: No. 95flink:vkAcquireWinrtDisplayNV does not itself cause the Windows desktop 96compositor to release a display. 97This action must be performed outside of Vulkan. 98 99Beginning with Windows 10 version 2004 it is possible to cause the Windows 100desktop compositor to release a display by using the "`Advanced display 101settings`" sub-page of the "`Display settings`" control panel. 102See 103https://docs.microsoft.com/en-us/windows-hardware/drivers/display/specialized-monitors 104 1056) Where can one find additional information about custom compositors for 106Windows 10? 107 108*RESOLVED*: Relevant references are as follows. 109 110According to Microsoft's documentation on 111https://docs.microsoft.com/en-us/windows-hardware/drivers/display/specialized-monitors-compositor["building 112a custom compositor"], the ability to write a custom compositor is not a 113replacement for a fullscreen desktop window. 114The feature is for writing compositor apps that drive specialized hardware. 115 116Only certain editions of Windows 10 support custom compositors, 117https://docs.microsoft.com/en-us/windows-hardware/drivers/display/specialized-monitors#windows-10-version-2004["documented 118here"]. 119The product type can be queried from Windows 10. 120See 121https://docs.microsoft.com/en-us/windows/win32/api/sysinfoapi/nf-sysinfoapi-getproductinfo 122 123=== Version History 124 125 * Revision 1, 2020-09-29 (Jeff Juliano) 126 ** Initial draft 127