• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Name
2
3   CHROMIUM_sync_control
4
5Name Strings
6
7   EGL_CHROMIUM_sync_control
8
9Contact
10
11   Stéphane Marchesin, Google (marcheu 'at' google.com)
12
13Status
14
15   Draft.
16
17Version
18
19   Version 2, 2015-05-05
20
21   Based on GLX_OML_sync_control Revision 6.0
22
23Number
24
25   ???
26
27Dependencies
28
29   The extension is written against the EGL 1.2 Specification, although it
30   should work on other versions of these specifications. This extension
31   also requires an operating system which supports CLOCK_MONOTONIC.
32
33Overview
34
35   This extension provides counters which let applications know about the
36   timing of the last vertical retrace. By looking at the system clock, as
37   well as the refresh rate of the monitor, this should enable applications
38   to predict the position of future retraces so as to schedule an optimal
39   workload.
40
41   This extension incorporates the use of three counters that provide
42   the necessary synchronization. The Unadjusted System Time (or UST)
43   is the 64-bit CLOCK_MONOTONIC clock; in particular this lets the
44   application schedule future vertical retraces by querying this clock.
45   The graphics Media Stream Counter (or graphics MSC) is a counter
46   that is unique to the graphics subsystem and increments for each
47   vertical retrace that occurs. The Swap Buffer Counter (SBC) is an
48   attribute of an EGLSurface and is incremented each time a swap
49   buffer action is performed on the associated surface.
50
51   The use of these three counters allows the application to
52   synchronize graphics rendering to vertical retraces and/or swap
53   buffer actions. For example, by querying the synchronization values for
54   a given surface, the application can accurately predict the timing for
55   the next vertical retraces and schedule rendering accordingly.
56
57Issues
58
59   None.
60
61IP Status
62
63   No known issues.
64
65New Procedures and Functions
66
67   Bool eglGetSyncValuesCHROMIUM(EGLDisplay dpy,
68                                 EGLSurface surface,
69                                 int64_t* ust,
70                                 int64_t* msc,
71                                 int64_t* sbc)
72
73New Tokens
74
75   None
76
77Additions to the EGL 1.3 Specification
78
79   eglGetSyncValuesCHROMIUM returns the current UST/MSC/SBC triple. A UST
80   timestamp is obtained each time the graphics MSC is incremented.
81   If this value does not reflect the value of the UST at the time the
82   first scan line of the display begins passing through the video
83   output port, it will be adjusted by the graphics driver to do so
84   prior to being returned by any of the functions defined by this
85   extension.
86
87   This UST timestamp, together with the current graphics MSC and the
88   current SBC, comprise the current UST/MSC/SBC triple. The UST,
89   graphics MSC, and SBC values are not part of the render context
90   state. These values cannot be pushed or popped. The graphics MSC
91   value is initialized to 0 when the graphics device is initialized.
92   The SBC is per-surface state and is initialized to 0 when the
93   EGLSurface data structure is initialized.
94
95   The SBC value is incremented by the graphics driver at the completion
96   of each buffer swap (e.g., the pixel copy has been completed or the
97   hardware register that swaps memory banks has been written). For pixel
98   formats that do not contain a back buffer, the SBC will always be
99   returned as 0.
100
101   The graphics MSC value is incremented once for each screen refresh.
102   For a non-interlaced display, this means that the graphics MSC value
103   is incremented for each frame. For an interlaced display, it means
104   that it will be incremented for each field. For a multi-monitor
105   system, the monitor used to determine MSC is the one where the surface
106   is located. If the surface spans multiple monitors, the monitor used
107   to determine MSC is the one with the biggest coverage in pixels.
108
109   The function eglGetSyncValuesCHROMIUM will return TRUE if the function
110   completed successfully, FALSE otherwise.
111
112   Each time eglSwapBuffer succeeds, the SBC will be increased within a
113   finite time period.
114
115Errors
116
117   The function eglGetSyncValuesCHROMIUM will return FALSE if there is no
118   current EGLContext.
119
120
121New State
122
123   Get Value                 Get Command            Type    Initial Value
124   ---------                 -----------            ----    -------------
125     [UST]             eglGetSyncValuesCHROMIUM      Z      unspecified
126     [MSC]             eglGetSyncValuesCHROMIUM      Z                  0
127     [SBC]             eglGetSyncValuesCHROMIUM      Z                  0
128
129New Implementation Dependent State
130
131   None
132
133Revision History
134
135    Version 2, 2015-05-05 (Chad Versace)
136       - Rename to EGL_CHROMIUM_sync_control from EGL_CHROMIUM_get_sync_values.
137         EGL_CHROMIUM_sync_control is the de facto extension name because all
138         users query that extension string.
139
140    Version 1, 2014-08-15 (Stéphane Marchesin)
141       - Initial draft, based on GLX_OML_sync_control revision 6.0.
142