summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>2017-06-26 14:44:43 +0200
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>2017-06-28 10:25:13 +0200
commit6e0cd291327a295714effbdd730068ae8843ba11 (patch)
treeb50c6c5056e11be5c1a0059daa8ffd6146b8ff85 /src
parent20ff1f9db7fc5f5ed5298a8dce9f2dac431ca2dd (diff)
mesa: add KHR_no_error support for glClientWaitSync()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Diffstat (limited to 'src')
-rw-r--r--src/mapi/glapi/gen/ARB_sync.xml2
-rw-r--r--src/mesa/main/syncobj.c10
-rw-r--r--src/mesa/main/syncobj.h3
3 files changed, 14 insertions, 1 deletions
diff --git a/src/mapi/glapi/gen/ARB_sync.xml b/src/mapi/glapi/gen/ARB_sync.xml
index d8a1c34e0c8..141d5aeef3c 100644
--- a/src/mapi/glapi/gen/ARB_sync.xml
+++ b/src/mapi/glapi/gen/ARB_sync.xml
@@ -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"/>
diff --git a/src/mesa/main/syncobj.c b/src/mesa/main/syncobj.c
index ce9c99725ea..1347a0fcc4b 100644
--- a/src/mesa/main/syncobj.c
+++ b/src/mesa/main/syncobj.c
@@ -337,6 +337,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)
{
GET_CURRENT_CONTEXT(ctx);
diff --git a/src/mesa/main/syncobj.h b/src/mesa/main/syncobj.h
index ea4a71222c0..426959f6b2e 100644
--- a/src/mesa/main/syncobj.h
+++ b/src/mesa/main/syncobj.h
@@ -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);