• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml">
3  <head>
4    <title xmlns:xlink="http://www.w3.org/1999/xlink">eglWaitSync - EGL Reference Pages</title>
5    <link rel="stylesheet" type="text/css" href="khronos-man.css"/>
6    <meta name="generator" content="DocBook XSL Stylesheets V1.79.1"/>
7  </head>
8  <body>
9    <header/>
10    <div class="refentry" id="eglWaitSync">
11      <div class="titlepage"/>
12      <div class="refnamediv">
13        <h2>Name</h2>
14        <p>eglWaitSync —
15            Wait in the server for a sync object to be signalled
16        </p>
17      </div>
18      <div class="refsynopsisdiv">
19        <h2>C Specification</h2>
20        <div class="funcsynopsis">
21          <table style="border: 0; cellspacing: 0; cellpadding: 0;" class="funcprototype-table">
22            <tr>
23              <td>
24                <code class="funcdef">EGLBoolean <strong class="fsfunc">eglWaitSync</strong>(</code>
25              </td>
26              <td>(EGLDisplay <var class="pdparam">display</var>, </td>
27            </tr>
28            <tr>
29              <td> </td>
30              <td>EGLSync <var class="pdparam">sync</var>, </td>
31            </tr>
32            <tr>
33              <td> </td>
34              <td>EGLint <var class="pdparam">flags</var><code>)</code>;</td>
35            </tr>
36          </table>
37          <div class="funcprototype-spacer"> </div>
38        </div>
39      </div>
40      <div class="refsect1" id="parameters">
41        <h2>Parameters</h2>
42        <div class="variablelist">
43          <dl class="variablelist">
44            <dt>
45              <span class="term">
46                <em class="parameter">
47                  <code>display</code>
48                </em>
49              </span>
50            </dt>
51            <dd>
52              <p>
53                    Specifies the <abbr class="acronym">EGL</abbr> display connection.
54                </p>
55            </dd>
56            <dt>
57              <span class="term">
58                <em class="parameter">
59                  <code>sync</code>
60                </em>
61              </span>
62            </dt>
63            <dd>
64              <p>
65                    Specifies the sync object to wait on.
66                </p>
67            </dd>
68            <dt>
69              <span class="term">
70                <em class="parameter">
71                  <code>flags</code>
72                </em>
73              </span>
74            </dt>
75            <dd>
76              <p>
77                    Specifies flags controlling wait behavior.
78                </p>
79            </dd>
80          </dl>
81        </div>
82      </div>
83      <div class="refsect1" id="description">
84        <h2>Description</h2>
85        <p>
86            <code class="function">eglWaitSync</code> is similar to
87            <code class="function">eglClientWaitSync</code>, but instead of blocking
88            and not returning to the application until
89            <em class="parameter"><code>sync</code></em> is signaled,
90            <code class="function">eglWaitSync</code> returns immediately. On
91            success, <code class="constant">EGL_TRUE</code> is returned, and the
92            server for the client API context will block until
93            <em class="parameter"><code>sync</code></em> is signaled.
94        </p>
95        <p>
96            Note: <code class="function">eglWaitSync</code> allows applications to
97            continue to queue commands from the application in anticipation
98            of the sync being signaled, potentially increasing parallelism
99            between application, client API server code, and the GPU. The
100            server only blocks execution of commands for the specific
101            context on which <code class="function">eglWaitSync</code> was issued;
102            other contexts implemented by the same server are not affected..
103        </p>
104        <p>
105            <em class="parameter"><code>sync</code></em> has the same meaning as for
106            <code class="function">eglClientWaitSync</code>.
107        </p>
108        <p>
109            <em class="parameter"><code>flags</code></em> must be 0.
110        </p>
111        <p>
112            <code class="function">eglWaitSync</code> requires support from the bound
113            client API, and will not succeed unless the same client API
114            properties described for creation of fence syncs in
115            <a class="citerefentry" href="eglCreateSync.xhtml"><span class="citerefentry"><span class="refentrytitle">eglCreateSync</span></span></a>
116            are satisfied.
117        </p>
118      </div>
119      <div class="refsect1" id="errors">
120        <h2>Errors</h2>
121        <p>
122            <code class="function">eglWaitSync</code> returns
123            <code class="constant">EGL_FALSE</code> on failure, and does not cause
124            the server for the client API context to block.
125        </p>
126        <p>
127            If the current context for the currently bound client API does
128            not support server waits, an <code class="constant">EGL_BAD_MATCH</code>
129            error is generated.
130        </p>
131        <p>
132            If no context is current for the currently bound client API
133            (i.e., <code class="function">eglGetCurrentContext</code> returns
134            <code class="constant">EGL_NO_CONTEXT</code>), an
135            <code class="constant">EGL_BAD_MATCH</code> error is generated.
136        </p>
137        <p>
138            If <em class="parameter"><code>display</code></em> does not match the
139            <span class="type">EGLDisplay</span> passed to
140            <code class="function">eglCreateSync</code> when
141            <em class="parameter"><code>sync</code></em> was created, the behavior is
142            undefined.
143        </p>
144        <p>
145            If <em class="parameter"><code>sync</code></em> is not a valid sync object for
146            <em class="parameter"><code>display</code></em>, an
147            <code class="constant">EGL_BAD_PARAMETER</code> error is generated.
148        </p>
149        <p>
150            If <em class="parameter"><code>flags</code></em> is not 0, an
151            <code class="constant">EGL_BAD_PARAMETER</code> error is generated.
152        </p>
153      </div>
154      <div class="refsect1" id="notes">
155        <h2>Notes</h2>
156        <p>
157            <code class="function">eglWaitSync</code> is available only if the EGL
158            version is 1.5 or greater.
159        </p>
160      </div>
161      <div class="refsect1" id="seealso">
162        <h2>See Also</h2>
163        <p>
164            <a class="citerefentry" href="eglClientWaitSync.xhtml"><span class="citerefentry"><span class="refentrytitle">eglClientWaitSync</span></span></a>,
165            <a class="citerefentry" href="eglCreateSync.xhtml"><span class="citerefentry"><span class="refentrytitle">eglCreateSync</span></span></a>,
166            <a class="citerefentry" href="eglGetCurrentContext.xhtml"><span class="citerefentry"><span class="refentrytitle">eglGetCurrentContext</span></span></a>
167        </p>
168      </div>
169      <p>
170    </p>
171      <div class="refsect3" id="copyright">
172        <img src="KhronosLogo.jpg"/>
173        <p>
174            Copyright © 2003-2014 The Khronos Group Inc.
175            Permission is hereby granted, free of charge, to any person obtaining a
176            copy of this software and/or associated documentation files (the
177            "Materials"), to deal in the Materials without restriction, including
178            without limitation the rights to use, copy, modify, merge, publish,
179            distribute, sublicense, and/or sell copies of the Materials, and to
180            permit persons to whom the Materials are furnished to do so, subject to
181            the condition that this copyright notice and permission notice shall be included
182            in all copies or substantial portions of the Materials.
183        </p>
184      </div>
185      <p>
186</p>
187    </div>
188    <footer/>
189  </body>
190</html>
191