[Mesa-dev] [PATCH 011/101] mesa: add KHR_no_error support to glWaitSync()
Samuel Pitoiset
samuel.pitoiset at gmail.com
Fri Jul 21 17:39:20 UTC 2017
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
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 f1463f11a8..d6412d3bf4 100644
--- a/src/mapi/glapi/gen/ARB_sync.xml
+++ b/src/mapi/glapi/gen/ARB_sync.xml
@@ -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"/>
diff --git a/src/mesa/main/syncobj.c b/src/mesa/main/syncobj.c
index 361ead6dce..98938ed59c 100644
--- a/src/mesa/main/syncobj.c
+++ b/src/mesa/main/syncobj.c
@@ -395,6 +395,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)
{
GET_CURRENT_CONTEXT(ctx);
diff --git a/src/mesa/main/syncobj.h b/src/mesa/main/syncobj.h
index 2b50d062b1..7d1bed530c 100644
--- a/src/mesa/main/syncobj.h
+++ b/src/mesa/main/syncobj.h
@@ -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);
--
2.13.3
More information about the mesa-dev
mailing list