Mesa (master): mesa: return INVALID_VALUE from WaitSync if timeout != GL_TIMEOUT_IGNORED

Matt Turner mattst88 at kemper.freedesktop.org
Thu Nov 15 23:20:34 UTC 2012


Module: Mesa
Branch: master
Commit: 47d862517ea658e5f330a10fc7656c7cd67bfb16
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=47d862517ea658e5f330a10fc7656c7cd67bfb16

Author: Matt Turner <mattst88 at gmail.com>
Date:   Tue Nov 13 13:49:51 2012 -0800

mesa: return INVALID_VALUE from WaitSync if timeout != GL_TIMEOUT_IGNORED

This was added in version 22 of the GL_ARB_sync spec.

Fixes gles3conform's sync_error_waitsync_timeout test.
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

---

 src/mesa/main/syncobj.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/mesa/main/syncobj.c b/src/mesa/main/syncobj.c
index 430c1ee..745e982 100644
--- a/src/mesa/main/syncobj.c
+++ b/src/mesa/main/syncobj.c
@@ -356,11 +356,8 @@ _mesa_WaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout)
       return;
    }
 
-   /* From the GL_ARB_sync spec:
-    *
-    *     If the value of <timeout> is zero, then WaitSync does nothing.
-    */
-   if (timeout == 0) {
+   if (timeout != GL_TIMEOUT_IGNORED) {
+      _mesa_error(ctx, GL_INVALID_VALUE, "glWaitSync(timeout=0x%lx)", timeout);
       return;
    }
 




More information about the mesa-commit mailing list