1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
|
Name
CHROMIUM_sync_point
Name Strings
GL_CHROMIUM_sync_point
Version
Last Modifed Date: September 8, 2015
Dependencies
OpenGL ES 2.0 is required.
Overview
This extension allows a client to order operations between contexts.
This extension introduces the concepts of "fence sync" and "sync token".
An inserted fence sync represents a position in the command stream of a
context. Sync tokens are generated from fence syncs and allow another
context to issue a "wait" command on the sync token. This wait command
will then guarantee that commands before the inserted fence sync are
submitted before commands after the sync token wait.
This extension implements a small subset of ARB_sync, with weaker
guarantees. In particular it doesn't ensure commands are actually executed
by the server, it only guarantees submission order.
It does however guarantee operation order with respect to
ConsumeTextureCHROMIUM and ProduceTextureCHROMIUM from
CHROMIUM_texture_mailbox, if present.
Issues
None
New Procedures and Functions
The command
uint64 InsertFenceSyncCHROMIUM()
inserts a fence sync in the current command stream. The fence sync is
signaled when previous commands have been submitted to the server, or when
the context is destroyed, whichever happens first. The fence sync name is
only visible for the current context. The returned fence sync name cannot
be waited upon directly, but once the command is flushed to the server,
it can be converted to a sync token using GenSyncTokenCHROMIUM, which is
waitable.
The command
void GenSyncTokenCHROMIUM(uint64 fence_sync, GLbyte *sync_token)
converts <fence_sync> which is only visible to the current context to a
sync token which may be waited upon by any contexts on the same server.
The <fence_sync> command must be flushed before this function may be
called, otherwise an INVALID_OPERATION error is generated. The generated
<sync_token> must be generated on the same context as when
InsertFenceSyncCHROMIUM was called. The <sync_token> can be passed and
used by any context on the same server, including other context groups.
<sync_token> returns a GL_SYNC_POINT_SIZE_CHROMIUM byte sized name.
The command
void GenUnverifiedSyncTokenCHROMIUM(uint64 fence_sync,
GLbyte *sync_token)
converts <fence_sync>, which is only visible to the current context, to a
sync token, which may be waited upon by a context which only needs flush
order guarantee with respect to the fence sync context. For example, if
the two contexts are on the same channel but on different streams, flush
order guarantee is enough to guarantee that the server will receive the
release command before the wait command. The <fence_sync> command must be
flushed before this function may be called, otherwise an INVALID_OPERATION
error is generated. The generated <sync_token> must be generated on the
same context as when InsertFenceSyncCHROMIUM was called.
The command
void WaitSyncTokenCHROMIUM(const GLbyte *sync_token)
causes the current context to stop submitting commands until the specified
fence sync becomes signaled. This is implemented as a server-side wait.
<sync_token> is a sync token generated by GenSyncPointCHROMIUM. If
<sync_token> was generated by GenUnverifiedSyncTokenCHROMIUM and the
corresponding fence sync context required more than just flush ordering
to guarantee synchronization, a INVALID_OPERATION error is generated. If
<sync_token> isn't a valid sync token returned by GenSyncPointCHROMIUM or
GenUnverifiedSyncTokenCHROMIUM, the result is undefined.
New Tokens
The size of a sync token name in bytes.
GL_SYNC_TOKEN_SIZE_CHROMIUM 24
Errors
INVALID_VALUE is generated if the <fence_sync> parameter of
GenSyncPointCHROMIUM is not a valid local fence sync name.
INVALID_OPERATION is generated if the <fence_sync> parameter of
GenSyncPointCHROMIUM has not been flushed to the server.
INVALID_OPERATION is generated if the <sync_token> parameter of
WaitSyncTokenCHROMIUM was generated using GenUnverifiedSyncTokenCHROMIUM,
but the two contexts must be synchronized with more than just flush order.
New State
None.
Revision History
2/25/2013 Documented the extension
9/8/2015 Modified functions InsertFenceSyncCHROMIUM,
GenSyncTokenCHROMIUM, and WaitSyncTokenCHROMIUM.
10/12/2015 Added function GenUnverifiedSyncTokenCHROMIUM.
|