• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright (c) 2018-2020 Google LLC
2//
3// SPDX-License-Identifier: CC-BY-4.0
4
5
6[open,refpage='VkPresentTimesInfoGOOGLE',desc='The earliest time each image should be presented',type='structs']
7--
8When the `apiext:VK_GOOGLE_display_timing` extension is enabled, additional
9fields can: be specified that allow an application to specify the earliest
10time that an image should be displayed.
11This allows an application to avoid stutter that is caused by an image being
12displayed earlier than planned.
13Such stuttering can occur with both fixed and variable-refresh-rate
14displays, because stuttering occurs when the geometry is not correctly
15positioned for when the image is displayed.
16An application can: instruct the presentation engine that an image should
17not be displayed earlier than a specified time by adding a
18sname:VkPresentTimesInfoGOOGLE structure to the pname:pNext chain of the
19sname:VkPresentInfoKHR structure.
20
21The sname:VkPresentTimesInfoGOOGLE structure is defined as:
22
23include::{generated}/api/structs/VkPresentTimesInfoGOOGLE.txt[]
24
25  * pname:sType is the type of this structure.
26  * pname:pNext is `NULL` or a pointer to a structure extending this
27    structure.
28  * pname:swapchainCount is the number of swapchains being presented to by
29    this command.
30  * pname:pTimes is `NULL` or a pointer to an array of
31    sname:VkPresentTimeGOOGLE elements with pname:swapchainCount entries.
32    If not `NULL`, each element of pname:pTimes contains the earliest time
33    to present the image corresponding to the entry in the
34    sname:VkPresentInfoKHR::pname:pImageIndices array.
35
36.Valid Usage
37****
38  * [[VUID-VkPresentTimesInfoGOOGLE-swapchainCount-01247]]
39    pname:swapchainCount must: be the same value as
40    sname:VkPresentInfoKHR::pname:swapchainCount, where
41    sname:VkPresentInfoKHR is included in the pname:pNext chain of this
42    sname:VkPresentTimesInfoGOOGLE structure
43****
44
45include::{generated}/validity/structs/VkPresentTimesInfoGOOGLE.txt[]
46--
47
48[open,refpage='VkPresentTimeGOOGLE',desc='The earliest time image should be presented',type='structs']
49--
50The sname:VkPresentTimeGOOGLE structure is defined as:
51
52include::{generated}/api/structs/VkPresentTimeGOOGLE.txt[]
53
54  * pname:presentID is an application-provided identification value, that
55    can: be used with the results of
56    flink:vkGetPastPresentationTimingGOOGLE, in order to uniquely identify
57    this present.
58    In order to be useful to the application, it should: be unique within
59    some period of time that is meaningful to the application.
60  * pname:desiredPresentTime specifies that the image given should: not be
61    displayed to the user any earlier than this time.
62    pname:desiredPresentTime is a time in nanoseconds, relative to a
63    monotonically-increasing clock (e.g. `CLOCK_MONOTONIC` (see
64    clock_gettime(2)) on Android and Linux).
65    A value of zero specifies that the presentation engine may: display the
66    image at any time.
67    This is useful when the application desires to provide pname:presentID,
68    but does not need a specific pname:desiredPresentTime.
69--
70