| OLD | NEW |
| (Empty) |
| 1 Name | |
| 2 | |
| 3 CHROMIUM_get_sync_values | |
| 4 | |
| 5 Name Strings | |
| 6 | |
| 7 EGL_CHROMIUM_get_sync_values | |
| 8 | |
| 9 Contact | |
| 10 | |
| 11 Stéphane Marchesin, Google (marcheu 'at' google.com) | |
| 12 | |
| 13 Status | |
| 14 | |
| 15 Draft. | |
| 16 | |
| 17 Version | |
| 18 | |
| 19 Last Modified Date: N/A Revision: 1.0 | |
| 20 | |
| 21 Based on GLX_OML_sync_control Revision 6.0 | |
| 22 | |
| 23 Number | |
| 24 | |
| 25 ??? | |
| 26 | |
| 27 Dependencies | |
| 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 | |
| 33 Overview | |
| 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 | |
| 57 Issues | |
| 58 | |
| 59 None. | |
| 60 | |
| 61 IP Status | |
| 62 | |
| 63 No known issues. | |
| 64 | |
| 65 New 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 | |
| 73 | |
| 74 New Tokens | |
| 75 | |
| 76 None | |
| 77 | |
| 78 Additions to the EGL 1.3 Specification | |
| 79 | |
| 80 eglGetSyncValuesCHROMIUM returns the current UST/MSC/SBC triple. A UST | |
| 81 timestamp is obtained each time the graphics MSC is incremented. | |
| 82 If this value does not reflect the value of the UST at the time the | |
| 83 first scan line of the display begins passing through the video | |
| 84 output port, it will be adjusted by the graphics driver to do so | |
| 85 prior to being returned by any of the functions defined by this | |
| 86 extension. | |
| 87 | |
| 88 This UST timestamp, together with the current graphics MSC and the | |
| 89 current SBC, comprise the current UST/MSC/SBC triple. The UST, | |
| 90 graphics MSC, and SBC values are not part of the render context | |
| 91 state. These values cannot be pushed or popped. The graphics MSC | |
| 92 value is initialized to 0 when the graphics device is initialized. | |
| 93 The SBC is per-surface state and is initialized to 0 when the | |
| 94 EGLSurface data structure is initialized. | |
| 95 | |
| 96 The SBC value is incremented by the graphics driver at the completion | |
| 97 of each buffer swap (e.g., the pixel copy has been completed or the | |
| 98 hardware register that swaps memory banks has been written). For pixel | |
| 99 formats that do not contain a back buffer, the SBC will always be | |
| 100 returned as 0. | |
| 101 | |
| 102 The graphics MSC value is incremented once for each screen refresh. | |
| 103 For a non-interlaced display, this means that the graphics MSC value | |
| 104 is incremented for each frame. For an interlaced display, it means | |
| 105 that it will be incremented for each field. For a multi-monitor | |
| 106 system, the monitor used to determine MSC is the one where the surface | |
| 107 is located. If the surface spans multiple monitors, the monitor used | |
| 108 to determine MSC is the one with the biggest coverage in pixels. | |
| 109 | |
| 110 The function eglGetSyncValuesCHROMIUM will return TRUE if the function | |
| 111 completed successfully, FALSE otherwise. | |
| 112 | |
| 113 Each time eglSwapBuffer succeeds, the SBC will be increased within a | |
| 114 finite time period. | |
| 115 | |
| 116 Errors | |
| 117 | |
| 118 eglGetSyncValuesCHROMIUM will return FALSE if there is no current | |
| 119 EGLContext. | |
| 120 | |
| 121 New 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 | |
| 129 New Implementation Dependent State | |
| 130 | |
| 131 None | |
| OLD | NEW |