From 6e0cd291327a295714effbdd730068ae8843ba11 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Mon, 26 Jun 2017 14:44:43 +0200 Subject: [PATCH] mesa: add KHR_no_error support for glClientWaitSync() Signed-off-by: Samuel Pitoiset Reviewed-by: Timothy Arceri --- src/mapi/glapi/gen/ARB_sync.xml | 2 +- src/mesa/main/syncobj.c | 10 ++++++++++ src/mesa/main/syncobj.h | 3 +++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/mapi/glapi/gen/ARB_sync.xml b/src/mapi/glapi/gen/ARB_sync.xml index d8a1c34..141d5ae 100644 --- a/src/mapi/glapi/gen/ARB_sync.xml +++ b/src/mapi/glapi/gen/ARB_sync.xml @@ -54,7 +54,7 @@ - + diff --git a/src/mesa/main/syncobj.c b/src/mesa/main/syncobj.c index ce9c997..1347a0f 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 ea4a712..426959f 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); -- 2.7.4