mesa: add KHR_no_error support for glClientWaitSync()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 26 Jun 2017 12:44:43 +0000 (14:44 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 28 Jun 2017 08:25:13 +0000 (10:25 +0200)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/mapi/glapi/gen/ARB_sync.xml
src/mesa/main/syncobj.c
src/mesa/main/syncobj.h

index d8a1c34e0c8257874a592dd9c3a828c8dbc0fd19..141d5aeef3cdf22bf7158d56a59c9ad626ac2349 100644 (file)
@@ -54,7 +54,7 @@
         <param name="sync" type="GLsync"/>
     </function>
 
-    <function name="ClientWaitSync" es2="3.0">
+    <function name="ClientWaitSync" es2="3.0" no_error="true">
         <param name="sync" type="GLsync"/>
         <param name="flags" type="GLbitfield"/>
        <param name="timeout" type="GLuint64"/>
index ce9c99725ea0535652b1e1982154a6ed51cbbbfd..1347a0fcc4b8f4590161632a0638103c8afa0bd4 100644 (file)
@@ -336,6 +336,16 @@ client_wait_sync(struct gl_context *ctx, struct gl_sync_object *syncObj,
 }
 
 
+GLenum GLAPIENTRY
+_mesa_ClientWaitSync_no_error(GLsync sync, GLbitfield flags, GLuint64 timeout)
+{
+   GET_CURRENT_CONTEXT(ctx);
+
+   struct gl_sync_object *syncObj = _mesa_get_and_ref_sync(ctx, sync, true);
+   return client_wait_sync(ctx, syncObj, flags, timeout);
+}
+
+
 GLenum GLAPIENTRY
 _mesa_ClientWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout)
 {
index ea4a71222c0b726e617219946212fc188181a747..426959f6b2eba8ba5f05a1cf9d313f22d2eee842 100644 (file)
@@ -63,6 +63,9 @@ _mesa_DeleteSync(GLsync sync);
 extern GLsync GLAPIENTRY
 _mesa_FenceSync(GLenum condition, GLbitfield flags);
 
+GLenum GLAPIENTRY
+_mesa_ClientWaitSync_no_error(GLsync sync, GLbitfield flags, GLuint64 timeout);
+
 extern GLenum GLAPIENTRY
 _mesa_ClientWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout);