summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/syncobj.c
diff options
context:
space:
mode:
authorJordan Justen <[email protected]>2012-12-04 01:17:23 -0800
committerJordan Justen <[email protected]>2012-12-06 09:43:07 -0800
commite12d9f0c6df9f309ade2aea708264c81038685b1 (patch)
treee994b75bff19b524a5b77efa4b8c39f12793859c /src/mesa/main/syncobj.c
parent82c9d98ab9e8c0c94239551d84747b186d67ad73 (diff)
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 <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/main/syncobj.c')
-rw-r--r--src/mesa/main/syncobj.c8
1 files 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;
}