From e12d9f0c6df9f309ade2aea708264c81038685b1 Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Tue, 4 Dec 2012 01:17:23 -0800 Subject: [PATCH] main/syncobj: return GL_INVALID_VALUE for invalid sync objects Note: The GL/GLES3 web man pages don't seem to properly document glWaitSync's error when the sync object is invalid. Signed-off-by: Jordan Justen Reviewed-by: Brian Paul --- src/mesa/main/syncobj.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mesa/main/syncobj.c b/src/mesa/main/syncobj.c index cc541c83496..3a8ff230b07 100644 --- a/src/mesa/main/syncobj.c +++ b/src/mesa/main/syncobj.c @@ -236,7 +236,7 @@ _mesa_DeleteSync(GLsync sync) } if (!_mesa_validate_sync(syncObj)) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glDeleteSync"); + _mesa_error(ctx, GL_INVALID_VALUE, "glDeleteSync (not a valid sync object)"); return; } @@ -304,7 +304,7 @@ _mesa_ClientWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout) ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_WAIT_FAILED); if (!_mesa_validate_sync(syncObj)) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glClientWaitSync"); + _mesa_error(ctx, GL_INVALID_VALUE, "glClientWaitSync (not a valid sync object)"); return GL_WAIT_FAILED; } @@ -348,7 +348,7 @@ _mesa_WaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout) ASSERT_OUTSIDE_BEGIN_END(ctx); if (!_mesa_validate_sync(syncObj)) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glWaitSync"); + _mesa_error(ctx, GL_INVALID_VALUE, "glWaitSync (not a valid sync object)"); return; } @@ -378,7 +378,7 @@ _mesa_GetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, ASSERT_OUTSIDE_BEGIN_END(ctx); if (!_mesa_validate_sync(syncObj)) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glGetSynciv"); + _mesa_error(ctx, GL_INVALID_VALUE, "glGetSynciv (not a valid sync object)"); return; } -- 2.30.2