=== Alternate Methods to Signal Fences Besides submitting a fence to a queue as part of a <> command, a fence may: also be signaled when a particular event occurs on a device or display. [open,refpage='vkRegisterDeviceEventEXT',desc='Signal a fence when a device event occurs',type='protos'] -- To create a fence that will be signaled when an event occurs on a device, call: include::../../api/protos/vkRegisterDeviceEventEXT.txt[] * pname:device is a logical device on which the event may: occur. * pname:pDeviceEventInfo is a pointer to an instance of the slink:VkDeviceEventInfoEXT structure describing the event of interest to the application. * pname:pAllocator controls host memory allocation as described in the <> chapter. * pname:pFence points to a handle in which the resulting fence object is returned. include::../../validity/protos/vkRegisterDeviceEventEXT.txt[] -- [open,refpage='VkDeviceEventInfoEXT',desc='Describe a device event to create',type='structs'] -- The sname:VkDeviceEventInfoEXT structure is defined as: include::../../api/structs/VkDeviceEventInfoEXT.txt[] * pname:sType is the type of this structure. * pname:pNext is `NULL` or a pointer to an extension-specific structure. * pname:device is a elink:VkDeviceEventTypeEXT value specifying when the fence will be signaled. include::../../validity/structs/VkDeviceEventInfoEXT.txt[] -- [open,refpage='VkDeviceEventTypeEXT',desc='Events that can occur on a device object',type='enums'] -- Possible values of slink:VkDeviceEventInfoEXT::pname:device, specifying when a fence will be signaled, are: include::../../api/enums/VkDeviceEventTypeEXT.txt[] * ename:VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT specifies that the fence is signaled when a display is plugged into or unplugged from the specified device. Applications can: use this notification to determine when they need to re-enumerate the available displays on a device. -- [open,refpage='vkRegisterDisplayEventEXT',desc='Signal a fence when a display event occurs',type='protos'] -- To create a fence that will be signaled when an event occurs on a slink:VkDisplayKHR object, call: include::../../api/protos/vkRegisterDisplayEventEXT.txt[] * pname:device is a logical device associated with pname:display * pname:display is the display on which the event may: occur. * pname:pDisplayEventInfo is a pointer to an instance of the slink:VkDisplayEventInfoEXT structure describing the event of interest to the application. * pname:pAllocator controls host memory allocation as described in the <> chapter. * pname:pFence points to a handle in which the resulting fence object is returned. include::../../validity/protos/vkRegisterDisplayEventEXT.txt[] -- [open,refpage='VkDisplayEventInfoEXT',desc='Describe a display event to create',type='structs'] -- The sname:VkDisplayEventInfoEXT structure is defined as: include::../../api/structs/VkDisplayEventInfoEXT.txt[] * pname:sType is the type of this structure. * pname:pNext is `NULL` or a pointer to an extension-specific structure. * pname:displayEvent is a elink:VkDisplayEventTypeEXT specifying when the fence will be signaled. include::../../validity/structs/VkDisplayEventInfoEXT.txt[] -- [open,refpage='VkDisplayEventTypeEXT',desc='Events that can occur on a display object',type='enums'] -- Possible values of slink:VkDisplayEventInfoEXT::pname:displayEvent, specifying when a fence will be signaled, are: include::../../api/enums/VkDisplayEventTypeEXT.txt[] * ename:VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT specifies that the fence is signaled when the first pixel of the next display refresh cycle leaves the display engine for the display. --