1// Copyright 2018-2021 The Khronos Group, Inc. 2// 3// SPDX-License-Identifier: CC-BY-4.0 4 5[[present-wait]] 6== Present Wait 7 8Applications wanting to control the pacing of the application by monitoring 9when presentation processes have completed to limit the number of 10outstanding images queued for presentation, need to have a method of being 11signaled during the presentation process. 12 13ifdef::VK_GOOGLE_display_timing,VK_KHR_present_timing[] 14Using 15ifdef::VK_KHR_present_timing[] 16the `VK_KHR_present_timing` extension 17ifdef::VK_GOOGLE_display_timing[or] 18endif::VK_KHR_present_timing[] 19ifdef::VK_GOOGLE_display_timing[] 20the `VK_GOOGLE_display_timing` extension 21endif::VK_GOOGLE_display_timing[] 22applications can discover when images were presented, but only 23asynchronously. 24endif::VK_GOOGLE_display_timing,VK_KHR_present_timing[] 25 26Providing a mechanism which allows applications to block, waiting for a 27specific step of the presentation process to complete allows them to control 28the amount of outstanding work (and hence the potential lag in responding to 29user input or changes in the rendering environment). 30 31The `apiext:VK_KHR_present_wait` extension allows applications to tell the 32presentation engine at the flink:vkQueuePresentKHR call that it plans on 33waiting for presentation by passing a slink:VkPresentIdKHR structure. 34The pname:presentId passed in that structure may then be passed to a future 35flink:vkWaitForPresentKHR call to cause the application to block until that 36presentation is finished. 37