// Copyright 2016-2024 The Khronos Group Inc.
//
// SPDX-License-Identifier: CC-BY-4.0

include::{generated}/meta/{refprefix}VK_EXT_display_control.adoc[]

=== Other Extension Metadata

*Last Modified Date*::
    2016-12-13
*IP Status*::
    No known IP claims.
*Contributors*::
  - Pierre Boudier, NVIDIA
  - James Jones, NVIDIA
  - Damien Leone, NVIDIA
  - Pierre-Loup Griffais, Valve
  - Daniel Vetter, Intel

=== Description

This extension defines a set of utility functions for use with the
`apiext:VK_KHR_display` and `apiext:VK_KHR_display_swapchain` extensions.

include::{generated}/interfaces/VK_EXT_display_control.adoc[]

=== Issues

1) Should this extension add an explicit "`WaitForVsync`" API or a fence
signaled at vsync that the application can wait on?

*RESOLVED*: A fence.
A separate API could later be provided that allows exporting the fence to a
native object that could be inserted into standard run loops on POSIX and
Windows systems.

2) Should callbacks be added for a vsync event, or in general to monitor
events in Vulkan?

*RESOLVED*: No, fences should be used.
Some events are generated by interrupts which are managed in the kernel.
In order to use a callback provided by the application, drivers would need
to have the userspace driver spawn threads that would wait on the kernel
event, and hence the callbacks could be difficult for the application to
synchronize with its other work given they would arrive on a foreign thread.

3) Should vblank or scanline events be exposed?

*RESOLVED*: Vblank events.
Scanline events could be added by a separate extension, but the latency of
processing an interrupt and waking up a userspace event is high enough that
the accuracy of a scanline event would be rather low.
Further, per-scanline interrupts are not supported by all hardware.

=== Version History

  * Revision 1, 2016-12-13 (James Jones)
  ** Initial draft
