1<refentry xmlns="http://docbook.org/ns/docbook" version="5.0" xml:base="" xml:id="eglWaitSync"> 2 <info> 3 <copyright> 4 <year>2018</year> 5 <holder>The Khronos Group Inc.</holder> 6 </copyright> 7 </info> 8 <refmeta> 9 <refentrytitle>eglWaitSync</refentrytitle> 10 <manvolnum>3G</manvolnum> 11 </refmeta> 12 <refnamediv> 13 <refname>eglWaitSync</refname> 14 <refpurpose> 15 Wait in the server for a sync object to be signalled 16 </refpurpose> 17 </refnamediv> 18 <refsynopsisdiv> 19 <title>C Specification</title> 20 <funcsynopsis> 21 <funcprototype> 22 <funcdef>EGLBoolean <function>eglWaitSync</function></funcdef> 23 <paramdef>(EGLDisplay <parameter>display</parameter></paramdef> 24 <paramdef>EGLSync <parameter>sync</parameter></paramdef> 25 <paramdef>EGLint <parameter>flags</parameter></paramdef> 26 </funcprototype> 27 </funcsynopsis> 28 </refsynopsisdiv> 29 <refsect1 xml:id="parameters"><title>Parameters</title> 30 <variablelist> 31 <varlistentry> 32 <term><parameter>display</parameter></term> 33 <listitem><para> 34 Specifies the <acronym>EGL</acronym> display connection. 35 </para></listitem> 36 </varlistentry> 37 <varlistentry> 38 <term><parameter>sync</parameter></term> 39 <listitem><para> 40 Specifies the sync object to wait on. 41 </para></listitem> 42 </varlistentry> 43 <varlistentry> 44 <term><parameter>flags</parameter></term> 45 <listitem><para> 46 Specifies flags controlling wait behavior. 47 </para></listitem> 48 </varlistentry> 49 </variablelist> 50 </refsect1> 51 <refsect1 xml:id="description"><title>Description</title> 52 <para> 53 <function>eglWaitSync</function> is similar to 54 <function>eglClientWaitSync</function>, but instead of blocking 55 and not returning to the application until 56 <parameter>sync</parameter> is signaled, 57 <function>eglWaitSync</function> returns immediately. On 58 success, <constant>EGL_TRUE</constant> is returned, and the 59 server for the client API context will block until 60 <parameter>sync</parameter> is signaled. 61 </para> 62 <para> 63 Note: <function>eglWaitSync</function> allows applications to 64 continue to queue commands from the application in anticipation 65 of the sync being signaled, potentially increasing parallelism 66 between application, client API server code, and the GPU. The 67 server only blocks execution of commands for the specific 68 context on which <function>eglWaitSync</function> was issued; 69 other contexts implemented by the same server are not affected.. 70 </para> 71 <para> 72 <parameter>sync</parameter> has the same meaning as for 73 <function>eglClientWaitSync</function>. 74 </para> 75 <para> 76 <parameter>flags</parameter> must be 0. 77 </para> 78 <para> 79 <function>eglWaitSync</function> requires support from the bound 80 client API, and will not succeed unless the same client API 81 properties described for creation of fence syncs in 82 <citerefentry><refentrytitle>eglCreateSync</refentrytitle></citerefentry> 83 are satisfied. 84 </para> 85 </refsect1> 86 <refsect1 xml:id="errors"><title>Errors</title> 87 <para> 88 <function>eglWaitSync</function> returns 89 <constant>EGL_FALSE</constant> on failure, and does not cause 90 the server for the client API context to block. 91 </para> 92 <para> 93 If the current context for the currently bound client API does 94 not support server waits, an <constant>EGL_BAD_MATCH</constant> 95 error is generated. 96 </para> 97 <para> 98 If no context is current for the currently bound client API 99 (i.e., <function>eglGetCurrentContext</function> returns 100 <constant>EGL_NO_CONTEXT</constant>), an 101 <constant>EGL_BAD_MATCH</constant> error is generated. 102 </para> 103 <para> 104 If <parameter>display</parameter> does not match the 105 <type>EGLDisplay</type> passed to 106 <function>eglCreateSync</function> when 107 <parameter>sync</parameter> was created, the behavior is 108 undefined. 109 </para> 110 <para> 111 If <parameter>sync</parameter> is not a valid sync object for 112 <parameter>display</parameter>, an 113 <constant>EGL_BAD_PARAMETER</constant> error is generated. 114 </para> 115 <para> 116 If <parameter>flags</parameter> is not 0, an 117 <constant>EGL_BAD_PARAMETER</constant> error is generated. 118 </para> 119 </refsect1> 120 <refsect1 xml:id="notes"><title>Notes</title> 121 <para> 122 <function>eglWaitSync</function> is available only if the EGL 123 version is 1.5 or greater. 124 </para> 125 </refsect1> 126 <refsect1 xml:id="seealso"><title>See Also</title> 127 <para> 128 <citerefentry><refentrytitle>eglClientWaitSync</refentrytitle></citerefentry>, 129 <citerefentry><refentrytitle>eglCreateSync</refentrytitle></citerefentry>, 130 <citerefentry><refentrytitle>eglGetCurrentContext</refentrytitle></citerefentry> 131 </para> 132 </refsect1> 133 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="copyright.xml"/> 134</refentry> 135