mesa: return INVALID_VALUE from WaitSync if timeout != GL_TIMEOUT_IGNORED
authorMatt Turner <mattst88@gmail.com>
Tue, 13 Nov 2012 21:49:51 +0000 (13:49 -0800)
committerMatt Turner <mattst88@gmail.com>
Thu, 15 Nov 2012 23:21:28 +0000 (15:21 -0800)
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@whitecape.org>
src/mesa/main/syncobj.c

index 430c1eeb56d0464f719501790ec2552d32ce0992..745e982ad48936c93f51d3aea5f81bddd6c0a4ed 100644 (file)
@@ -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;
    }