mesa: add KHR_no_error support to glWaitSync()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 18 Jul 2017 09:11:03 +0000 (11:11 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 31 Jul 2017 11:53:39 +0000 (13:53 +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 f1463f11a86833492ee4de2cc15734f562156264..d6412d3bf4c270f37d7c09c03870719173b5a12e 100644 (file)
@@ -61,7 +61,7 @@
         <return type="GLenum"/>
     </function>
 
-    <function name="WaitSync" es2="3.0">
+    <function name="WaitSync" es2="3.0" no_error="true">
         <param name="sync" type="GLsync"/>
         <param name="flags" type="GLbitfield"/>
        <param name="timeout" type="GLuint64"/>
index 915b7009f78ac6d1f270541ca303485c5d7a6167..62f6dbc4a6027429ba27107eacb6ae643251c038 100644 (file)
@@ -390,6 +390,16 @@ wait_sync(struct gl_context *ctx, struct gl_sync_object *syncObj,
 }
 
 
+void GLAPIENTRY
+_mesa_WaitSync_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);
+   wait_sync(ctx, syncObj, flags, timeout);
+}
+
+
 void GLAPIENTRY
 _mesa_WaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout)
 {
index 2b50d062b130720e1ae228dc50c3386814f33377..7d1bed530c8d231a50a81edb9df13c08384c2795 100644 (file)
@@ -72,6 +72,9 @@ _mesa_ClientWaitSync_no_error(GLsync sync, GLbitfield flags, GLuint64 timeout);
 extern GLenum GLAPIENTRY
 _mesa_ClientWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout);
 
+void GLAPIENTRY
+_mesa_WaitSync_no_error(GLsync sync, GLbitfield flags, GLuint64 timeout);
+
 extern void GLAPIENTRY
 _mesa_WaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout);