[Mesa-dev] [PATCH 31/42] mesa: add KHR_no_error support for glFenceSync()

Samuel Pitoiset samuel.pitoiset at gmail.com
Tue Jun 27 11:20:34 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         | 8 ++++++++
 src/mesa/main/syncobj.h         | 3 +++
 3 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/src/mapi/glapi/gen/ARB_sync.xml b/src/mapi/glapi/gen/ARB_sync.xml
index 141d5aeef3c..f1463f11a86 100644
--- a/src/mapi/glapi/gen/ARB_sync.xml
+++ b/src/mapi/glapi/gen/ARB_sync.xml
@@ -39,7 +39,7 @@
     -->
 
 
-    <function name="FenceSync" es2="3.0">
+    <function name="FenceSync" es2="3.0" no_error="true">
         <param name="condition" type="GLenum"/>
         <param name="flags" type="GLbitfield"/>
         <return type="GLsync"/>
diff --git a/src/mesa/main/syncobj.c b/src/mesa/main/syncobj.c
index 4278827b11d..9c165314bf3 100644
--- a/src/mesa/main/syncobj.c
+++ b/src/mesa/main/syncobj.c
@@ -292,6 +292,14 @@ fence_sync(struct gl_context *ctx, GLenum condition, GLbitfield flags)
 
 
 GLsync GLAPIENTRY
+_mesa_FenceSync_no_error(GLenum condition, GLbitfield flags)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   return fence_sync(ctx, condition, flags);
+}
+
+
+GLsync GLAPIENTRY
 _mesa_FenceSync(GLenum condition, GLbitfield flags)
 {
    GET_CURRENT_CONTEXT(ctx);
diff --git a/src/mesa/main/syncobj.h b/src/mesa/main/syncobj.h
index 426959f6b2e..2b50d062b13 100644
--- a/src/mesa/main/syncobj.h
+++ b/src/mesa/main/syncobj.h
@@ -60,6 +60,9 @@ _mesa_IsSync(GLsync sync);
 extern void GLAPIENTRY
 _mesa_DeleteSync(GLsync sync);
 
+GLsync GLAPIENTRY
+_mesa_FenceSync_no_error(GLenum condition, GLbitfield flags);
+
 extern GLsync GLAPIENTRY
 _mesa_FenceSync(GLenum condition, GLbitfield flags);
 
-- 
2.13.2



More information about the mesa-dev mailing list